-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Add workflow test schema #17128
Closed
Closed
Add workflow test schema #17128
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mvdbeek
force-pushed
the
add_test_schema
branch
from
December 4, 2023 15:02
d13c928
to
ebe412f
Compare
mvdbeek
force-pushed
the
add_test_schema
branch
2 times, most recently
from
December 5, 2023 19:06
1e6e734
to
5d1a63d
Compare
mvdbeek
force-pushed
the
add_test_schema
branch
2 times, most recently
from
December 7, 2023 12:05
f7e758a
to
37f908f
Compare
jmchilton
reviewed
Dec 8, 2023
lib/galaxy/tool_util/xsd/galaxy.xsd
Outdated
<xs:enumeration value="yes"/> | ||
<xs:enumeration value="no"/> | ||
</xs:restriction> | ||
<xs:union> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nifty!
To generate dataclasses in generated/galaxy from xsd: ``` pip install 'xsdata[cli]' cd lib/galaxy/tool_util/schemas xsdata ../xsd/galaxy.xsd --unnest-classes --kw-only --docstring-style Accessible --ignore-patterns --max-line-length 10000 ``` Fix up tool test schema for workflow particularities (and xsdata odditites) ``` python postprocess_schema.py ``` To generate json schema (requires pydantic 2.0 to deal with recursive data classes): ``` python test_file_from_xsd.py > test_file_schema.json ``` To validate a workflow test file with check-jsonschema ``` check-jsonschema --traceback-mode full --schemafile test_file_schema.json sra-manifest-to-concatenated-fastqs-tests.yml ``` TODO: - jobs is not modeled - element / element_tests needs work - special handling for primitive workflow parameter output values - de-RST-ify description fields
Pydantic's dataclass does not complain about optional attributes before required attributes, so we can drop `--kw-only` from the `xsdata` call (which is now `xsdata ../xsd/galaxy.xsd --unnest-classes --output pydantic --docstring-style Accessible --ignore-patterns --max-line-length 10000 && python postprocess_schema.py && python test_file_from_xsd.py > test_file_schema.json && cd ~/src/galaxy && make format && cd -`)
…Collection.elements instead
mvdbeek
force-pushed
the
add_test_schema
branch
from
January 11, 2024 11:36
0c1f0f4
to
41c8b5c
Compare
9 tasks
Much improved in #18884 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To generate dataclasses in generated/galaxy from xsd:
Fix up tool test schema for workflow particularities (and xsdata
odditites)
To generate json schema (requires pydantic 2.0 to deal with recursive
data classes):
To validate a workflow test file with check-jsonschema
TODO:
How to test the changes?
(Select all options that apply)
License