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

Fix timeseries import #177

Merged
merged 2 commits into from
Jan 31, 2025
Merged

Conversation

mnlevy1981
Copy link
Collaborator

@mnlevy1981 mnlevy1981 commented Jan 31, 2025

Description of changes:

Fixes #175

import timeseries fails when invoking cupid-timeseries, but is valid when running /path/to/CUPiD/cupid/run_timeseries.py so I added a try / except block. There were imports of cupid.util in run_diagnostics.py and clean.py that I changed to this new structure.

  • Have you followed the guidelines in our Contributor's Guide?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Have you made sure that the pre-commit checks passed (#8 in Adding Notebooks Guide)?
  • Have you hidden the code cells (#8 in Adding Notebooks Guide) in your notebook?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you successfully tested your changes locally?
  • Have you moved any observational data that you are using to /glade/campaign/cesm/development/cross-wg/diagnostic_framework/CUPiD_obs_data and ensured that it follows this format within that directory: COMPONENT/analysis_datasets/RESOLUTION/PROCESSED_FIELD_TYPE?

If running run_timeseries.py from the command line, we want to import
timeseries and util; if running cupid-timeseries, these imports will fail with
a ModuleNotFoundError exception but we can import cupid.timeseries and
cupid.util
Similar to last commit -- try to import util, but import cupid.util as util if
that fails
@mnlevy1981 mnlevy1981 self-assigned this Jan 31, 2025
Copy link
Collaborator

@dabail10 dabail10 left a comment

Choose a reason for hiding this comment

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

This looks fine.

@mnlevy1981 mnlevy1981 merged commit 7d87a00 into NCAR:main Jan 31, 2025
2 checks passed
@mnlevy1981 mnlevy1981 deleted the fix_timeseries_import branch January 31, 2025 21:01
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.

import timeseries not working
3 participants