-
Notifications
You must be signed in to change notification settings - Fork 16
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 / feat: handle building gpkg crosswalk from flowpath-attributes
#138
Conversation
Which version uses which convention? |
2.1.1 uses Everything <2.1.1 seems to use The beta of 2.2 doesnt include |
Re-running jobs on master b.c. I don't think they are failing from what i've added here. |
Opened #139 to track the test failures. Confirmed the additions made here. |
Having chatted with @mikejohnson51 (correct me where i'm wrong), all HF releases See here for an example of the new namespacing. Drop everything up-to and including the |
00650e2
to
a67ad81
Compare
a67ad81
to
a692856
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had one comment on perhaps expanding some on the docstring to clarify what constitutes a "legacy hydrofabric," but this isn't critical and may be tricky given how hydrofabric data and schemas are currently versioned. So I'm good with it as-is.
python/ngen_cal/src/ngen/cal/ngen.py
Outdated
|
||
#Read the calibration specific info | ||
with open(self.realization) as fp: | ||
data = json.load(fp) | ||
self.ngen_realization = NgenRealization(**data) | ||
|
||
@staticmethod | ||
def _is_legacy_gpkg_hydrofabric(hydrofabric: Path) -> bool: | ||
"""Return True if legacy hydrofabric.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be helpful to explain somewhere (i.e., either here, or with a reference here to wherever that is) what constitutes a "legacy hydrofabric." Are we talking about versions prior to v2.0? Versions >= 2.0 but older than the latest? I could make an educated guess, but, even assuming a high probability of correctness right now, that will get harder for someone in the future to do reliably.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice suggestion. Just updated the docstring to better reflect what it means to be legacy.
Co-authored-by: Robert Bartel <[email protected]>
@robertbartel, just addressed your comment. Should be good to go now. Thanks! |
Newer HF versions now use:
flowlines
instead offlowpaths
flowpath-attributes
instead offlowpath_attributes
model-attributes
instead ofmodel_attributes
This just adds support for that.
Additions
flowlines
andflowpath-attributes