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

STY: streamline cdf tests, NEP 29 update July 2022 #126

Merged
merged 12 commits into from
Sep 28, 2022

Conversation

jklenzing
Copy link
Member

@jklenzing jklenzing commented Aug 9, 2022

Description

  • Improves use_cdfib syntax to reduce number of skipped tests.
    • Check if instruments use cdf before deploying test_load_cdflib.
    • Reduce the number of skipped tests since netCDF instruments are excluded before parametrize is run.
    • Remove clean_level tests for test_load_cdflib since those are post-processing and tested elsewhere. Since cdflib is the slower option, this speeds things up a bit.
  • Bumps minimum NEP29 version to 1.20
  • Adds xarray cap for incompatibilities with numpy 1.20
  • Uses verbose pytest in Github Actions to get feedback on skipped tests

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Tested via pytest.

Test Configuration

  • Python 3.8.11
  • Mac OS X Big Sur
  • The usual tests at Github Actions

Checklist:

  • Make sure you are merging into the develop (not main) branch
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • Add a note to CHANGELOG.md, summarizing the changes (part of previous pull, pysatCDF)
  • Update zenodo.json file for new code contributors

docs/installation.rst Outdated Show resolved Hide resolved
docs/installation.rst Outdated Show resolved Hide resolved
Co-authored-by: Russell Stoneback <github@stoneris.com>
@rstoneback
Copy link
Collaborator

what about version limits in setup.cfg?

@jklenzing
Copy link
Member Author

what about version limits in setup.cfg?

I thought these were not supposed to go in setup.cfg. @aburrell?

@rstoneback
Copy link
Collaborator

I've been seeing xarray 2020.06.0 on systems, like the testing here, that I was expecting would have a previous xarray version given the dependence on pysat.

I just checked pysat. There are no version restrictions within the setup so default pysat installations are installing the newest xarray which is incompatible 😿

@aburrell
Copy link
Member

I thought these were not supposed to go in setup.cfg

That is correct, it's an antipattern.

@jklenzing
Copy link
Member Author

So if we install from pip, how does it know which versions will work?

requirements.txt Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
docs/installation.rst Outdated Show resolved Hide resolved
docs/installation.rst Outdated Show resolved Hide resolved
docs/installation.rst Outdated Show resolved Hide resolved
requirements.txt Outdated Show resolved Hide resolved
@jklenzing
Copy link
Member Author

Documentation tests fixed in #122. Note that the xarray cap is only in the NEP29 tests, since it does not support numpy 1.20.

if: ${{ matrix.numpy_ver != 'latest'}}
run: |
pip install --no-binary :numpy: numpy==${{ matrix.numpy_ver }}
pip install "xarray<2022.06"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

xarray limit only required for NEP29 case.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we still need this restriction?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need this for the NEP29 case since the old numpy is not compatible with the latest xarray.

@jklenzing jklenzing merged commit e8d18d3 into develop Sep 28, 2022
@jklenzing jklenzing deleted the sty/streamline_cdf_tests branch February 27, 2023 16:28
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.

None yet

3 participants