Skip to content

Commit

Permalink
Compare tests (#83)
Browse files Browse the repository at this point in the history
* WIP

* --amend

* WIP

* Don't check unlimited dims for xarray-save-direct-vs-ncdata testing.

* More WIP: replace dataclasses, partial datatype testing.

* Factor out variable comparison; add show-n-diffs control.

* Complete testing for variables and groups.

* Fix test.

* Add pytest-mock to testing dependencies.

* Add additional testcases.

* Rename + reorganise calling interfaces: variable-compare (still) not public.

* Move dataset-difference into utils (public).

* Move variable-differences testing into own testfile.

* Revise comparison API; make variable-differences public.

* Fix order of presentation of utils routines.

* Add change note

* Re-enable iris testdata checks.
  • Loading branch information
pp-mo authored Jun 25, 2024
1 parent 12d5ad9 commit db868ec
Show file tree
Hide file tree
Showing 17 changed files with 1,464 additions and 624 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:

- name: "Install dependencies"
run: |
conda install --yes "numpy<2" pytest iris xarray filelock requests
conda install --yes "numpy<2" pytest pytest-mock iris xarray filelock requests
- name: "Install *latest* Iris"
run: |
Expand Down
3 changes: 3 additions & 0 deletions docs/change_log.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ Unreleased
^^^^^^^^^^
TODO: highlights

* `@pp-mo`_ dataset comparison routines now a public utility.
(`PR#70 <https://github.com/pp-mo/ncdata/pull/70>`_).

* `@pp-mo`_ initial Sphinx documentation
(`PR#76 <https://github.com/pp-mo/ncdata/pull/76>`_).

Expand Down
7 changes: 6 additions & 1 deletion lib/ncdata/utils/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
"""General user utility functions."""

from ._compare_nc_datasets import dataset_differences, variable_differences
from ._save_errors import save_errors

__all__ = ["save_errors"]
__all__ = [
"save_errors",
"dataset_differences",
"variable_differences",
]
Loading

0 comments on commit db868ec

Please sign in to comment.