Skip to content

Regenerate Slurm models for API v0.0.44#306

Merged
ndevenish merged 4 commits into
mainfrom
slurm_44
Jun 10, 2026
Merged

Regenerate Slurm models for API v0.0.44#306
ndevenish merged 4 commits into
mainfrom
slurm_44

Conversation

@ndevenish

@ndevenish ndevenish commented Jun 10, 2026

Copy link
Copy Markdown
Contributor
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

    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

codecov Bot commented Jun 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 81.51%. Comparing base (59b71cc) to head (d667783).

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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ndevenish
ndevenish merged commit 44c1d0a into main Jun 10, 2026
11 checks passed
@ndevenish
ndevenish deleted the slurm_44 branch June 10, 2026 14:26
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.

1 participant