Skip to content

Commit

Permalink
mark fdb tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mathleur committed Dec 13, 2023
1 parent 191fb4a commit da2044d
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ jobs:
LD_LIBRARY_PATH: ${{ steps.install-dependencies.outputs.lib_path }}
shell: bash -eux {0}
run: |
DYLD_LIBRARY_PATH=${{ env.LD_LIBRARY_PATH }} python -m pytest tests --cov=./ --cov-report=xml
DYLD_LIBRARY_PATH=${{ env.LD_LIBRARY_PATH }} python -m pytest -m "not fdb" tests --cov=./ --cov-report=xml
python -m coverage report
- name: Upload coverage to Codecov
Expand Down
2 changes: 0 additions & 2 deletions performance/fdb_slice_many_numbers_timeseries.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import time

import pandas as pd
import pytest

from polytope.datacube.backends.fdb import FDBDatacube
from polytope.engine.hullslicer import HullSlicer
Expand Down Expand Up @@ -29,7 +28,6 @@ def setup_method(self, method):
self.API = Polytope(datacube=self.fdbdatacube, engine=self.slicer, axis_options=self.options)

# Testing different shapes
# @pytest.mark.skip(reason="can't install fdb branch on CI")
def test_fdb_datacube(self):
request = Request(
# Select("step", [0]),
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ line-length = 120
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
[tool.pytest.ini_options]
markers = ["internet: downloads test data from the internet (deselect with '-m \"not internet\"')",]
markers = ["internet: downloads test data from the internet (deselect with '-m \"not internet\"')",
"fdb: test which uses fdb (deselect with '-m \"not fdb\"')",]
4 changes: 2 additions & 2 deletions tests/test_fdb_datacube.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ def setup_method(self, method):
},
"date": {"transformation": {"merge": {"with": "time", "linkers": ["T", "00"]}}},
"step": {"transformation": {"type_change": "int"}},
"number": {"transformation": {"type_change": "int"}}
"number": {"transformation": {"type_change": "int"}},
}
self.config = {"class": "od", "expver": "0001", "levtype": "sfc", "step": 0}
self.fdbdatacube = FDBDatacube(self.config, axis_options=self.options)
self.slicer = HullSlicer()
self.API = Polytope(datacube=self.fdbdatacube, engine=self.slicer, axis_options=self.options)

# Testing different shapes
# @pytest.mark.skip(reason="can't install fdb branch on CI")
@pytest.mark.fdb
def test_fdb_datacube(self):
request = Request(
Select("step", [0]),
Expand Down
4 changes: 2 additions & 2 deletions tests/test_incomplete_tree_fdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def find_nearest_latlon(self, grib_file, target_lat, target_lon):
return nearest_points

@pytest.mark.internet
# @pytest.mark.skip(reason="can't install fdb branch on CI")
@pytest.mark.fdb
def test_incomplete_fdb_branch(self):
request = Request(
Select("step", [0]),
Expand All @@ -74,7 +74,7 @@ def test_incomplete_fdb_branch(self):
assert result.is_root()

@pytest.mark.internet
# @pytest.mark.skip(reason="can't install fdb branch on CI")
@pytest.mark.fdb
def test_incomplete_fdb_branch_2(self):
request = Request(
Select("step", [0]),
Expand Down
2 changes: 1 addition & 1 deletion tests/test_regular_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def find_nearest_latlon(self, grib_file, target_lat, target_lon):
return nearest_points

@pytest.mark.internet
# @pytest.mark.skip(reason="can't install fdb branch on CI")
@pytest.mark.fdb
def test_regular_grid(self):
request = Request(
Select("step", [0]),
Expand Down
4 changes: 2 additions & 2 deletions tests/test_shapes.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def test_all_cyclic(self):
# result.pprint()
assert len(result.leaves) == 360

# @pytest.mark.skip(reason="can't install fdb branch on CI")
@pytest.mark.fdb
def test_all_mapper_cyclic(self):
self.options = {
"values": {
Expand All @@ -50,7 +50,7 @@ def test_all_mapper_cyclic(self):
"date": {"transformation": {"merge": {"with": "time", "linkers": ["T", "00"]}}},
"step": {"transformation": {"type_change": "int"}},
"longitude": {"transformation": {"cyclic": [0, 360]}},
"number": {"transformation": {"type_change": "int"}}
"number": {"transformation": {"type_change": "int"}},
}
self.config = {"class": "od", "expver": "0001", "levtype": "sfc", "step": 11}
self.fdbdatacube = FDBDatacube(self.config, axis_options=self.options)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_slice_date_range_fdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ def setup_method(self, method):
},
"date": {"transformation": {"merge": {"with": "time", "linkers": ["T", "00"]}}},
"step": {"transformation": {"type_change": "int"}},
"number": {"transformation": {"type_change": "int"}}
"number": {"transformation": {"type_change": "int"}},
}
self.config = {"class": "od", "expver": "0001", "levtype": "sfc", "step": 0}
self.fdbdatacube = FDBDatacube(self.config, axis_options=self.options)
self.slicer = HullSlicer()
self.API = Polytope(datacube=self.fdbdatacube, engine=self.slicer, axis_options=self.options)

# Testing different shapes
# @pytest.mark.skip(reason="can't install fdb branch on CI")
@pytest.mark.fdb
def test_fdb_datacube(self):
request = Request(
Select("step", [0]),
Expand Down

0 comments on commit da2044d

Please sign in to comment.