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

Allow file or URI arguments to metaschema-cli #298

Merged
merged 7 commits into from
Feb 6, 2024

Conversation

aj-stein-nist
Copy link
Collaborator

@aj-stein-nist aj-stein-nist commented Jan 24, 2024

Committer Notes

Closes #297.

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Do all automated CI/CD checks pass?
  • Have you squashed any non-relevant commits and commit messages? [instructions] Leaving for final review, to be squashed or rebased on merge.

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you included examples of how to use your new feature(s)? Tests sufficiently demonstrate the updated usage of the tool with relevant CLI arguments and parameters.
  • Have you updated all website](https://pages.nist.gov/metaschema) and readme documentation affected by the changes you made? Changes to the website can be made in the website/content directory of your branch.

@aj-stein-nist aj-stein-nist self-assigned this Jan 24, 2024
@aj-stein-nist aj-stein-nist changed the base branch from main to develop January 24, 2024 19:58
aj-stein-nist and others added 2 commits January 25, 2024 22:55
Currently, we have the metaschema-cli only support local file paths for
arguments for content inputs and outputs. This loader will support the
use of MetaschemaLoader.load() with URIs and unify local file path and
URL access (primarily https://, http://) with the same command line
tooling for similar remote and local access.

Co-Authored-By: David Waltermire <[email protected]>
This PR adjusts the commands and supporting databind classes and ports
them to use URIs. The commands will use the new UriUtils class and the
toUri() function to use a remote URI supported as a URL and load the
model, schema, or target file. If a local file, it will convert the file
path to valid URI.

Integration tests have been added to validate this functionality works
with the update CLI commands.
@aj-stein-nist aj-stein-nist marked this pull request as ready for review January 26, 2024 03:55
aj-stein-nist and others added 3 commits January 26, 2024 12:31
Per discussion with @david-waltermire, update the exception handling and
associated error messages to identify if a bad domain for a remote URI
is used or a valid domain is used but a bad URL.

Co-authored-by: David Waltermire <[email protected]>
@aj-stein-nist
Copy link
Collaborator Author

@david-waltermire integrated all changes from ad-hoc pairing and review. This is ready for final review and possible merge if you are happy with it.

Copy link
Collaborator

@david-waltermire david-waltermire left a comment

Choose a reason for hiding this comment

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

This is awesome. Thanks so much!

@david-waltermire david-waltermire added this pull request to the merge queue Feb 6, 2024
Merged via the queue into usnistgov:develop with commit 9360d97 Feb 6, 2024
1 check 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.

Support files or URIs for metaschema-cli arguments
2 participants