-
Notifications
You must be signed in to change notification settings - Fork 5
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
Update schema references to point to nmdc_materialized_patterns
variant
#887
Open
eecavanna
wants to merge
4
commits into
main
Choose a base branch
from
552-nmdc-runtime-should-use-materalized_pattern-version-of-json-schema
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
e096fc0
Replace misleading schema filename reference in default param value
eecavanna 2436761
Replace obsolete schema filename in Python notebook Markdown prose
eecavanna 1e0e1b2
Replace obsolete schema filename and URL in JSON Validation tutorial
eecavanna 2042c09
Replace hard-coded obsolete file paths with references to CLI args
eecavanna File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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.
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.
are we not doing this using the python package or linkml. @sierra-moxon please weigh in here but we can't just have a dummy path 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.
Thanks—I agree. This was a mistake on my part.
Communicating which schema variant we expect, to the caller
The previous default value here would not work because this repository no longer contains a file at
../../../schema/nmdc.schema.json
.My intention by replacing the default value was to give a hint to the user about which variant of the schema we expect them to provide; i.e. the
nmdc_materialized_patterns.schema.json
variant, not thenmdc.schema.json
variant. The code still won't work, though (neither file exists at the path specified).I'll add a note to the (otherwise empty) docstring, saying that we expect the user to provide the path to the
nmdc_materialized_patterns.schema.json
variant of the schema when they invoke the function.The default value
The Runtime repo no longer contains a schema file whose path we could use as the default value.
Invocations of this function
The only invocation of this function I see (in the repo) is the one right below the function's definition; i.e. this one:
That invocation relies on the function's default values.
The future of this script
Given that this script was already broken (due to the path being nonexistent) before this PR was created...
Do you have a sense for whether anyone uses this script anymore?
It was last updated in 2022 (before I updated the parameter's default value in this PR). I'm guessing someone wrote it to demonstrate something way back when.
Given that it lacked any documentation, maybe they did not expect it to be used by other people (or their future self) or maintained over time.
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.
In the latest commit (i.e. 2042c09), I removed all the obsolete, hard-coded file paths and replaced them with references to CLI arguments. This way, it is the user's responsibility to tell the script where it can find these files.
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'd still like to remove this file from the repo if it's obsolete. That way, we and our successors don't spend time trying to salvage it as the rest of the code base evolves.
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.
cc @turbomam what should we be using instead of the nmdc_materialized_patterns.schema.json