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

Feature: GeoMetaMaker integration #1753

Open
wants to merge 38 commits into
base: release/3.15.0
Choose a base branch
from

Conversation

davemfish
Copy link
Contributor

@davemfish davemfish commented Jan 28, 2025

The invest run CLI now uses geometamaker to generate metadata documents for all files listed in a model's OUTPUT_SPEC.

The Workbench includes a new feature to allow users to configure geometamaker with a "user profile".

There's a corresponding User's Guide PR which we could merge first: natcap/invest.users-guide#157

Fixes #1662

Checklist

  • Updated HISTORY.rst and link to any relevant issue (if these changes are user-facing)
  • Updated the user's guide (if needed)
  • Tested the Workbench UI (if relevant)

@@ -505,29 +504,5 @@ def test_model_specs_serialize(self):
f'{error}')


class SpecUtilsTests(unittest.TestCase):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I moved this set of tests to test_spec_utils

self.assertEqual(colnames, [])

def test_get_invest_models(self):
"""UI server: get_invest_models endpoint."""
test_client = ui_server.app.test_client()
response = test_client.get(f'{ROUTE_PREFIX}/models')
self.assertEqual(response.status_code, 200)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had a bug in my new test -- a typo in the endpoint path -- that resulted in a cryptic error, so I decided to assert the 200 response in all these tests.

@davemfish davemfish marked this pull request as ready for review February 6, 2025 20:45
* }
* license: {
* title: string
* url: string
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like in other places url is actually called path

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, not ideal. geometamaker is following the DataPackage schema, which uses path. But url is more meaningful so that's why the Workbench components are using it.

Copy link
Contributor

@claire-simpson claire-simpson left a comment

Choose a reason for hiding this comment

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

This looks fantastic! I was also able to try this out in the workbench and CLI and everything worked as expected (including that the metadata was recreated each time the model was run even with the same inputs/params, which is great).

in the output workspace after running a model.
</p>
<p>
Open a YAML file in a text editor to read the metadata. It includes
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be worth mentioning in this info panel that users can also edit the metadata in a text editor (and give an example of why they might wish to do so)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea, for now I only changed the sentence to
Open a YAML file in a text editor to read the metadata and even add to it.

Maybe we'll get more feedback at some point and possibly have some other documentation to point to. For now I don't want to distract too much from just giving people the context they need to fill out the form in the Workbench.

@davemfish
Copy link
Contributor Author

@claire-simpson and @emilyanndavis , I added a small addition to write keywords into the metadata docs. These changes are in d97435e and 6901e34. Sorry that wasn't included from the beginning!

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.

2 participants