Conversation
Using:
jq
ripgrep
uv
And the command:
curl -H "X-SLURM-USER-NAME: gda2" \
-H "X-SLURM-USER-TOKEN: $(cat /dls_sw/apps/zocalo/secrets/slurmrest-gda2.tkn)" \
https://slurm-rest.diamond.ac.uk:8443/openapi/v3 \
| rg --passthru -N '((?:db)?v)0.0.(\d+)_' -r '${1}00$2.' \
| uvx --from=datamodel-code-generator datamodel-codegen --target-python-version=3.12 \
--use-schema-description \
--use-field-description \
--output-model-type=pydantic_v2.BaseModel \
--field-constraints \
--use-double-quotes \
--output models \
--no-use-standard-collections \
&& cp models/v0044.py src/zocalo/util/slurm/models.py
Fields in some models are named 'list'. This conflicts when generating pydantic internal structure using the python building 'list' as a generic container.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #306 +/- ##
==========================================
+ Coverage 76.81% 81.51% +4.70%
==========================================
Files 31 31
Lines 4542 5697 +1155
Branches 324 324
==========================================
+ Hits 3489 4644 +1155
Misses 983 983
Partials 70 70 🚀 New features to boost your workflow:
|
This file contains hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.