-
Notifications
You must be signed in to change notification settings - Fork 76
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
base: release/3.15.0
Are you sure you want to change the base?
Conversation
@@ -505,29 +504,5 @@ def test_model_specs_serialize(self): | |||
f'{error}') | |||
|
|||
|
|||
class SpecUtilsTests(unittest.TestCase): |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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.
* } | ||
* license: { | ||
* title: string | ||
* url: string |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this 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 |
There was a problem hiding this comment.
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)?
There was a problem hiding this comment.
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.
@claire-simpson and @emilyanndavis , I added a small addition to write |
The
invest run
CLI now usesgeometamaker
to generate metadata documents for all files listed in a model'sOUTPUT_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