Rjsf typing is slow (#1663)

* updated rjsf packages w/ burnettk

* use performance improvement branch of validate js v8 w/ burnettk

* Update spiffworkflow-backend/bin/task_data_to_python_variables.py

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

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
Co-authored-by: Kevin Burnett <18027+burnettk@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
jasquat 2024-06-03 19:19:15 -04:00 committed by GitHub
parent 6310864922
commit 59d19bb457
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 64 additions and 39 deletions

View File

@ -0,0 +1,26 @@
import json
import sys
from spiffworkflow_backend import create_app
def main() -> None:
app = create_app()
task_data_json_file = sys.argv[1]
python_variable_file = f"{task_data_json_file}_output.py"
with app.app_context():
contents = None
with open(task_data_json_file) as file:
contents = json.load(file)
with open(python_variable_file, "w") as file:
for key, value in contents.items():
file.write(f"{key} = {repr(value)}\n")
if len(sys.argv) < 2:
raise Exception("A task data json file must be provided")
if __name__ == "__main__":
main()

View File

@ -22,10 +22,10 @@
"@mui/material": "^5.15.18",
"@prefresh/vite": "^2.4.5",
"@react-icons/all-files": "^4.1.0",
"@rjsf/core": "5.18.3",
"@rjsf/mui": "5.18.3",
"@rjsf/utils": "5.18.3",
"@rjsf/validator-ajv8": "5.0.0",
"@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",
"@tanstack/react-query": "^5.40.0",
"@tanstack/react-query-devtools": "^5.40.0",
"@testing-library/jest-dom": "^6.4.2",
@ -4910,9 +4910,9 @@
}
},
"node_modules/@rjsf/core": {
"version": "5.18.3",
"resolved": "https://registry.npmjs.org/@rjsf/core/-/core-5.18.3.tgz",
"integrity": "sha512-HVqqoVzcjYX1BUCqHm7iUjBoVx1UDud1KP6bJ5drtOOvHChfKEbMUt2hWJcuXIlmNPuw2lRxETtcuRbEM2wsRA==",
"version": "5.18.4",
"resolved": "https://registry.npmjs.org/@rjsf/core/-/core-5.18.4.tgz",
"integrity": "sha512-OUPC+l44X1geYT9sSsmQC2pakvFWCQB+5Iy/ITfLMJq3MIjJn0gakCwYHXMMBGUAKM1SSMIyKWyCazt3kY9fhg==",
"dependencies": {
"lodash": "^4.17.21",
"lodash-es": "^4.17.21",
@ -4929,9 +4929,9 @@
}
},
"node_modules/@rjsf/mui": {
"version": "5.18.3",
"resolved": "https://registry.npmjs.org/@rjsf/mui/-/mui-5.18.3.tgz",
"integrity": "sha512-zcudsSECpm3hSTEjWsRLnrT5IMzG4Q3/muBaYtdlapzTaK0Mb3ktEPyXN+iZ6NjxZQTwH7aYn1vo/msbend4ww==",
"version": "5.18.4",
"resolved": "https://registry.npmjs.org/@rjsf/mui/-/mui-5.18.4.tgz",
"integrity": "sha512-SDKBcp/LOCdb8Rn4f4mBiEV8M+FCFQWK8KB4ymyzqjB5/2sVf5rw9u7o84SSXmdnQKt4SAztQf3Sd8tLhEzvPg==",
"engines": {
"node": ">=14"
},
@ -4946,9 +4946,9 @@
}
},
"node_modules/@rjsf/utils": {
"version": "5.18.3",
"resolved": "https://registry.npmjs.org/@rjsf/utils/-/utils-5.18.3.tgz",
"integrity": "sha512-0TzjAKAlqXSCneVnHhcL3gAr4DlIPgwzkFdNEI4A+LFjLFlECPah2o3RhEgvqJnUXFviDGF1dqhkxa/Pr59ajw==",
"version": "5.18.4",
"resolved": "https://registry.npmjs.org/@rjsf/utils/-/utils-5.18.4.tgz",
"integrity": "sha512-svLMk5aW6q3JQRYVTJradFc9tLeQ1vX5/k6fPwxf+08eweqPbINq7aokLBSStUNr8FfYgThTl8IfehLoVP2dvw==",
"dependencies": {
"json-schema-merge-allof": "^0.8.1",
"jsonpointer": "^5.0.1",
@ -4964,20 +4964,20 @@
}
},
"node_modules/@rjsf/validator-ajv8": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/@rjsf/validator-ajv8/-/validator-ajv8-5.0.0.tgz",
"integrity": "sha512-4/ct1DIruO+n+At5vdSwgu6BOdWP5Q2bh4m8LgwOv8wERvkoCkV9m+BX4cy6e+VdcoKvBcyrmIvnwZYy/RBNFw==",
"version": "5.18.4",
"resolved": "git+ssh://git@github.com/sartography/rjsf-validator-ajv8-test.git#431ff4439aabf62a2aaced4e71f4791108d563d5",
"license": "Apache-2.0",
"dependencies": {
"ajv": "^8.11.0",
"ajv": "^8.12.0",
"ajv-formats": "^2.1.1",
"lodash": "^4.17.15",
"lodash-es": "^4.17.15"
"lodash": "^4.17.21",
"lodash-es": "^4.17.21"
},
"engines": {
"node": ">=14"
},
"peerDependencies": {
"@rjsf/utils": "^5.0.0-beta.16"
"@rjsf/utils": "^5.18.x"
}
},
"node_modules/@rollup/rollup-android-arm-eabi": {
@ -28929,9 +28929,9 @@
"integrity": "sha512-Oy8rmScVrVxWZVOpEF57ovlnhpZ8CCPlnIIumVcV9nFdiSIrus99+Lw78ekXyGvVDlIsFJbSfmSovJUhCWYV3w=="
},
"@rjsf/core": {
"version": "5.18.3",
"resolved": "https://registry.npmjs.org/@rjsf/core/-/core-5.18.3.tgz",
"integrity": "sha512-HVqqoVzcjYX1BUCqHm7iUjBoVx1UDud1KP6bJ5drtOOvHChfKEbMUt2hWJcuXIlmNPuw2lRxETtcuRbEM2wsRA==",
"version": "5.18.4",
"resolved": "https://registry.npmjs.org/@rjsf/core/-/core-5.18.4.tgz",
"integrity": "sha512-OUPC+l44X1geYT9sSsmQC2pakvFWCQB+5Iy/ITfLMJq3MIjJn0gakCwYHXMMBGUAKM1SSMIyKWyCazt3kY9fhg==",
"requires": {
"lodash": "^4.17.21",
"lodash-es": "^4.17.21",
@ -28941,15 +28941,15 @@
}
},
"@rjsf/mui": {
"version": "5.18.3",
"resolved": "https://registry.npmjs.org/@rjsf/mui/-/mui-5.18.3.tgz",
"integrity": "sha512-zcudsSECpm3hSTEjWsRLnrT5IMzG4Q3/muBaYtdlapzTaK0Mb3ktEPyXN+iZ6NjxZQTwH7aYn1vo/msbend4ww==",
"version": "5.18.4",
"resolved": "https://registry.npmjs.org/@rjsf/mui/-/mui-5.18.4.tgz",
"integrity": "sha512-SDKBcp/LOCdb8Rn4f4mBiEV8M+FCFQWK8KB4ymyzqjB5/2sVf5rw9u7o84SSXmdnQKt4SAztQf3Sd8tLhEzvPg==",
"requires": {}
},
"@rjsf/utils": {
"version": "5.18.3",
"resolved": "https://registry.npmjs.org/@rjsf/utils/-/utils-5.18.3.tgz",
"integrity": "sha512-0TzjAKAlqXSCneVnHhcL3gAr4DlIPgwzkFdNEI4A+LFjLFlECPah2o3RhEgvqJnUXFviDGF1dqhkxa/Pr59ajw==",
"version": "5.18.4",
"resolved": "https://registry.npmjs.org/@rjsf/utils/-/utils-5.18.4.tgz",
"integrity": "sha512-svLMk5aW6q3JQRYVTJradFc9tLeQ1vX5/k6fPwxf+08eweqPbINq7aokLBSStUNr8FfYgThTl8IfehLoVP2dvw==",
"requires": {
"json-schema-merge-allof": "^0.8.1",
"jsonpointer": "^5.0.1",
@ -28959,14 +28959,13 @@
}
},
"@rjsf/validator-ajv8": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/@rjsf/validator-ajv8/-/validator-ajv8-5.0.0.tgz",
"integrity": "sha512-4/ct1DIruO+n+At5vdSwgu6BOdWP5Q2bh4m8LgwOv8wERvkoCkV9m+BX4cy6e+VdcoKvBcyrmIvnwZYy/RBNFw==",
"version": "git+ssh://git@github.com/sartography/rjsf-validator-ajv8-test.git#431ff4439aabf62a2aaced4e71f4791108d563d5",
"from": "@rjsf/validator-ajv8@github:sartography/rjsf-validator-ajv8-test#peformance-improvement-w-build",
"requires": {
"ajv": "^8.11.0",
"ajv": "^8.12.0",
"ajv-formats": "^2.1.1",
"lodash": "^4.17.15",
"lodash-es": "^4.17.15"
"lodash": "^4.17.21",
"lodash-es": "^4.17.21"
}
},
"@rollup/rollup-android-arm-eabi": {

View File

@ -18,10 +18,10 @@
"@mui/material": "^5.15.18",
"@prefresh/vite": "^2.4.5",
"@react-icons/all-files": "^4.1.0",
"@rjsf/core": "5.18.3",
"@rjsf/mui": "5.18.3",
"@rjsf/utils": "5.18.3",
"@rjsf/validator-ajv8": "5.0.0",
"@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",
"@tanstack/react-query": "^5.40.0",
"@tanstack/react-query-devtools": "^5.40.0",
"@testing-library/jest-dom": "^6.4.2",