natcap / geometamaker

https://geometamaker.readthedocs.io/en/latest/
Apache License 2.0
2 stars 1 forks source link

Major refactor to use dataclasses that loosely follow DataPackage - Resource models #24

Closed davemfish closed 1 month ago

davemfish commented 1 month ago

This PR moves us away from Metadata Control Files and pygeometa and towards defining our own data models to represent metadata for vectors, rasters, tables, and compressed files.

The parent metadata model is models.Resource. It loosely follows https://datapackage.org/standard/data-resource/, but also includes some other properties that we liked from MCF.

Defining our own models means we can include just we want, in a structure that makes sense to us. For example,

Is there anything missing from the new models?

@phargogh I'm using a dataclass feature (keyword-only args) only available since Python 3.10. It doesn't look like there's an easy workaround, so before trying to make this compatible with early versions, I'm submitting as-is and we can discuss if we think it's critical to support earlier.