Repository navigation
Fix missing packages and unneeded imports at runtime - #129
Merged
Merged
Conversation
See Issue #128. xarray and pandas are of course still required for any associated functionality (e.g. exporting Datasets and Dataframes, respectively), but util.py will no longer crash on import if they are absent.
pont-us
marked this pull request as draft
November 24, 2026 15:04
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #129 +/- ##
==========================================
+ Coverage 98.41% 98.45% +0.03%
==========================================
Files 6 6
Lines 759 776 +17
Branches 95 99 +4
==========================================
+ Hits 747 764 +17
Misses 8 8
Partials 4 4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Both pandas.DataFrame and pandas.core.frame.DataFrame are now supported.
xarray is now imported locally as and when needed. See Issue #128.
See Issue #128. If a generated EOAP produces xarray Datasets, xcengine must ensure that the zarr and netcdf4 packages are in the environment so that they can be exported.
Related to Issue #128.
- Add test coverage for new zarr and netcdf4 package inclusion. - Improve said package inclusion by detecting more variants of xarray dependencies and ignoring non-string dependency specs.
pont-us
marked this pull request as ready for review
November 27, 2026 11:38
Hneuschmidt
requested changes
Dec 1, 2026
Hneuschmidt
left a comment
Collaborator
There was a problem hiding this comment.
Besides the yaml/pyyaml question, LGTM.
| ) | ||
|
|
||
| LOGGER.info("Adding any additional required packages to environment.") | ||
| extra_packages = ["yaml"] # always needed for parameter data files |
Collaborator
Member
Author
There was a problem hiding this comment.
Thank you, you're quite correct. Fixed in commit c85acbe.
Bug found in review in PR #129. Built packages were getting the yaml conda package (which provides the LibYAML C library) rather than the intended pyyaml package (which provides the Python yaml import package). Fixed in this commit.
Hneuschmidt
approved these changes
Dec 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes Issue #128.