-
Thibaud Vantalon authored
Extract the classification schemes out of sampleearth.landcover, where they lived as Python tables, into commented TOML that a domain expert can review in a diff. - data/ two schemes: se-landcover-list (70 classes) and se-cover-facets (82 components, 18 tag axes), each a directory of TOML - models.py dataclasses; the hierarchy, crosswalk and LCCS dichotomous derivation are methods on the scheme, not functions over a global table, so two schemes can be loaded at once - loader.py tomllib + every validator the Python tables used to enforce. Rules stay in code: moving the tables out was about reviewable diffs, not about letting a typo reach a GeoPackage - export.py JSON bundle, JSON Schema and per-table CSV. The bundle carries the LCCS decision tree generated from the same data, so a rendering of it cannot say something derive_dichotomous would not No runtime dependencies: tomllib is stdlib from 3.11, which is what lets the QGIS plugin vendor this the way it vendors sampleearth_core. 92 tests, including a parity suite proving the extraction lost nothing against the sampleearth tables it came from. That suite is deleted once sampleearth consumes this package instead of its own copy.
Thibaud Vantalon authoredExtract the classification schemes out of sampleearth.landcover, where they lived as Python tables, into commented TOML that a domain expert can review in a diff. - data/ two schemes: se-landcover-list (70 classes) and se-cover-facets (82 components, 18 tag axes), each a directory of TOML - models.py dataclasses; the hierarchy, crosswalk and LCCS dichotomous derivation are methods on the scheme, not functions over a global table, so two schemes can be loaded at once - loader.py tomllib + every validator the Python tables used to enforce. Rules stay in code: moving the tables out was about reviewable diffs, not about letting a typo reach a GeoPackage - export.py JSON bundle, JSON Schema and per-table CSV. The bundle carries the LCCS decision tree generated from the same data, so a rendering of it cannot say something derive_dichotomous would not No runtime dependencies: tomllib is stdlib from 3.11, which is what lets the QGIS plugin vendor this the way it vendors sampleearth_core. 92 tests, including a parity suite proving the extraction lost nothing against the sampleearth tables it came from. That suite is deleted once sampleearth consumes this package instead of its own copy.
This project is licensed under the MIT License.
Learn more
Loading