Skip to content

Commit c0398c4

Browse files
authored
Add more tests (#3)
* add flash clustering tests * add pyproj to test dependencies * update deps again * add filter tests * hey look, a bug fix, just from improving code coverage! * same fix as in wx4stg/lmatools@468469f * no prune filter test * use correct python version * test gridding * add geosys and eqc tests * radar and satellite * test plot feature * reorganize, maybe this makes more sense? * init matplotlib tests * fix plotting if no metpy * run image tests * pytest-mpl dep * that doesn't work the way I thought it did... * add plot_feature mpl tests * artifact matplotlib, maybe? * -_- * >:/ * 3rd = charm * if 3rd is charm, 4th is perfect.. right? * add county lines back to the images * inset_view test * this feels like a duplicate of the base plot.. * test the static part of the interactivity, anyway. * more deps!
1 parent 7895870 commit c0398c4

76 files changed

Lines changed: 551 additions & 20 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/python-package.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
python-version: ["3.9", "3.10", "3.11"]
19+
python-version: ["3.9", "3.10", "3.11", "3.12"]
2020

2121
steps:
2222
- uses: actions/checkout@v3
@@ -29,15 +29,21 @@ jobs:
2929
"${SHELL}" <(curl -L micro.mamba.pm/install.sh)
3030
eval "$(micromamba shell hook --shell bash)"
3131
micromamba activate base
32-
micromamba install pytest-cov xarray netcdf4 -c conda-forge
32+
micromamba install pytest-cov pytest-mpl xarray netcdf4 pandas numpy scikit-learn scipy pyproj cartopy metpy ipywidgets python=${{ matrix.python-version }} -c conda-forge
3333
python -m pip install .
3434
- name: Test with pytest
3535
run: |
3636
eval "$(micromamba shell hook --shell bash)"
3737
micromamba activate base
38-
coverage run --source=pyxlma -m pytest tests/
38+
coverage run --source=pyxlma -m pytest --mpl --mpl-baseline-path=tests/truth/images/ --mpl-generate-summary=html,json --mpl-results-path=tests/mpl-results/ tests/
3939
coverage xml
4040
- name: Upload coverage reports to Codecov
4141
uses: codecov/codecov-action@v3
4242
env:
43-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
43+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
44+
- name: Upload matplotlib test results
45+
if: always()
46+
uses: actions/upload-artifact@v3
47+
with:
48+
name: matplotlib-results
49+
path: tests/mpl-results/

README.md

Lines changed: 32 additions & 0 deletions
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)