-
Notifications
You must be signed in to change notification settings - Fork 2
add basic support for tool resource metadata schemas #55
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
base: main
Are you sure you want to change the base?
Conversation
| if len(creator_order_numbers) != len(set(creator_order_numbers)): | ||
| raise ValueError("creator_order values must be unique") | ||
| #if len(creator_order_numbers) != len(set(creator_order_numbers)): | ||
| # raise ValueError("creator_order values must be unique") |
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 validation was failing for a single resource with many creators. I just removed this validation check to allow the metadata to be written to disk.
pkdash
left a comment
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.
Does support for the web app resource have any effect on hsclient?
hsmodels/schemas/fields.py
Outdated
| gt=-90, | ||
| lt=90, | ||
| gte=-90, | ||
| lt3=90, |
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.
typo?
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.
yep, fixing.
Yes, it means that web app resources can be retrieved and updated by hsclient now. Though a user will only be able to access the core metadata fields. You have me thinking more deeply about this now... I think if a user updates metadata fields with this schema, the other fields would be removed when saving. We don't necessarily need to make this release available to hsclient at this time though. |
This accounts for validation issues happening with metadata extraction because ToolResource (Web App Connector) was not supported by hsmodels.
I intentionally left out the Web App Connector specific fields to implement this quickly and those fields are not being used currently. These changes recognize the ToolResource type and treat it like any other resource.
There were just under 300 resources failing validation either here in hsmodels or in the resulting cloud native schemas. I went through each issue and loosened up the validation based on those resources.