-
Notifications
You must be signed in to change notification settings - Fork 0
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: Update metadata to include HLS granule ID and links to Fmask layer #48
Conversation
edc7f5a
to
c1048b3
Compare
setup.py
Outdated
@@ -9,8 +9,10 @@ | |||
"dataclasses", | |||
"geojson", | |||
"importlib_resources", | |||
"lxml==3.6.0", | |||
"numpy~=1.19.0", | |||
"lxml==5.3.0", |
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 just noticed there was a PR to pin this but I don't know the backstory,
#34
It looks like there (shockingly) is a wheel for lxml==5.3.0
for py36
, so maybe this is fine? I'm guessing the pin to an older version was to match the old version of the C library in our container. Maybe we can bump this to use the binary and then drop the libxml2-dev
and libxslt1-dev
?
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 recall an issue with this a while back due to my having used a later version like you're doing here, but @sharkinsspatial pointed out the reason we need to pin to the older version, so perhaps he can refresh my memory here.
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.
Thanks @chuckwondo for the review and calling this out!
I reverted the change here after figuring out how to do indentation of XML without bumping versions. Python>=3.9 and lxml>=4.5
have an indent()
function but our dependencies are too old for those!
I found a way to do it using xml.dom.minidom
thanks to Google
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.
This looks great, and good eyes on finding the various spelling errors! Just check w/Sean regarding the lxml dependency version.
setup.py
Outdated
@@ -9,8 +9,10 @@ | |||
"dataclasses", | |||
"geojson", | |||
"importlib_resources", | |||
"lxml==3.6.0", | |||
"numpy~=1.19.0", | |||
"lxml==5.3.0", |
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 recall an issue with this a while back due to my having used a later version like you're doing here, but @sharkinsspatial pointed out the reason we need to pin to the older version, so perhaps he can refresh my memory here.
Thanks for the review @chuckwondo! I found that PR reverting the I found a way to have our XML nicely indented with our existing code dependencies. It's not as nice as Would you mind re-reviewing with this change added? |
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.
Thanks Chris!
Description
This PR adds two extra pieces of metadata to the HLS-VI product metadata and addresses these tickets,
How I did it
<AdditionalAttribute>
sectionOnlineAccessURLs
section. The links are well formed so we can simply construct the links based on the original HLS product granule ID.Granule.xsd
to define theInput_GranuleUR
and used theGranuleUR
type as its type because both granule IDs should share the same validation (e.g., 1 <= length <= 250)lxml
to latest so we can use the indent method and have an easier time installing it locally. This should also resolve 5 of the 7 Dependabot changes.How you can test it
I updated the test "golden (meta)data" with these two metadata additions. You can run the metadata tests to compare against these by running,
(the
-k metadata
scopes the run to just the metadata tests, which is nice because the other ones involve a lot of computation so take longer)