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

Feature/code cleanup and API documentation #374

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

Conversation

david-waltermire
Copy link
Collaborator

@david-waltermire david-waltermire commented Jun 26, 2024

Committer Notes

Added many missing Javadoc comments.

Some minor code cleanup to make the code more readable.

This PR builds on the following PRs, which should be merged before this PR.

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 and others added 12 commits May 28, 2024 14:20
…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.
- Support for map construction.
- Added support for maps in function call, postfix and unary lookups.
- Added support and unit tests for the following Metapath functions:
  - map:get
  - map:merge
  - map:entry
  - map:size
  - map:keys
  - map:contains
  - map:find
  - map:put
  - map:remove
- Added missing characteristics on a number of existing Metapath functions.
- Cleaned up a bunch of PMD warnings.
…function signatures now instead of the Java class name.
… use. Improved abstract CLI validation commands to provide more options for model detection.
@david-waltermire david-waltermire force-pushed the feature/code-cleanup-and-api-documentation branch 2 times, most recently from 9865492 to 61447eb Compare July 3, 2024 13:06
@david-waltermire david-waltermire force-pushed the feature/code-cleanup-and-api-documentation branch from 2d2d0e1 to 3418071 Compare July 8, 2024 17:21
…d to distinguish provided model bindings.

- Added support for capturing parsed location information in bound objects. This will be useful for producing context for validation results.
- Fixed bugs causing the ordering of generated classes to be chaotic. Also fixed bugs causing binding configurations to match based on minor URI differences caused by inconsistent behavior between file and path URI productions.
- Updated Metaschema module binding to incorporate latest module changes.
- Added support for exposing parse locations in validation results.
- Added support for producing Static Analysis Results Interchange Format (SARIF) results based on schema and constraint validation results.
  - Added SARIF CLI output option to validate command.
  - Added support for including rules and artifact information in SARIF results. SARIF files now work on commonly available viewers.
  - Added constraint formal-name and description to SARIF output, allowing human readers to better understand why the result was produced.
  - Added a GUID to SARIF output for each rule.
- Adjusted constraint result production to allow for pass results to be produced, which supports producing SARIF result that include both pass and fail statuses using an API-level configuration.
- Added methods to handle making URIs relative to another URI.
- Ensured proper handling of Metapath errors during validation. Resolves usnistgov/oscal-cli#292
- Fixed compile and PMD warnings.
- Added some Javadocs.
- Cleaned up ISource implementations, and ensured that URI-based sources are properly cached.
- Added many Javadoc comments.
- Lightly refactored some code and created javadocs to improve readability and reduce complexity.
- Cleaned up stream closure to ensure that streams are properly closed.
- Cleaned up use of some interfaces that were duplicated.
@david-waltermire david-waltermire force-pushed the feature/code-cleanup-and-api-documentation branch from 3418071 to 228067a Compare July 28, 2024 14:53
@david-waltermire david-waltermire marked this pull request as ready for review July 29, 2024 21:14
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