From da2044d7461fb7a15db0ddf91d59735bfbcbfedd Mon Sep 17 00:00:00 2001 From: Mathilde Leuridan Date: Wed, 13 Dec 2023 19:27:50 +0100 Subject: [PATCH] mark fdb tests --- .github/workflows/ci.yaml | 2 +- performance/fdb_slice_many_numbers_timeseries.py | 2 -- pyproject.toml | 3 ++- tests/test_fdb_datacube.py | 4 ++-- tests/test_incomplete_tree_fdb.py | 4 ++-- tests/test_regular_grid.py | 2 +- tests/test_shapes.py | 4 ++-- tests/test_slice_date_range_fdb.py | 4 ++-- 8 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 017d4bf0e..56b8e7ee0 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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 diff --git a/performance/fdb_slice_many_numbers_timeseries.py b/performance/fdb_slice_many_numbers_timeseries.py index 46fd0abe4..d7975d6da 100644 --- a/performance/fdb_slice_many_numbers_timeseries.py +++ b/performance/fdb_slice_many_numbers_timeseries.py @@ -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 @@ -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]), diff --git a/pyproject.toml b/pyproject.toml index 28f4ec600..ced7b03b7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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\"')",] \ No newline at end of file +markers = ["internet: downloads test data from the internet (deselect with '-m \"not internet\"')", + "fdb: test which uses fdb (deselect with '-m \"not fdb\"')",] \ No newline at end of file diff --git a/tests/test_fdb_datacube.py b/tests/test_fdb_datacube.py index 733988ac5..5c4f3aa4b 100644 --- a/tests/test_fdb_datacube.py +++ b/tests/test_fdb_datacube.py @@ -21,7 +21,7 @@ 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) @@ -29,7 +29,7 @@ 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") + @pytest.mark.fdb def test_fdb_datacube(self): request = Request( Select("step", [0]), diff --git a/tests/test_incomplete_tree_fdb.py b/tests/test_incomplete_tree_fdb.py index 28c357465..d41146611 100644 --- a/tests/test_incomplete_tree_fdb.py +++ b/tests/test_incomplete_tree_fdb.py @@ -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]), @@ -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]), diff --git a/tests/test_regular_grid.py b/tests/test_regular_grid.py index 9e3fb7986..b6fd81930 100644 --- a/tests/test_regular_grid.py +++ b/tests/test_regular_grid.py @@ -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]), diff --git a/tests/test_shapes.py b/tests/test_shapes.py index a04c7bfd5..a46410974 100644 --- a/tests/test_shapes.py +++ b/tests/test_shapes.py @@ -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": { @@ -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) diff --git a/tests/test_slice_date_range_fdb.py b/tests/test_slice_date_range_fdb.py index 56d2d5290..2ecccb7ee 100644 --- a/tests/test_slice_date_range_fdb.py +++ b/tests/test_slice_date_range_fdb.py @@ -18,7 +18,7 @@ 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) @@ -26,7 +26,7 @@ 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") + @pytest.mark.fdb def test_fdb_datacube(self): request = Request( Select("step", [0]),