-
Notifications
You must be signed in to change notification settings - Fork 14
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
perform flattening as necessary in test suite #130
perform flattening as necessary in test suite #130
Conversation
* fix way xarray open granules that have as a time unit * fix pylint * change function to use original function if can parse only change units if we can not parse * make xarray override into its own function * add test for override_decode_cf_datetime function * disable pyline one line instead of global * Update podaac/subsetter/subset.py Co-authored-by: Frank Greguska <[email protected]>
…s with tempo data
…ction in multiple places to prevent errors with tempo data
* Add variable leading slash flexibility * Add tests back to test file * changelog added and updated * Update podaac/subsetter/subset.py Co-authored-by: Frank Greguska <[email protected]> * update Syntax * resolve conflict Co-authored-by: nlensse1 <[email protected]> Co-authored-by: Frank Greguska <[email protected]>
# Conflicts: # podaac/subsetter/subset.py
# Conflicts: # podaac/subsetter/subset.py # tests/test_subset.py
@danielfromearth thank you for the contribution! I think your approach makes sense. Just a couple housekeeping items: It looks like you targeted the I've merged the two branches together now so I'll accept it into |
…datasets (#135) * Update tests to use parameterized pytest. Some tests failing on new TEMPO test dataset * Replace / in all var names if the dataset is grouped * perform flattening as necessary in test suite (#130) * move methods for flattening netcdf and hdf group structures to separate module * feature/PODAAC-5065 (#129) * fix way xarray open granules that have as a time unit * fix pylint * change function to use original function if can parse only change units if we can not parse * make xarray override into its own function * add test for override_decode_cf_datetime function * disable pyline one line instead of global * Update podaac/subsetter/subset.py Co-authored-by: Frank Greguska <[email protected]> * add missing parameter to docstring * typo in docstring * extract netcdf opening procedure from beginning of `subset() into a new function * update tests to use netcdf opening wrapper function, to prevent errors with tempo data * /version 2.3.0-alpha.5 * update `test_specified_variables()` to use netcdf opening wrapper function in multiple places to prevent errors with tempo data * cosmetic * clean up comment and use 'decode_times'=True for test * feature/issue 126 (#131) * Add variable leading slash flexibility * Add tests back to test file * changelog added and updated * Update podaac/subsetter/subset.py Co-authored-by: Frank Greguska <[email protected]> * update Syntax * resolve conflict Co-authored-by: nlensse1 <[email protected]> Co-authored-by: Frank Greguska <[email protected]> * /version 2.3.0-alpha.6 * Update build-pipeline.yml * /version 2.3.0-alpha.7 * Merge changes from origin/develop * Merge changes from issues/127 Co-authored-by: sliu008 <[email protected]> Co-authored-by: Frank Greguska <[email protected]> Co-authored-by: l2ss-py bot <[email protected]> Co-authored-by: Nick Lenssen <[email protected]> Co-authored-by: nlensse1 <[email protected]> * Run verification on issue branches * Updated changelog * add module docstring * fix import statements * fix import statements * Fix tests Co-authored-by: Daniel Kaufman <[email protected]> Co-authored-by: sliu008 <[email protected]> Co-authored-by: l2ss-py bot <[email protected]> Co-authored-by: Nick Lenssen <[email protected]> Co-authored-by: nlensse1 <[email protected]> Co-authored-by: danielfromearth <[email protected]>
Github Issue: #127
Description
Summarize the ticket here
This change addresses the flattening of groups, to ensure
subset
andcompute_coordinate_variable_names
work on flattened groups in the same manner in the test suite.Overview of work done
Summarize the work you did
Encapsulated the opening of netcdf files (and group flattening) into a new function (
subset.open_as_nc_dataset()
)and used that function throughout the test suite. The group flattening functions were also moved to a separate module for organization purposes.Overview of verification done
Summarize the testing and verification you've done. This includes unit tests or testing with specific data
Ran the test suites
test_subset.py
andtest_run_subsetter.py
locally, and checked which passed. Note that thetest_get_time_variable_name()
function is failing for TEMPO NO2 example data, but it seems to be because of the time units rather than an issue with the group structure (because it fails on a call toxr.open_dataset()
when decoding times).Overview of integration done
Explain how this change was integration tested. Provide screenshots or logs if appropriate. An example of this would be a local Harmony deployment.
PR checklist:
See Pull Request Review Checklist for pointers on reviewing this pull request