Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intake Take2 #233

Merged
merged 2 commits into from
Oct 28, 2024
Merged

Intake Take2 #233

merged 2 commits into from
Oct 28, 2024

Conversation

charles-turner-1
Copy link
Collaborator

@charles-turner-1 charles-turner-1 commented Oct 28, 2024

This branch contains expanded testing to ensure a smooth update to intake take2.

It won't exactly close #153, as it doesn't pin the intake version to >=2.0.0, but it:

  • Relaxed intake version in pyproject.toml to allow for versions greater than 0.7.0, reverting Pin intake=0.7.0 #154.
  • Adds tox environments for dependency configurations which test this package against the various configurations of intake (0.7.0, 2.0.7) & intake esm (no coordinates, coordinates).

There are no indications from any test environments/configurations that intake take2 causes any issues: all tests are passing, with:

  • xfail for test_builders.py::test_parse_access_ncfile[AccessOm2Builder-access-om2/output000/ocean/ocean_grid.nc-expected0-True] when coordinate variable discovery is not enabled in intake-esm
  • All tests passing when coordinate variable discovery is enabled in intake-esm - see below table.
Intake-ESM No Coordinates Intake-ESM w/ Coordinates
Intake 0.7.0 xfails all tests pass
Intake 2.0.7 xfails all tests pass

I haven't added any tox runs to CI, again due to expense of running it (see #232), but I'm now confident that we can reproducibly test against multiple intake versions.

  • This PR shouldn't introduce any package behaviour changes, only changes to allowed dependency versions & expansion of tox testing environments.
    • Since our core dependency intake-esm is currently pinned to 0.7.0, relaxing allowed versions of intake will lead to dependency resolver using intake==0.7.0 anyway,
    • TLDR; this PR should in practice only expand tox environments until intake-esm is updated to allow intake>=0.7.0.

Copy link

codecov bot commented Oct 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.36%. Comparing base (0e6a5ab) to head (860b811).

Additional details and impacted files
@@                   Coverage Diff                   @@
##           187-correctness-checks     #233   +/-   ##
=======================================================
  Coverage                   96.36%   96.36%           
=======================================================
  Files                           9        9           
  Lines                         688      688           
=======================================================
  Hits                          663      663           
  Misses                         25       25           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rbeucher
Copy link
Member

Merging this. It look good and will not introduce any major change.

@rbeucher rbeucher merged commit 22c36c6 into 187-correctness-checks Oct 28, 2024
15 checks passed
@charles-turner-1
Copy link
Collaborator Author

@rbeucher I stacked this onto the branch for #232 - that will need merging too - similarly shouldn't introduce any behaviour changes

@rbeucher rbeucher deleted the 153-take2 branch October 28, 2024 22:09
rbeucher pushed a commit that referenced this pull request Oct 28, 2024
* - Added some optional test dependencies to pyproject.toml to make
  runnings tests easier
- Added tests to make sure taht we are parsing netCDF files as expected
  using intake-esm by comparing against a dataset read in directly with
  xarray (with same additional logic intake-esm uses)
	- All tests passing when coordinate variable discovery enabled
	- test_parsed_ncfile_values_0 failing when coordinate discovery disabled

* Remove redundant breakpoint

* Condensed duplicate tests

* * Added tox config to test migration to 2.0.7
* Added dynamic xfail setting - necessary to ensure that we are correctly determining whether tests should pass or fail based on whether we are using latest intake-esm release or ACCESS-NRI modified version with coord variable detection. Uses a pytest_collection_modifyitems function to create xfails for tests which should fail

Merge 226 editable install (#228)

* Updated the way that the location of the catalog.yaml file is discovered to work in both
editable & regular installations

* Changed ci.yml to run tests in a default, rathe than editable installation

* Updated pyproject.toml & .github/workflows/ci.yl to ensure correct coverage issues  running tests using regular installation rather than editable

* Added explicit test for metadata_template - must have previously been implicitly run

* Changed ox.environ.get('XFAILS', default) from default='' to default=0 to fix integer conversion error if environment variables not specified.

* - Final tox.ini set up, with as sensible factoring as possible
- Relaxed intake version on pyproject.toml to >0.7
- Updated conftest to emit a warning if coordinate discovery is disabled (ie. wrong intake-esm version) and no environment variable is set to inform pytest this is the case

* Removed some unnecessary dependencies from .[test], updated warning call in conftest to use keyword arguments rather than positional, updated comments in test_parse_access_ncfile to be more descriptive

* Added python3.9 to tox.ini

* Removed python3.9 again (not supported by intake-esm)

* Repinned intake to 0.7.0

* Changes xfails explanation to be more terse

* Made _get_xfail() docstr clearer

* Intake Take2 (#233)

* Rebased 153 onto 187

* gelaxed intake version on pyproject.toml to >0.7 (take2) & added tox environments for take2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants