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

Update image metadata for v2 #30

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

tcnichol
Copy link

To test this branch, use this branch of pyclowder:

https://github.com/clowder-framework/pyclowder/tree/59-change-context-type-for-v2

Also, use environment variable CLOWDER_VERSION=2.0

Then this should work with clowder v2. The method for generating metadata has changed.

@tcnichol tcnichol self-assigned this Feb 16, 2023
@tcnichol tcnichol linked an issue Feb 16, 2023 that may be closed by this pull request
"agent": {
"@type": "cat:extractor",
"extractor_id": host + "/api/extractors/ncsa.image.metadata"
if float(clowder_version) >= 2.0:
Copy link
Member

@robkooper robkooper Feb 20, 2023

Choose a reason for hiding this comment

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

would it make sense to use the same function here? I assume the self.get_metadata returns the same object? same for #29. If leverage of that, we don't need the CLOWDER_VERSION above either.

Copy link
Author

Choose a reason for hiding this comment

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

Fixed for both pull requests. You are right - the method will work either way and then there's no need to check clowder version here, it'll be done on the pyclowder side.

Copy link
Author

Choose a reason for hiding this comment

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

For the metadata and v1, this branch of pyclowder:

clowder-framework/pyclowder#60

Allows the context to be passed to the get_metadata so that the method can be used for both instead of this call.

no need for explicit metadata construction with either version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

image metadata compatible with clowder v2 update metadata extractors in extractors core
3 participants