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

Metapath array support and general maintenance #363

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

david-waltermire
Copy link
Collaborator

Committer Notes

This PR adds the following new features:

  • A slight improvement to the release build allowing conditional deployment of web and maven artifacts with workflow_dispatch.
  • Added support for namespace qualified names, which are now used for functions, definitions, and definition references. Cleaned up namespace handling throughout. This is a foundation for supporting models that reference models in other namespaces for XML use cases.
  • Completed basic support for Metapath arrays
    • Support for array construction.
    • Implemented array postfix and unary lookups.
    • Added support for the following Metapath functions:
      • array:get
      • array:put
      • array:append
      • array:subarray
      • array:remove
      • array:insert-before
      • array:join
      • array:head
      • array:tail
      • array:reverse
      • array:flatten
  • Added the 'metaschema-cli metapath list-functions' command to list supported functions.
  • Fixed Profile resolution subcommand returns no error with invalid JSON and YAML profiles oscal-cli#216 by ensuring that the document node returns the root node when getValue is called.

This PR also completes the following maintenance tasks:

  • Normalized line endings which were inconsistent around use of lf vs crlf. Added a .gitattributes to help with this in the future. This should result in a more consistent experience on non-Windows platforms.
  • Cleaned up ISequence implementations, moving getFirstItem to be a method member. Added a utility function to convert a sequence into an array member.
  • Added a better means to collect the metaschema-related CLI commands for reuse.
  • Fixed spotbugs issues
  • Cleaned up some Javadocs.

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?
  • Have you squashed any non-relevant commits and commit messages? [instructions]
  • Do all automated CI/CD checks pass?

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)?
  • 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.

@david-waltermire david-waltermire changed the title Feature metapath array support and general maintenance Metapath array support and general maintenance May 28, 2024
…aces and to simplify and align implementations.
* Completed code to support Metapath array construction.
* Implemented array postfix and unary lookups.
* Cleaned up ISequence implementations, moving getFirstItem to be a method member. Added a utility function to convert a sequence into an array member.
* Added support for the following Metapath functions:
  - array:get
  - array:put
  - array:append
  - array:subarray
  - array:remove
  - array:insert-before
  - array:join
  - array:head
  - array:tail
  - array:reverse
  - array:flatten
* Fixed spotbugs null check warnings
* Cleaned up some Javadocs.
* Incorporated changes based on CodeRabbit review.
* normalized line endings
* Added initial implementation of the 'metaschema-cli metapath list-functions' command.
* Added a better means to collect the metaschema-related CLI commands for reuse.
… returns the root node when getValue is called.
@david-waltermire
Copy link
Collaborator Author

This should be merged using "rebase and merge" to avoid merge conflicts in downstreams.

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.

1 participant