Skip to content

Move to md-models 0.3.0 and mdmodels 0.4.0 - #105

Merged
haeussma merged 2 commits into
mainfrom
chore/mdmodels-0.3
Oct 11, 2026
Merged

haeussma merged 2 commits into
mainfrom
chore/mdmodels-0.3

Conversation

@haeussma

@haeussma haeussma commented Oct 11, 2026 •

Copy link
Copy Markdown
Member

Moves PyEnzyme to mdmodels 0.4.0 (mdmodels-core 0.3) and regenerates the v2 model with md-models 0.3.0.

Depends on EnzymeML/enzymeml-specifications#34. The specs submodule points at that PR's commit (9775809). If EnzymeML/enzymeml-specifications#34 is squash- or rebase-merged, update the submodule to the merged commit before merging this.

Changes

What changes for users (from md-models 0.3.0)

  • Pydantic now enforces Pattern constraints, so values that never matched the spec are rejected on load.
  • JSON-LD:
    • every field is mapped;
    • arrays are ordered @lists;
    • Identifier fields are literals;
    • @id, @type and @context are read back from documents.

Tested

  • uv run pytest: 121 passed, including the network tests; three runs in a row are stable.
  • All four "version": "2" files in tests/ and examples/ load.
  • ruff 0.16.10 on pyenzyme/ and tests/ passes.

Not included: the fetcher changes from #104.

🤖 Generated with Claude Code


This change is Reviewable

- Require mdmodels >=0.4.0,<0.5 (mdmodels-core 0.3).
- Point the specs submodule at enzymeml-specifications#34 (relaxed version
  pattern, vessel_id no longer mapped to schema:identifier).
- Regenerate pyenzyme/versions/v2.py with
  `md-models convert -t python-pydantic -O astropy`.
- New documents now say "version": "2.0" (the spec default); update the
  composer fixtures. Existing "2" documents still load.
- SBML annotations now carry every mapped field, so the PEtab reference
  model is regenerated. rdflib gives the new blank nodes random IDs and
  order, so the test ignores both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
py-enzyme Ready Ready Preview Oct 11, 2026 7:59pm UTC

Follow enzymeml-specifications#34, which bumps the document version default
to 2.1. Existing "2" and "2.0" documents still load unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@haeussma
haeussma merged commit 6d48e61 into main Oct 11, 2026
8 checks passed

This branch was successfully deployed

1 active deployment
Preview — 8a8a9067 Deployed Oct 11, 2026 by vercel[bot]
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