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

Update unit tests #609

Merged
merged 39 commits into from
Nov 16, 2023
Merged

Update unit tests #609

merged 39 commits into from
Nov 16, 2023

Conversation

jhkennedy
Copy link
Collaborator

@jhkennedy jhkennedy commented Nov 6, 2023

This PR:

  • updates CircleCI config to test across multiple Python versions (3.9-3.12)

    • Note: only runs coveralls on Python 3.12
  • removes unnecessary imports in cli/__main__.py

  • Ensures all type hints are compatible with Python 3.9

  • updates loading entrypoints for Python 3.12, fixes Need to upgrade importlib.metadata.entry_points for Python 3.12 #607

  • re-orders environment.yml so that packages are in the correct section and listed alphabetically

  • ❗ marks all tests in test_temporal_interpolate.py as "long" to prevent them from running in CI due to test/test_temporal_interpolate.py fail due to an HTTP 301 Moved Permanently Error #611

  • Updates sentineleof to version 9 or greater, fixes [BUG] Sentinel-1 ESA Orbit Availability and Rate Limiting #610

    • this means orbits will be downloaded from ESA CDSE, which will require credentials
    • sentineleof also now returns paths instead of strings, so _get_acq_time_from_gunw_id and tests were updated accordingly
  • Adds an _ensure_orbit_credentials function in prepFromGUNW.py to ensure ESA CDSE credentials are in ~/.netrc or provided via environment variables

    Note: For this one, I wanted to put this in models/credentials.py so all credentials were handled in the same place, but everything there is related to acquiring weather models so it didn't make sense to stuff it in there without a significant refactor.

  • drops hyp3lib in favor of sentineleof as get_orb was the only thing being used from hyp3lib

  • Adds a setup_from_env function to models/credentials.py which will pull all credentials needed for acquiring weather model data from environment variables and ensure the correct config file is written. This makes setting up credentials in CI pipelines significantly easier.

    Note: This could also have a command line interface, but I couldn't decide if it was worth it.

@jhkennedy jhkennedy marked this pull request as ready for review November 11, 2023 07:32
@jhkennedy
Copy link
Collaborator Author

jhkennedy commented Nov 11, 2023

@dbekaert the checks will pass once the ESA_USERNAME and ESA_PASSWORD environment variables are added to CircleCI so that orbits can be downloaded.

I also decided to not use GitHub Actions as CircleCI handles forks better. You can remove the repository secrets I had you add earlier.

environment.yml Outdated Show resolved Hide resolved
Copy link
Collaborator

@cmarshak cmarshak left a comment

Choose a reason for hiding this comment

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

I think once that's integrated it resolves the other issue, too.

Feeding all of this orbit junk at once.

CHANGELOG.md Outdated Show resolved Hide resolved
jhkennedy and others added 3 commits November 14, 2023 12:19
Copy link
Collaborator

@jlmaurer jlmaurer left a comment

Choose a reason for hiding this comment

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

LGTM

@jhkennedy jhkennedy merged commit ffd399d into dbekaert:dev Nov 16, 2023
7 of 8 checks passed
@jhkennedy jhkennedy deleted the update_unit_tests branch November 16, 2023 07:01
@dbekaert
Copy link
Owner

@dbekaert the checks will pass once the ESA_USERNAME and ESA_PASSWORD environment variables are added to CircleCI so that orbits can be downloaded.

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants