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

Rjsf typing is slow #1663

Merged
merged 3 commits into from
Jun 3, 2024
Merged

Rjsf typing is slow #1663

merged 3 commits into from
Jun 3, 2024

Conversation

jasquat
Copy link
Contributor

@jasquat jasquat commented Jun 3, 2024

Supports #1565

Uses branch from PR rjsf-team/react-jsonschema-form#4204 to help with performance improvements in rjsf.

Summary by CodeRabbit

  • New Features

    • Introduced a script to convert task data from JSON to Python variables.
  • Bug Fixes

    • Added error handling for missing command-line arguments in the task data conversion script.
  • Chores

    • Updated dependency versions for @rjsf/core, @rjsf/mui, and @rjsf/utils to 5.18.4.
    • Introduced a custom version for @rjsf/validator-ajv8 from a specific GitHub repository.

Copy link
Contributor

coderabbitai bot commented Jun 3, 2024

Walkthrough

Walkthrough

The recent updates to the spiffworkflow project include enhancements to the backend and frontend components. The backend script task_data_to_python_variables.py now features a main() function and improved error handling for missing command-line arguments. On the frontend, the package.json file has been updated to use newer versions of several @rjsf libraries, and a custom version of @rjsf/validator-ajv8 from a specific GitHub repository.

Changes

File/Path Summary
spiffworkflow-backend/bin/task_data_to_python_variables.py Added a main() function and error handling for missing command-line arguments.
spiffworkflow-frontend/package.json Updated versions of @rjsf/core, @rjsf/mui, and @rjsf/utils to 5.18.4. Introduced custom version for @rjsf/validator-ajv8.

Sequence Diagram(s) (Beta)

sequenceDiagram
    participant User
    participant Script as task_data_to_python_variables.py
    participant JSONFile as JSON File
    participant PythonFile as Python File

    User->>Script: Execute script with JSON file path
    Script->>JSONFile: Read task data
    JSONFile-->>Script: Return task data
    Script->>PythonFile: Write Python variables
    PythonFile-->>User: Output Python file with variables
Loading

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 as 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.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration 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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 6310864 and a08061d.

Files ignored due to path filters (1)
  • spiffworkflow-frontend/package-lock.json is excluded by !**/package-lock.json
Files selected for processing (2)
  • spiffworkflow-backend/bin/task_data_to_python_variables.py (1 hunks)
  • spiffworkflow-frontend/package.json (1 hunks)
Additional context used
Biome
Additional comments not posted (3)
spiffworkflow-backend/bin/task_data_to_python_variables.py (2)

7-20: The main() function implementation looks good and adheres to the expected functionality.


25-26: Correct use of the Python idiom for script execution.

spiffworkflow-frontend/package.json (1)

21-23: Updated @rjsf/* dependencies to 5.18.4 to address performance issues.

spiffworkflow-backend/bin/task_data_to_python_variables.py Outdated Show resolved Hide resolved
"@rjsf/core": "^5.18.4",
"@rjsf/mui": "^5.18.4",
"@rjsf/utils": "^5.18.4",
"@rjsf/validator-ajv8": "github:sartography/rjsf-validator-ajv8-test#peformance-improvement-w-build",
Copy link
Contributor

@coderabbitai coderabbitai bot Jun 3, 2024

Choose a reason for hiding this comment

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

Tip

Codebase Verification

The repository sartography/rjsf-validator-ajv8-test does not exist, and no relevant repositories were found under the sartography organization or through a broader search. Please verify the repository name or consider using a different source for the @rjsf/validator-ajv8 dependency.

Analysis chain

Using a custom GitHub repository version for @rjsf/validator-ajv8. Ensure to monitor the stability and updates of this repository.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Check the last commit date of the custom repository to ensure it's actively maintained.

# Test: Fetch the latest commit date from the repository. Expect: Recent commit date.
gh repo view sartography/rjsf-validator-ajv8-test --json updatedAt

Length of output: 178



Script:

#!/bin/bash
# Description: List all repositories under the `sartography` organization to verify the correct repository name.

# Test: Fetch the list of repositories from the `sartography` organization. Expect: List of repositories.
gh repo list sartography --json name

Length of output: 933



Script:

#!/bin/bash
# Description: Search for repositories related to `rjsf-validator-ajv8` across all organizations.

# Test: Fetch the list of repositories matching `rjsf-validator-ajv8` across all organizations. Expect: List of repositories.
gh search repos "rjsf-validator-ajv8" --json name,owner

Length of output: 214

Copy link
Contributor

Choose a reason for hiding this comment

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

it was private, dogg. now public.

Copy link
Contributor

Choose a reason for hiding this comment

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

@burnettk, thanks for the update! Now that the repository sartography/rjsf-validator-ajv8-test is public, the dependency should be accessible as specified. If there's anything else you need to ensure everything is set up correctly, feel free to let me know!

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between a08061d and 8b511d2.

Files selected for processing (1)
  • spiffworkflow-backend/bin/task_data_to_python_variables.py (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • spiffworkflow-backend/bin/task_data_to_python_variables.py

@burnettk burnettk merged commit 59d19bb into main Jun 3, 2024
23 checks passed
@burnettk burnettk deleted the rjsf-typing-is-slow branch June 3, 2024 23:19
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