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

Support Metaschema module and constraint string property values #177

Conversation

david-waltermire
Copy link
Contributor

@david-waltermire david-waltermire commented Oct 8, 2024

Committer Notes

Add support for Metaschema module and constraint property values that are generic strings per metaschema-framework/metaschema#27.

All Submissions:

By submitting a pull request, you are agreeing to provide this contribution under the CC0 1.0 Universal public domain dedication.

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 and readme documentation affected by the changes you made?

…any string to be used as a Metaschema property value.
Copy link

coderabbitai bot commented Oct 8, 2024

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

The pull request introduces several changes across multiple files, primarily focusing on updates to GitHub Actions workflows, the addition of new functions in the Metapath library, and modifications to existing classes and methods for improved maintainability and functionality. Key changes include updates to action versions in workflow files, the introduction of new workflows for project automation, and enhancements to function definitions in the Metapath framework, including the registration of new functions and adjustments to existing function signatures.

Changes

File Path Change Summary
.github/workflows/build.yml Updated workflow triggers, action versions, and conditions for CodeQL analysis and website build jobs.
.github/workflows/project.yml Added a new workflow for automating issue addition to a GitHub project.
.github/workflows/release.yml Updated action versions and added a step to create a CNAME file in the website deployment job.
.gitmodules Added a new submodule entry for databind-metaschema/modules.
.lycheeignore Added multiple URLs to ignore for the Lychee tool, including various Jackson libraries and documentation.
CONTRIBUTING.md Expanded contribution guidelines with new sections and clarifications regarding public domain status.
cli-processor/pom.xml Updated parent version to 1.2.0-SNAPSHOT and SCM tag to HEAD.
cli-processor/src/site/site.xml Changed root element from <project> to <site> and updated the namespace.
core/metaschema Updated subproject commit identifier.
core/pom.xml Updated parent version to 1.2.0-SNAPSHOT and SCM tag to HEAD.
core/src/main/java/gov/nist/secauto/metaschema/core/datatype/AbstractDataTypeProvider.java Introduced locking for thread safety and updated library variable.
core/src/main/java/gov/nist/secauto/metaschema/core/datatype/markup/AbstractMarkupString.java Added toText() method to extract plain text from markup.
core/src/main/java/gov/nist/secauto/metaschema/core/datatype/markup/IMarkupString.java Added toText() method to the interface for plain text conversion.
core/src/main/java/gov/nist/secauto/metaschema/core/metapath/ISequence.java Updated flatten method to return a safe stream.
core/src/main/java/gov/nist/secauto/metaschema/core/metapath/StaticContext.java Removed synchronization from getBaseUri() method.
core/src/main/java/gov/nist/secauto/metaschema/core/metapath/cst/StaticFunctionCall.java Changed function field to lazy initialization for deferred computation.
core/src/main/java/gov/nist/secauto/metaschema/core/metapath/cst/StringLiteral.java Simplified removeQuotes method by removing regex matching logic.
core/src/main/java/gov/nist/secauto/metaschema/core/metapath/function/DefaultFunction.java Updated argument type for convertArguments and added getContextItem method.
core/src/main/java/gov/nist/secauto/metaschema/core/metapath/function/FunctionLibrary.java Introduced locking mechanism for thread safety in function registration.
core/src/main/java/gov/nist/secauto/metaschema/core/metapath/function/FunctionService.java Added locking for thread safety in getFunction methods.
core/src/main/java/gov/nist/secauto/metaschema/core/metapath/function/IFunction.java Updated argument type for execute method to allow broader type flexibility.
core/src/main/java/gov/nist/secauto/metaschema/core/metapath/function/InvalidTypeFunctionException.java Added new error constant for function type errors.
core/src/main/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArrayAppend.java Changed SIGNATURE visibility and introduced NAME constant for function name.
core/src/main/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArrayFlatten.java Introduced NAME constant for function name in SIGNATURE.
core/src/main/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArrayGet.java Introduced NAME constant and changed SIGNATURE visibility.
core/src/main/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArrayHead.java Introduced NAME constant for function name in SIGNATURE.
core/src/main/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArrayInsertBefore.java Introduced NAME constant and changed SIGNATURE visibility.
core/src/main/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArrayJoin.java Introduced NAME constant and changed SIGNATURE visibility.
core/src/main/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArrayPut.java Introduced NAME constant and changed SIGNATURE visibility.
core/src/main/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArrayRemove.java Introduced NAME constant and changed SIGNATURE visibility.
core/src/main/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArrayReverse.java Introduced NAME constant and changed SIGNATURE visibility.
core/src/main/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArraySize.java Changed class to final and introduced NAME constant.
core/src/main/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArraySubarray.java Introduced NAME constant and changed SIGNATURE visibility.
core/src/main/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArrayTail.java Introduced NAME constant for function name in SIGNATURE.
core/src/main/java/gov/nist/secauto/metaschema/core/metapath/function/library/DefaultFunctionLibrary.java Registered new functions in the Metapath library.
core/src/main/java/gov/nist/secauto/metaschema/core/metapath/function/library/FnBaseUri.java Introduced NAME constant for function name in SIGNATURE.
core/src/main/java/gov/nist/secauto/metaschema/core/metapath/function/library/FnBoolean.java Introduced NAME constant for function name in SIGNATURE.
core/src/main/java/gov/nist/secauto/metaschema/core/metapath/function/library/FnCompare.java Introduced NAME constant for function name in SIGNATURE.
core/src/main/java/gov/nist/secauto/metaschema/core/metapath/function/library/FnConcat.java Introduced NAME constant for function name and simplified code.
core/src/main/java/gov/nist/secauto/metaschema/core/metapath/function/library/FnContains.java Added new class for fn:contains function implementation.
core/src/main/java/gov/nist/secauto/metaschema/core/metapath/function/library/FnCurrentDateTime.java Added new class for fn:current-dateTime function implementation.
core/src/main/java/gov/nist/secauto/metaschema/core/metapath/function/library/FnData.java Introduced NAME constant for function name in SIGNATURE.
core/src/main/java/gov/nist/secauto/metaschema/core/metapath/function/library/FnDoc.java Introduced NAME constant for function name in SIGNATURE.
core/src/main/java/gov/nist/secauto/metaschema/core/metapath/function/library/FnDocumentAvailable.java Introduced NAME constant for function name in SIGNATURE.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant GitHubActions
    participant ProjectAutomation
    participant MetapathLibrary

    User->>GitHubActions: Trigger build workflow
    GitHubActions->>GitHubActions: Run build-code job
    GitHubActions->>GitHubActions: Run build-website job
    GitHubActions->>ProjectAutomation: Trigger project automation workflow
    ProjectAutomation->>GitHubActions: Add issue to project
    User->>MetapathLibrary: Call new function (e.g., fn:contains)
    MetapathLibrary->>MetapathLibrary: Execute function logic
    MetapathLibrary-->>User: Return result
Loading

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@david-waltermire david-waltermire changed the base branch from main to develop October 8, 2024 17:18
Copy link
Contributor

@aj-stein-gsa aj-stein-gsa left a comment

Choose a reason for hiding this comment

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

🚢 it.

@david-waltermire david-waltermire merged commit b9588a5 into metaschema-framework:develop Oct 8, 2024
@david-waltermire david-waltermire deleted the feature/metaschema-prop-value-string branch October 8, 2024 17:23
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.

2 participants