This repository has been archived by the owner on Jan 8, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mattprintz
reviewed
Aug 31, 2023
"model_version": "1.0", | ||
}, | ||
"username": "user123", | ||
"timestamp": "2023-08-30T00:00:00", # Example datetime value in ISO format |
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 think we are missing the "model": {},
line here.
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.
We don't actually return the model
aspect for the description endpoints
tds/modules/model/utils.py
Outdated
model = restructure_model_header(model) | ||
|
||
# Rename 'schema' to 'model_schema' if present | ||
if "model_schema" in model["header"]: |
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 check could probably be folded in to the restructure_model_header()
call if that makes sense. I'll put a code suggestion in a different comment.
mattprintz
approved these changes
Aug 31, 2023
Co-authored-by: Matthew Printz <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is in support of DARPA-ASKEM/Model-Representations#56 which requires that various fields be nested under
header
in the AMR.The goal of this PR is to flexibly support this new request while not forcing breakage of all existing AMRs by adding a helper utility to
tds/modules/model/utils.py
calledrestructure_model_header
which checks to see if theheader
exists and if not, performs the requisite nesting.Until this is merged, all TA1 produced AMRs will be rejected by TDS since they now have the
header
.