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

Minor updates to data models #60

Merged
merged 7 commits into from
Jan 9, 2025

Conversation

davemfish
Copy link
Collaborator

@davemfish davemfish commented Jan 9, 2025

Based on feedback, we have a few changes to attributes:

mediatype: removed, not useful
name: removed, not useful, redundant with path and too easily confused with title
raster_size: changed from list to dict to allow "width" and "height" labels
metadata_version: changed to geometamaker_version to be more accurate

All these changes are made backwards-compatible with respect to describing a dataset with an existing yml document. When a pre-existing document is loaded, incompatible attributes are removed/replaced with warnings issued.

validate will issue ValidationErrors on a document with the old attributes.

Fixes #58

@davemfish davemfish requested a review from phargogh January 9, 2025 16:59
@davemfish davemfish marked this pull request as draft January 9, 2025 17:00
@davemfish
Copy link
Collaborator Author

Whoops, one more thing before this is ready @phargogh

@davemfish davemfish marked this pull request as ready for review January 9, 2025 17:45
@davemfish davemfish requested review from phargogh and removed request for phargogh January 9, 2025 17:45
Copy link
Member

@phargogh phargogh left a comment

Choose a reason for hiding this comment

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

These all make sense to me, thanks @davemfish !

@@ -28,7 +28,7 @@
'https',
]

DT_FMT = '%Y-%m-%d %H:%M:%S'
DT_FMT = '%Y-%m-%d %H:%M:%S %Z'
Copy link
Member

Choose a reason for hiding this comment

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

Nice!

Comment on lines +276 to +277
raster_size={'width': info['raster_size'][0],
'height': info['raster_size'][1]})
Copy link
Member

Choose a reason for hiding this comment

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

I also like that this could be expanded to include the number of bands or any other attributes that expression the dimensionality of the dataset in the future, should it become necessary.

@phargogh phargogh merged commit cbd923d into natcap:main Jan 9, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

minor updates to the metadata resource model
2 participants