Skip to content

Feature: new model for keywords - #149

Merged
megannissel merged 10 commits into
natcap:mainfrom
davemfish:feature/119-controlled-keywords
Sep 1, 2026
Merged

megannissel merged 10 commits into
natcap:mainfrom
davemfish:feature/119-controlled-keywords

Conversation

@davemfish

@davemfish davemfish commented Aug 28, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #119

The new Keyword model follows loosely the attributes suggested here: https://github.com/ESIPFed/science-on-schema.org/blob/main/guides/Dataset.md#keywords-as-definedterm

For backwards-compatibility, the keywords attribute can still be assigned a sequence of strings. I updated it to a set to get the benefit of avoiding duplicates. And items can either be strings or the new Keyword type.

Also fixes #148

@davemfish
davemfish force-pushed the feature/119-controlled-keywords branch from 4f865e2 to 7a3b73f Compare August 31, 2026 20:36

# Migrate metadata that pre-dates CoordinateReferenceSystem
if e['type'] == 'model_type' and e['loc'] == ('spatial', 'crs'):
if e['loc'] == ('spatial', 'crs') and e['type'] == 'model_type':

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I just re-ordered these for readability.



class ResourceAttributeTests(unittest.TestCase):
"""Tests for attributes shared by all resource types."""

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Most of these tests were just moved to a different class for organizational purposes. The "keywords" tests were updated/added.

@davemfish
davemfish marked this pull request as ready for review September 1, 2026 13:03

@megannissel megannissel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Found two typos (aside from the BOUNDARIES one you already fixed!), but otherwise this looks great, Dave!

Comment thread README.md Outdated

#### CSV or other pandas-readable table
```python
import geometamker

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
import geometamker
import geometamaker

Comment thread README.md Outdated
@@ -152,7 +184,7 @@ and/or `license` information.
A profile can be saved to a configuration file so that it will be re-used
everytime you use `geometamaker`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not part of your current edits, but "everytime" should be two words

Suggested change
everytime you use `geometamaker`.
every time you use `geometamaker`.

@davemfish

Copy link
Copy Markdown
Collaborator Author

Found two typos (aside from the BOUNDARIES one you already fixed!), but otherwise this looks great, Dave!

Thank you, fixed!

@megannissel megannissel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, @davemfish!

@megannissel
megannissel merged commit 7262f3f into natcap:main Sep 1, 2026
61 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.

Missing entry in HISTORY.rst group keywords by vocabulary to enable validation

2 participants