diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4ec385b8..d1a621e4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -110,7 +110,7 @@ jobs: python -c "import xradar; print(xradar.version.version)" - name: Test with pytest run: | - pytest -n auto --dist loadfile --verbose --durations=15 --cov-report xml:coverage_notebooks.xml --cov=xradar --pyargs examples/notebooks + pytest -n auto --dist loadfile --verbose --durations=15 --cov-report xml:coverage_notebook.xml --cov=xradar --pyargs examples/notebooks - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: diff --git a/docs/history.md b/docs/history.md index 813626e6..4d37690f 100644 --- a/docs/history.md +++ b/docs/history.md @@ -5,6 +5,7 @@ * MNT: Update GitHub actions, address DeprecationWarnings ({pull}`153`) by [@kmuehlbauer](https://github.com/kmuehlbauer). * MNT: restructure odim.py/gamic.py, add test_odim.py/test_gamic.py ({pull}`154`) by [@kmuehlbauer](https://github.com/kmuehlbauer). * MNT: use CODECOV token ({pull}`155`) by [@kmuehlbauer](https://github.com/kmuehlbauer). +* MNT: fix path for notebook coverage ({pull}`157`) by [@kmuehlbauer](https://github.com/kmuehlbauer). ## 0.4.3 (2024-02-24) diff --git a/examples/notebooks/conftest.py b/examples/notebooks/conftest.py index 24f5ae27..c21755ab 100644 --- a/examples/notebooks/conftest.py +++ b/examples/notebooks/conftest.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # Copyright (c) 2019-2022, wradlib developers. -# Copyright (c) 2022, openradar developers. +# Copyright (c) 2022-2024, openradar developers. # Distributed under the MIT License. See LICENSE.txt for more info. import os @@ -45,7 +45,8 @@ def from_parent(cls, parent, name): return cls(parent=parent, name=name) def runtest(self): - cur_dir = os.path.dirname(self.path) + # use current path to get coverage working + cur_dir = os.getcwd() # See https://bugs.python.org/issue37373 if (