pymetadata 0.8.2__tar.gz → 0.9.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pymetadata-0.8.2 → pymetadata-0.9.0}/.bumpversion.toml +1 -1
- {pymetadata-0.8.2 → pymetadata-0.9.0}/.github/workflows/ci-cd.yml +2 -2
- {pymetadata-0.8.2 → pymetadata-0.9.0}/.github/workflows/docs.yml +1 -1
- {pymetadata-0.8.2 → pymetadata-0.9.0}/.github/workflows/ty.yml +1 -1
- {pymetadata-0.8.2 → pymetadata-0.9.0}/.pre-commit-config.yaml +2 -2
- {pymetadata-0.8.2 → pymetadata-0.9.0}/CITATION.cff +2 -2
- {pymetadata-0.8.2 → pymetadata-0.9.0}/CLAUDE.md +21 -2
- {pymetadata-0.8.2 → pymetadata-0.9.0}/PKG-INFO +7 -6
- {pymetadata-0.8.2 → pymetadata-0.9.0}/README.md +4 -4
- {pymetadata-0.8.2 → pymetadata-0.9.0}/docs/index.md +4 -4
- {pymetadata-0.8.2 → pymetadata-0.9.0}/docs/installation.md +17 -1
- {pymetadata-0.8.2 → pymetadata-0.9.0}/docs/omex.md +30 -4
- {pymetadata-0.8.2 → pymetadata-0.9.0}/examples/omex/biomodels_omex/create_omex.py +9 -5
- {pymetadata-0.8.2 → pymetadata-0.9.0}/pyproject.toml +4 -1
- pymetadata-0.9.0/release-notes/0.8.3.md +18 -0
- pymetadata-0.9.0/release-notes/0.9.0.md +41 -0
- pymetadata-0.9.0/scripts/omex_timing.py +82 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/src/pymetadata/__init__.py +1 -1
- pymetadata-0.9.0/src/pymetadata/_core_bridge.py +546 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/src/pymetadata/omex.py +423 -87
- pymetadata-0.9.0/tests/test_core_bridge.py +533 -0
- pymetadata-0.9.0/tests/test_omex_core.py +1193 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/uv.lock +562 -478
- pymetadata-0.8.2/examples/omex/biomodels_omex/MODEL2402290004.4_pymetadata.omex +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/.github/CODEOWNERS +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/.github/dependabot.yml +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/.github/pull_request_template.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/.github/rulesets/apply.sh +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/.github/rulesets/develop.json +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/.github/rulesets/main.json +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/.github/rulesets/tags.json +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/.github/workflows/ruff.yml +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/.gitignore +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/.python-version +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/.ruff.toml +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/.zenodo.json +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/LICENSE +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/docs/README.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/docs/annotations.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/docs/api/cache.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/docs/api/console.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/docs/api/core.annotation.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/docs/api/core.creator.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/docs/api/core.miriam.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/docs/api/core.xref.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/docs/api/index.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/docs/api/log.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/docs/api/omex.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/docs/api/ontologies.term.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/docs/api/webservices.chebi.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/docs/api/webservices.ols.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/docs/api/webservices.registry.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/docs/api/webservices.unichem.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/docs/api/webservices.uniprot.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/docs/api/webservices.webservice.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/docs/development.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/docs/images/HARMONY2026_slides.png +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/docs/images/favicon/about.txt +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/docs/images/favicon/android-chrome-192x192.png +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/docs/images/favicon/android-chrome-512x512.png +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/docs/images/favicon/apple-touch-icon.png +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/docs/images/favicon/favicon-16x16.png +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/docs/images/favicon/favicon-32x32.png +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/docs/images/favicon/favicon.ico +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/docs/images/favicon/favicon_io.zip +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/docs/images/favicon/pymetadata-100x100-300dpi.png +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/docs/images/favicon/site.webmanifest +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/docs/robots.txt +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/examples/annotation.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/examples/cache_path.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/examples/omex/biomodels_omex/files/BioModelsMetadata_MODEL2402290004.csv +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/examples/omex/biomodels_omex/files/EndoAcuteBZ1.m +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/examples/omex/biomodels_omex/files/EndoAcuteBZ2.m +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/examples/omex/biomodels_omex/files/EndoAcuteBZ3.m +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/examples/omex/biomodels_omex/files/EndoChronicBZ.m +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/examples/omex/biomodels_omex/files/EndoChronicRZ1.m +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/examples/omex/biomodels_omex/files/EndoChronicRZ2.m +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/examples/omex/biomodels_omex/files/EndoNZ.m +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/examples/omex/biomodels_omex/files/POM253.mat +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/examples/omex/biomodels_omex/files/PlotAPCaTTaAcuteAndChronic.m +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/examples/omex/biomodels_omex/files/Zhou2024_Updated-model.m +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/examples/omex/biomodels_omex/files/getCurrentsStructureCaMKSKJrelpKinetics.m +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/examples/omex/biomodels_omex/files/getStartingState.m +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/examples/omex/biomodels_omex/files/main.m +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/examples/omex/biomodels_omex/files/manifest.xml +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/examples/omex/biomodels_omex/files/metadata.rdf +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/examples/omex/biomodels_omex/files/modelRunnerCaMKSKJrelpKinetics1ms.m +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/examples/omex/biomodels_omex/files/model_ToRORd_LandCaMKSKJrelpKinetics.m +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/examples/omex/omex.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/examples/omex/omex_from_url.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/examples/omex/test.omex +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/examples/pbpko.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/examples/sbo.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/presentations/HARMONY2026/.gitignore +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/presentations/HARMONY2026/README.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/presentations/HARMONY2026/_extensions/grantmcdermott/clean/_extension.yml +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/presentations/HARMONY2026/_extensions/grantmcdermott/clean/clean.scss +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/presentations/HARMONY2026/_extensions/grantmcdermott/clean/mathjax-config.js +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/presentations/HARMONY2026/custom.scss +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/presentations/HARMONY2026/images/annotation_example.png +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/presentations/HARMONY2026/images/annotation_resolved.png +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/presentations/HARMONY2026/images/annotation_resolved_small.png +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/presentations/HARMONY2026/images/github_screenshot.png +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/presentations/HARMONY2026/images/headshot.png +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/presentations/HARMONY2026/images/omex_logo.png +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/presentations/HARMONY2026/images/omex_overview.png +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/presentations/HARMONY2026/images/pymetadata.png +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/presentations/HARMONY2026/images/pymetadata_large.png +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/presentations/HARMONY2026/images/qr_livermetabolism.png +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/presentations/HARMONY2026/mathjax-config.js +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/presentations/HARMONY2026/pymetadata.bib +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/presentations/HARMONY2026/pymetadata.qmd +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/presentations/HARMONY2026/styles.css +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.0.10.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.0.11.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.0.12.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.0.13.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.0.14.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.0.15.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.0.16.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.0.17.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.0.18.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.0.19.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.0.2.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.0.20.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.0.21.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.0.22.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.0.3.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.0.4.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.0.5.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.0.6.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.0.7.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.0.8.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.0.9.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.1.0.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.2.1.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.2.10.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.2.2.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.2.3.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.2.4.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.2.5.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.2.6.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.2.7.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.2.8.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.2.9.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.3.0.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.3.1.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.3.10.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.3.11.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.3.2.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.3.3.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.3.4.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.3.5.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.3.6.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.3.7.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.3.8.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.3.9.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.4.0.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.4.1.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.4.2.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.4.3.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.4.4.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.5.0.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.5.1.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.5.10.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.5.11.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.5.12.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.5.2.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.5.3.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.5.4.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.5.5.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.5.6.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.5.7.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.5.8.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.5.9.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.6.0.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.6.1.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.6.2.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.6.3.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.6.4.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.6.5.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.6.6.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.7.0.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.8.0.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.8.1.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/release-notes/0.8.2.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/scripts/llms_txt.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/src/pymetadata/_files.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/src/pymetadata/cache.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/src/pymetadata/console.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/src/pymetadata/core/__init__.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/src/pymetadata/core/annotation.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/src/pymetadata/core/creator.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/src/pymetadata/core/miriam.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/src/pymetadata/core/synonym.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/src/pymetadata/core/xref.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/src/pymetadata/log.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/src/pymetadata/ontologies/__init__.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/src/pymetadata/ontologies/_ontology_builder.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/src/pymetadata/ontologies/kisao.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/src/pymetadata/ontologies/pbpko.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/src/pymetadata/ontologies/sbo.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/src/pymetadata/ontologies/term.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/src/pymetadata/py.typed +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/src/pymetadata/resources/ontologies/README.md +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/src/pymetadata/webservices/__init__.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/src/pymetadata/webservices/chebi.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/src/pymetadata/webservices/ols.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/src/pymetadata/webservices/registry.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/src/pymetadata/webservices/unichem.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/src/pymetadata/webservices/uniprot.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/src/pymetadata/webservices/webservice.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/tests/core/test_annotation.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/tests/core/test_creator.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/tests/data/omex/BIOMD0000000001.omex +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/tests/data/omex/CombineArchiveShowCase.omex +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/tests/data/omex/CombineArchiveShowCase_manifest.xml +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/tests/data/omex/CompModels.omex +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/tests/data/omex/CompModels_manifest.xml +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/tests/data/omex/iCGB21FR.omex +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/tests/data/registry/identifiers_registry_response.json +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/tests/test_annotation_resolution.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/tests/test_cache.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/tests/test_chebi.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/tests/test_log.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/tests/test_offline.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/tests/test_ols.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/tests/test_omex.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/tests/test_ontology.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/tests/test_ontology_builder.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/tests/test_registry.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/tests/test_sbo_kisao.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/tests/test_unichem.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/tests/test_uniprot.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/tests/test_webservice.py +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/tox.ini +0 -0
- {pymetadata-0.8.2 → pymetadata-0.9.0}/zensical.toml +0 -0
|
@@ -38,7 +38,7 @@ jobs:
|
|
|
38
38
|
persist-credentials: false
|
|
39
39
|
- name: Install uv and set the python version
|
|
40
40
|
# astral-sh/setup-uv publishes no floating major tag beyond v7
|
|
41
|
-
uses: astral-sh/setup-uv@v10.
|
|
41
|
+
uses: astral-sh/setup-uv@v10.3.3
|
|
42
42
|
with:
|
|
43
43
|
python-version: ${{ matrix.python-version }}
|
|
44
44
|
# a release run restores no cache, which zizmor cannot tell from the
|
|
@@ -84,7 +84,7 @@ jobs:
|
|
|
84
84
|
with:
|
|
85
85
|
persist-credentials: false
|
|
86
86
|
- name: Install uv
|
|
87
|
-
uses: astral-sh/setup-uv@v10.
|
|
87
|
+
uses: astral-sh/setup-uv@v10.3.3
|
|
88
88
|
with:
|
|
89
89
|
python-version: "3.14"
|
|
90
90
|
# a release is built from a clean state, never from a restored cache
|
|
@@ -32,7 +32,7 @@ jobs:
|
|
|
32
32
|
if: github.ref == 'refs/heads/develop'
|
|
33
33
|
uses: actions/configure-pages@v6
|
|
34
34
|
- name: Install uv and set the python version
|
|
35
|
-
uses: astral-sh/setup-uv@v10.
|
|
35
|
+
uses: astral-sh/setup-uv@v10.3.3
|
|
36
36
|
with:
|
|
37
37
|
python-version: "3.14"
|
|
38
38
|
enable-cache: true
|
|
@@ -39,7 +39,7 @@ repos:
|
|
|
39
39
|
|
|
40
40
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
41
41
|
# Ruff version.
|
|
42
|
-
rev: v0.
|
|
42
|
+
rev: v0.17.3
|
|
43
43
|
hooks:
|
|
44
44
|
# Run the linter.
|
|
45
45
|
- id: ruff-check
|
|
@@ -51,7 +51,7 @@ repos:
|
|
|
51
51
|
|
|
52
52
|
- repo: https://github.com/astral-sh/ty-pre-commit
|
|
53
53
|
# ty version.
|
|
54
|
-
rev: v0.0.
|
|
54
|
+
rev: v0.0.95
|
|
55
55
|
hooks:
|
|
56
56
|
# Run the type checker on the whole project (see `[tool.ty]` in pyproject.toml).
|
|
57
57
|
# `--extra dev` syncs the environment with the dev dependencies, so that the
|
|
@@ -8,8 +8,8 @@ authors:
|
|
|
8
8
|
given-names: "Matthias"
|
|
9
9
|
orcid: "https://orcid.org/0000-0003-1725-179X"
|
|
10
10
|
affiliation: "Humboldt-University Berlin, Faculty of Life Science, Institute for Biology, Biology, Berlin; University Lübeck; University Hospital Schleswig-Holstein, Campus Lübeck, First Department of Medicine, Germany"
|
|
11
|
-
version: "0.
|
|
12
|
-
date-released: "2026-
|
|
11
|
+
version: "0.9.0"
|
|
12
|
+
date-released: "2026-11-01"
|
|
13
13
|
doi: "10.5281/zenodo.5308801"
|
|
14
14
|
license: MIT
|
|
15
15
|
repository-code: "https://github.com/matthiaskoenig/pymetadata"
|
|
@@ -4,7 +4,7 @@ This file provides guidance when working with code in this repository.
|
|
|
4
4
|
|
|
5
5
|
## Project
|
|
6
6
|
|
|
7
|
-
`pymetadata` is a python library for metadata in the context of COMBINE standards: COMBINE archives (OMEX), MIRIAM/RDF annotations, and ontology terms (SBO, KISAO, PBPKO). Pure library, no CLI entry points. Requires python >= 3.11, packaged with hatchling (version is read from `src/pymetadata/__init__.py`). Runtime dependencies are `rich`, `requests` and `pydantic`, plus the floors of `urllib3` and `certifi`, which are not imported but reached through `requests` (`certifi>=2026.10.19` excludes the CA store with the compromised emSign intermediates, GHSA-6q48-6c7w-9gw2); `pronto` is the optional `ontology` extra, needed only to regenerate the ontology modules.
|
|
7
|
+
`pymetadata` is a python library for metadata in the context of COMBINE standards: COMBINE archives (OMEX), MIRIAM/RDF annotations, and ontology terms (SBO, KISAO, PBPKO). Pure library, no CLI entry points. Requires python >= 3.11, packaged with hatchling (version is read from `src/pymetadata/__init__.py`). Runtime dependencies are `pymetadata-core>=0.4.0`, `rich`, `requests` and `pydantic`, plus the floors of `urllib3` and `certifi`, which are not imported but reached through `requests` (`certifi>=2026.10.19` excludes the CA store with the compromised emSign intermediates, GHSA-6q48-6c7w-9gw2); `pronto` is the optional `ontology` extra, needed only to regenerate the ontology modules. `pymetadata-core` is the Rust core of the OMEX reading and writing, so the package is not pure python: it is a hard dependency without a pure-python fallback, shipped as one abi3 wheel for CPython 3.11+ on five targets (`manylinux2014_x86_64`, `manylinux2014_aarch64`, `macosx_10_12_x86_64`, `macosx_11_0_arm64`, `win_amd64`), and built from its sdist with a Rust toolchain everywhere else (musl linux, other linux architectures, FreeBSD, PyPy).
|
|
8
8
|
|
|
9
9
|
## Commands
|
|
10
10
|
|
|
@@ -52,7 +52,26 @@ facing files (`llms.txt`, `llms-full.txt` and the markdown of every page) into
|
|
|
52
52
|
**`omex.py` — COMBINE archive.** The main module. `Omex` holds a temporary directory
|
|
53
53
|
plus a `Manifest` of `ManifestEntry` pydantic models; archives are created/read via
|
|
54
54
|
`Omex.from_omex`, `from_url`, `from_directory` and written via `to_omex`,
|
|
55
|
-
`to_directory`.
|
|
55
|
+
`to_directory`. Since 0.9.0 the container itself is the Rust core, reached through
|
|
56
|
+
`_core_bridge.py`, the only module which imports `pymetadata_core` and which
|
|
57
|
+
translates its errors into `ValueError`/`KeyError` plus `PasswordError` and
|
|
58
|
+
`ConcurrentUseError` (both re-exported from `omex.py`); the kind of a failure is the
|
|
59
|
+
class the core raises (`MalformedError`, `NotFoundError`, `PasswordError`, ...), never
|
|
60
|
+
the wording of its message. Reading is lazy: `from_omex` opens the archive, keeps it
|
|
61
|
+
in `Omex._archive` and takes the manifest from it, while a member is extracted into
|
|
62
|
+
the temporary directory when `get_path` asks for it (an unlisted `.xml` member is
|
|
63
|
+
classified at open from its first `HEAD_SIZE` bytes, read with `Archive.head`, which
|
|
64
|
+
inflates no more than those). Writing copies every member which was neither replaced
|
|
65
|
+
nor extracted as the compressed blob it is, changes the format or master flag of an
|
|
66
|
+
entry with `set_entry_format` so its member stays that blob, lays the entries into
|
|
67
|
+
the order `Omex` holds them with `reorder_entries`, and applies the manifest's
|
|
68
|
+
removals to that archive, so a write changes it. `to_omex` writes through the core's
|
|
69
|
+
`Archive.to_path`, into a temporary file next to the target which is moved over it, so
|
|
70
|
+
the archive is never in memory as a whole and the target is the archive or untouched. `Omex.is_omex` asks the core's
|
|
71
|
+
`has_manifest`, which reads the end of the file and its central directory and no
|
|
72
|
+
member at all. The
|
|
73
|
+
calls which reach the core hold `Omex._lock`, an `RLock` per instance, because the
|
|
74
|
+
core gives one archive to one thread at a time. `EntryFormat` is a large enum mapping formats to
|
|
56
75
|
`http://identifiers.org/combine.specifications/*` or `https://purl.org/NET/mediatypes/*`
|
|
57
76
|
URIs; `guess_format`/`lookup_format` resolve a file suffix to such a URI. Manifest
|
|
58
77
|
locations are normalized to `./`-prefixed relative paths. `oven/omex_v2.py` is only a
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: pymetadata
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.9.0
|
|
4
4
|
Summary: pymetadata are python utilities for working with metadata.
|
|
5
5
|
Project-URL: Homepage, https://matthiaskoenig.github.io/pymetadata
|
|
6
6
|
Project-URL: Documentation, https://matthiaskoenig.github.io/pymetadata
|
|
@@ -27,6 +27,7 @@ Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
|
27
27
|
Requires-Python: >=3.11
|
|
28
28
|
Requires-Dist: certifi>=2026.10.19
|
|
29
29
|
Requires-Dist: pydantic>=2.12
|
|
30
|
+
Requires-Dist: pymetadata-core>=0.4.0
|
|
30
31
|
Requires-Dist: requests>=2.34.2
|
|
31
32
|
Requires-Dist: rich>=15.0.0
|
|
32
33
|
Requires-Dist: urllib3>=2.5.0
|
|
@@ -38,7 +39,7 @@ Requires-Dist: pronto>=2.7.3; extra == 'dev'
|
|
|
38
39
|
Requires-Dist: pytest-cov>=7.1.0; extra == 'dev'
|
|
39
40
|
Requires-Dist: pytest>=9.1.1; extra == 'dev'
|
|
40
41
|
Requires-Dist: ruff>=0.16.6; extra == 'dev'
|
|
41
|
-
Requires-Dist: tox
|
|
42
|
+
Requires-Dist: tox!=4.67.5,>=4.61.2; extra == 'dev'
|
|
42
43
|
Requires-Dist: ty>=0.0.78; extra == 'dev'
|
|
43
44
|
Requires-Dist: zensical>=0.0.60; extra == 'dev'
|
|
44
45
|
Provides-Extra: ontology
|
|
@@ -66,7 +67,7 @@ If you have any questions or issues please [open an issue](https://github.com/ma
|
|
|
66
67
|
|
|
67
68
|
If you use `pymetadata` please cite the archived software on [Zenodo](https://doi.org/10.5281/zenodo.5308801):
|
|
68
69
|
|
|
69
|
-
> König, M. (2026). *pymetadata are python utilities for working with metadata* (Version 0.8.
|
|
70
|
+
> König, M. (2026). *pymetadata are python utilities for working with metadata* (Version 0.8.3) [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.23870276
|
|
70
71
|
|
|
71
72
|
```bibtex
|
|
72
73
|
@software{konig_pymetadata,
|
|
@@ -74,10 +75,10 @@ If you use `pymetadata` please cite the archived software on [Zenodo](https://do
|
|
|
74
75
|
title = {pymetadata are python utilities for working with metadata},
|
|
75
76
|
year = {2026},
|
|
76
77
|
month = oct,
|
|
77
|
-
version = {0.8.
|
|
78
|
+
version = {0.8.3},
|
|
78
79
|
publisher = {Zenodo},
|
|
79
|
-
doi = {10.5281/zenodo.
|
|
80
|
-
url = {https://doi.org/10.5281/zenodo.
|
|
80
|
+
doi = {10.5281/zenodo.23870276},
|
|
81
|
+
url = {https://doi.org/10.5281/zenodo.23870276},
|
|
81
82
|
}
|
|
82
83
|
```
|
|
83
84
|
|
|
@@ -19,7 +19,7 @@ If you have any questions or issues please [open an issue](https://github.com/ma
|
|
|
19
19
|
|
|
20
20
|
If you use `pymetadata` please cite the archived software on [Zenodo](https://doi.org/10.5281/zenodo.5308801):
|
|
21
21
|
|
|
22
|
-
> König, M. (2026). *pymetadata are python utilities for working with metadata* (Version 0.8.
|
|
22
|
+
> König, M. (2026). *pymetadata are python utilities for working with metadata* (Version 0.8.3) [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.23870276
|
|
23
23
|
|
|
24
24
|
```bibtex
|
|
25
25
|
@software{konig_pymetadata,
|
|
@@ -27,10 +27,10 @@ If you use `pymetadata` please cite the archived software on [Zenodo](https://do
|
|
|
27
27
|
title = {pymetadata are python utilities for working with metadata},
|
|
28
28
|
year = {2026},
|
|
29
29
|
month = oct,
|
|
30
|
-
version = {0.8.
|
|
30
|
+
version = {0.8.3},
|
|
31
31
|
publisher = {Zenodo},
|
|
32
|
-
doi = {10.5281/zenodo.
|
|
33
|
-
url = {https://doi.org/10.5281/zenodo.
|
|
32
|
+
doi = {10.5281/zenodo.23870276},
|
|
33
|
+
url = {https://doi.org/10.5281/zenodo.23870276},
|
|
34
34
|
}
|
|
35
35
|
```
|
|
36
36
|
|
|
@@ -70,7 +70,7 @@ If you have any questions or issues please [open an issue](https://github.com/ma
|
|
|
70
70
|
|
|
71
71
|
If you use `pymetadata` please cite the archived software on [Zenodo](https://doi.org/10.5281/zenodo.5308801):
|
|
72
72
|
|
|
73
|
-
> König, M. (2026). *pymetadata are python utilities for working with metadata* (Version 0.8.
|
|
73
|
+
> König, M. (2026). *pymetadata are python utilities for working with metadata* (Version 0.8.3) [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.23870276
|
|
74
74
|
|
|
75
75
|
```bibtex
|
|
76
76
|
@software{konig_pymetadata,
|
|
@@ -78,10 +78,10 @@ If you use `pymetadata` please cite the archived software on [Zenodo](https://do
|
|
|
78
78
|
title = {pymetadata are python utilities for working with metadata},
|
|
79
79
|
year = {2026},
|
|
80
80
|
month = oct,
|
|
81
|
-
version = {0.8.
|
|
81
|
+
version = {0.8.3},
|
|
82
82
|
publisher = {Zenodo},
|
|
83
|
-
doi = {10.5281/zenodo.
|
|
84
|
-
url = {https://doi.org/10.5281/zenodo.
|
|
83
|
+
doi = {10.5281/zenodo.23870276},
|
|
84
|
+
url = {https://doi.org/10.5281/zenodo.23870276},
|
|
85
85
|
}
|
|
86
86
|
```
|
|
87
87
|
|
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
# Installation
|
|
2
2
|
|
|
3
|
-
`pymetadata` requires python >= 3.11 and is available from [pypi](https://pypi.python.org/pypi/pymetadata). It is
|
|
3
|
+
`pymetadata` requires python >= 3.11 and is available from [pypi](https://pypi.python.org/pypi/pymetadata). It is tested with python 3.11 to 3.15: continuous integration tests python 3.14 on Linux, macOS and Windows, all supported versions are tested locally on Linux before every pull request.
|
|
4
|
+
|
|
5
|
+
## Compiled dependencies
|
|
6
|
+
|
|
7
|
+
`pymetadata` is not pure python. COMBINE archives are read and written by [`pymetadata-core`](https://pypi.org/project/pymetadata-core/), a Rust extension which is a hard dependency of the package since 0.9.0; there is no pure-python fallback. It ships one abi3 wheel per platform, which every CPython from 3.11 on installs:
|
|
8
|
+
|
|
9
|
+
| platform | wheel |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| Linux x86_64 (glibc) | `manylinux2014_x86_64` |
|
|
12
|
+
| Linux aarch64 (glibc) | `manylinux2014_aarch64` |
|
|
13
|
+
| macOS Intel | `macosx_10_12_x86_64` |
|
|
14
|
+
| macOS Apple silicon | `macosx_11_0_arm64` |
|
|
15
|
+
| Windows x86_64 | `win_amd64` |
|
|
16
|
+
|
|
17
|
+
On any other platform, e.g. musl based linux (Alpine), linux on armv7, ppc64le or s390x, FreeBSD, 32 bit or ARM Windows, or an implementation other than CPython such as PyPy, pip and uv fall back to the source distribution of `pymetadata-core` and compile it, which needs a [Rust toolchain](https://rustup.rs), i.e. `cargo`; without one the build fails. It fails while `pymetadata-core` is built, not while `pymetadata` is installed, which is worth knowing when the output is read.
|
|
18
|
+
|
|
19
|
+
`pydantic-core` is compiled as well. It comes with [pydantic](https://docs.pydantic.dev/) and is installed from a wheel; for python 3.15 these wheels are part of pydantic 2.14, with an older pydantic it is built from source, which requires a Rust toolchain too.
|
|
4
20
|
|
|
5
21
|
## With uv
|
|
6
22
|
|
|
@@ -38,19 +38,33 @@ omex = Omex.from_url(
|
|
|
38
38
|
)
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
Reading
|
|
41
|
+
Reading is lazy. The archive is opened through [`pymetadata-core`](https://pypi.org/project/pymetadata-core/), which reads the central directory and the `manifest.xml`, so the entries are available at once, but no member is extracted. `Omex.get_path(location)` extracts a single entry into a temporary directory when it is asked for and returns its path, which is what you pass on to a model reader:
|
|
42
42
|
|
|
43
43
|
```python
|
|
44
44
|
model_path = omex.get_path("./model.xml")
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
+
One exception to the laziness: an `.xml` member which the `manifest.xml` does not list is inflated in memory when the archive is opened, because its format is classified from its first bytes and there is no partial read. Its bytes are cached, so asking for that member later does not inflate it again.
|
|
48
|
+
|
|
49
|
+
One `Omex` can be used from several threads. The core gives access to one archive to one thread at a time, so `get_path`, `to_omex` and `to_directory` are serialized with a lock of the instance: they keep working from a thread pool, they are not faster in one.
|
|
50
|
+
|
|
47
51
|
Encrypted archives can be opened by passing the password; writing encrypted archives is not supported:
|
|
48
52
|
|
|
49
53
|
```python
|
|
50
54
|
omex = Omex.from_omex(Path("archive.omex"), password=b"secret")
|
|
51
55
|
```
|
|
52
56
|
|
|
53
|
-
|
|
57
|
+
A wrong or missing password raises a `PasswordError`, a subclass of `ValueError`.
|
|
58
|
+
|
|
59
|
+
To check whether a file is a COMBINE archive at all, use `Omex.is_omex(path)`. It answers from the structure of the zip file, i.e., whether one of its names normalizes to `./manifest.xml`, and reads no member.
|
|
60
|
+
|
|
61
|
+
### What the core refuses
|
|
62
|
+
|
|
63
|
+
- A member whose name is absolute or points outside of the archive is refused when the archive is opened, with a `ValueError`.
|
|
64
|
+
- A member with a compression method other than stored or deflate, or one which inflates beyond 1 GiB, is refused when its bytes are read, i.e., at `get_path`, with a `ValueError` naming the location. Opening the archive and listing its entries works, and a member the manifest does not list gets its format guessed from its suffix alone.
|
|
65
|
+
- A manifest entry for which the archive has no member is dropped with a warning.
|
|
66
|
+
|
|
67
|
+
The whole file is read into memory when the archive is opened, so the memory needed is the size of the archive.
|
|
54
68
|
|
|
55
69
|
## Working with the manifest
|
|
56
70
|
|
|
@@ -123,7 +137,7 @@ Omex.lookup_format("sbml") # from a format key
|
|
|
123
137
|
|
|
124
138
|
## Cleaning up
|
|
125
139
|
|
|
126
|
-
|
|
140
|
+
Members which were extracted by `get_path` live in a temporary directory. Using the archive as a context manager removes that directory when the block is left, which matters when many archives are processed in one run:
|
|
127
141
|
|
|
128
142
|
```python
|
|
129
143
|
with Omex.from_omex(Path("archive.omex")) as omex:
|
|
@@ -142,7 +156,19 @@ omex.to_omex(Path("archive.omex")) # write a COMBINE archive
|
|
|
142
156
|
omex.to_directory(Path("./unpacked")) # extract, including the manifest.xml
|
|
143
157
|
```
|
|
144
158
|
|
|
145
|
-
`to_directory` writes the `manifest.xml` next to the files, so the result is a valid input for `Omex.from_directory` again.
|
|
159
|
+
`to_directory` writes the `manifest.xml` next to the files, so the result is a valid input for `Omex.from_directory` again. Each member is written once, straight to its destination.
|
|
160
|
+
|
|
161
|
+
### Reading an archive and writing it back
|
|
162
|
+
|
|
163
|
+
A member which nobody touched is copied compressed to the new archive, without being inflated and compressed again, and keeps its compression method, compressed size and CRC. Reading an archive and writing it back is therefore cheap, also for a large archive. A member is written anew when its file was added with `add_entry` or when an entry changed its format or `master` flag, and every member extracted by `get_path` is written from its file.
|
|
164
|
+
|
|
165
|
+
The `manifest.xml` of the written archive is serialized by the core: `master` is written only when it is true, and the entries are in the order of the container. A `compresslevel` other than the default, and any `compression` other than `ZIP_DEFLATED`, compress every member again. The core has no stored path, so `ZIP_STORED` is written as deflate at level 0 with a warning. The archive is built in memory before it is written.
|
|
166
|
+
|
|
167
|
+
The two writers spell the manifest differently: `to_omex` writes the one the core serializes, `to_directory` writes the one of `Manifest.to_manifest_xml`, which quotes the XML declaration with double quotes and writes `master="false"` as well. Both read back to the same entries, so an archive and the directory it was extracted to can have two spellings of its `manifest.xml`.
|
|
168
|
+
|
|
169
|
+
A write applies the removals of the manifest to the archive the `Omex` was read from, so it is not free of side effects: an entry which was removed from `manifest` loses its content when the archive is written. Declaring that location again afterwards and writing a second time fails with a `FileNotFoundError`, because neither a file nor the content of the archive is left for it. A write which repeats the same entries writes the same bytes again.
|
|
170
|
+
|
|
171
|
+
The timing of reading and writing the archives in `tests/data/omex` is printed by `uv run python scripts/omex_timing.py`.
|
|
146
172
|
|
|
147
173
|
## Examples
|
|
148
174
|
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
"""Creating the COMBINE archive of a biomodels entry from a directory of files.
|
|
2
2
|
|
|
3
|
-
Run with `python examples/omex/biomodels_omex/create_omex.py
|
|
4
|
-
written
|
|
3
|
+
Run with `python examples/omex/biomodels_omex/create_omex.py`. The archive is
|
|
4
|
+
written to a temporary directory and read back, so a run does not modify a file
|
|
5
|
+
of the repository.
|
|
5
6
|
"""
|
|
6
7
|
|
|
8
|
+
import tempfile
|
|
7
9
|
from pathlib import Path
|
|
8
10
|
|
|
9
11
|
from pymetadata.console import console
|
|
10
12
|
from pymetadata.omex import EntryFormat, ManifestEntry, Omex
|
|
11
13
|
|
|
12
14
|
files_dir: Path = Path(__file__).parent / "files"
|
|
13
|
-
omex_path: Path = Path(__file__).parent / "MODEL2402290004.4_pymetadata.omex"
|
|
14
15
|
|
|
15
16
|
omex = Omex()
|
|
16
17
|
|
|
@@ -35,5 +36,8 @@ for extension, entry_format in entry_info:
|
|
|
35
36
|
),
|
|
36
37
|
)
|
|
37
38
|
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
with tempfile.TemporaryDirectory() as tmp_dir:
|
|
40
|
+
omex_path = Path(tmp_dir) / "MODEL2402290004.4_pymetadata.omex"
|
|
41
|
+
omex.to_omex(omex_path)
|
|
42
|
+
with Omex.from_omex(omex_path) as written:
|
|
43
|
+
console.print(written)
|
|
@@ -45,6 +45,7 @@ dependencies = [
|
|
|
45
45
|
# with the compromised emSign intermediates, GHSA-6q48-6c7w-9gw2
|
|
46
46
|
"certifi>=2026.10.19",
|
|
47
47
|
"pydantic>=2.12",
|
|
48
|
+
"pymetadata-core>=0.4.0",
|
|
48
49
|
]
|
|
49
50
|
|
|
50
51
|
[project.optional-dependencies]
|
|
@@ -59,7 +60,9 @@ dev = [
|
|
|
59
60
|
"ruff>=0.16.6",
|
|
60
61
|
"pre-commit>=4.6.2",
|
|
61
62
|
"ty>=0.0.78",
|
|
62
|
-
|
|
63
|
+
# 4.67.5 refuses its package staging directory when it was created under
|
|
64
|
+
# umask 002, tox-dev/tox#4357
|
|
65
|
+
"tox>=4.61.2,!=4.67.5",
|
|
63
66
|
"pytest>=9.1.1",
|
|
64
67
|
"pytest-cov>=7.1.0",
|
|
65
68
|
"zensical>=0.0.60",
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Release notes for pymetadata 0.8.3
|
|
2
|
+

|
|
3
|
+
|
|
4
|
+
## Security
|
|
5
|
+
|
|
6
|
+
- The lock of the development environment, `uv.lock`, has filelock 4.2.6 instead of 4.1.0 (#111), which fixes the advisories of filelock before 4.2.1 ([GHSA-2g95-wg33-c5x2](https://github.com/advisories/GHSA-2g95-wg33-c5x2), [GHSA-v4x8-3wr5-3wq8](https://github.com/advisories/GHSA-v4x8-3wr5-3wq8), [GHSA-crv4-6mhj-j5jh](https://github.com/advisories/GHSA-crv4-6mhj-j5jh) and 14 more). filelock reaches only the development environment, through tox, virtualenv and python-discovery, so the dependencies of pymetadata are unchanged. virtualenv moves from 21.14.12 to 21.15.2.
|
|
7
|
+
|
|
8
|
+
## Dependencies
|
|
9
|
+
|
|
10
|
+
- The lock moves to the newest releases (#110, #111), among them certifi 2026.10.23, pydantic 2.14.2, pronto 2.7.4, ruff 0.17.3, ty 0.0.95, pytest 9.2.0, zensical 0.0.74 and mkdocstrings-python 2.0.10. The lower bounds in `pyproject.toml` are unchanged.
|
|
11
|
+
|
|
12
|
+
## Development
|
|
13
|
+
|
|
14
|
+
- The dev extra excludes tox 4.67.5 (`tox>=4.61.2,!=4.67.5`), the lock keeps tox 4.67.4 (#111). tox 4.67.5 refuses its package staging directory when tox created it under umask 002, so every environment of `tox run-parallel` in a fresh checkout fails with an internal error ([tox-dev/tox#4357](https://github.com/tox-dev/tox/issues/4357)).
|
|
15
|
+
- The pre-commit hooks of ruff and ty follow the locked versions, ruff 0.17.3 and ty 0.0.95 (#111).
|
|
16
|
+
- Continuous integration uses astral-sh/setup-uv 10.3.3 (#109).
|
|
17
|
+
|
|
18
|
+
Your pymetadata team
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Release notes for pymetadata 0.9.0
|
|
2
|
+

|
|
3
|
+
|
|
4
|
+
## Changes
|
|
5
|
+
|
|
6
|
+
- `pymetadata.omex` reads and writes COMBINE archives through [`pymetadata-core`](https://pypi.org/project/pymetadata-core/), which is now a dependency of pymetadata with a floor of 0.4.0 (#99). There is no pure-python fallback. The public API of `Omex`, `Manifest` and `ManifestEntry` is unchanged.
|
|
7
|
+
- pymetadata is therefore no longer pure python. `pymetadata-core` is a Rust extension and ships one abi3 wheel per platform, which every CPython from 3.11 on installs: `manylinux2014_x86_64` and `manylinux2014_aarch64` (linux with glibc), `macosx_10_12_x86_64`, `macosx_11_0_arm64` and `win_amd64`. On every other platform, e.g. musl based linux (Alpine), linux on armv7, ppc64le or s390x, FreeBSD, 32 bit or ARM Windows, or an implementation other than CPython such as PyPy, `pip install pymetadata` falls back to the source distribution of the core and compiles it, which needs a [Rust toolchain](https://rustup.rs), i.e. `cargo`; without one the build fails, while `pymetadata-core` is built rather than while pymetadata is installed. See [Installation](https://matthiaskoenig.github.io/pymetadata/installation/).
|
|
8
|
+
- Reading is lazy. `Omex.from_omex` no longer extracts the archive into a temporary directory, `Omex.get_path` extracts a member when something asks for it. Opening still reads the central directory and the `manifest.xml`, and reads the first bytes of an unlisted `.xml` member to classify its format, without inflating the rest of it.
|
|
9
|
+
- A member which nobody touched is copied compressed when the archive is written, without being inflated and compressed again. Its compression method, compressed size and CRC are preserved exactly.
|
|
10
|
+
- The effect, in ms: reading with `Omex.from_omex`, writing with `Omex.to_omex` without a change. Median of 15 runs after one uncounted warm-up run. Both columns were taken with `scripts/omex_timing.py --runs 15`, one after the other on the same machine, the before column on a worktree of the previous release (c42df44), so the two are comparable and you can reproduce them:
|
|
11
|
+
|
|
12
|
+
| archive | size (KiB) | entries | read before | read after | write before | write after |
|
|
13
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
14
|
+
| BIOMD0000000001.omex | 277 | 16 | 2.50 | 0.24 | 11.56 | 0.23 |
|
|
15
|
+
| CombineArchiveShowCase.omex | 1073 | 22 | 6.08 | 0.74 | 44.37 | 0.44 |
|
|
16
|
+
| CompModels.omex | 6 | 6 | 0.72 | 0.10 | 0.48 | 0.10 |
|
|
17
|
+
| iCGB21FR.omex | 1375 | 23 | 18.24 | 1.07 | 226.68 | 0.49 |
|
|
18
|
+
|
|
19
|
+
- Reading reads the whole file: the `bytes` of the archive and the container the core keeps from them. Writing streams into the file, see the entry on `Omex.to_omex` below.
|
|
20
|
+
- `Omex.to_directory` writes each member once, straight to its destination. An entry whose file is missing raises a `FileNotFoundError` which names that file and sets its `filename`, on every platform: on windows `shutil.copy2`, which wrote every member before, copies through the `CopyFile2` API, whose error names no file at all (`[WinError 2] The system cannot find the file specified`).
|
|
21
|
+
- One `Omex` can still be used from several threads. The core gives access to one archive to one thread at a time and refuses a second one, so the calls which reach it, `Omex.get_path`, `Omex.to_omex` and `Omex.to_directory`, are serialized with a lock of the instance. Extracting the members of one archive from a thread pool therefore keeps working, as it did when `from_omex` extracted everything up front, but the extractions happen one after the other: threads do not make reading one archive faster. Two `Omex` instances are independent of each other. An `Archive` of the core which is shared outside of `Omex` raises `pymetadata.omex.ConcurrentUseError`, a `RuntimeError`, instead of the `ArchiveBusyError` of the binding. Changing the `manifest` of one `Omex` from several threads at the same time is not supported.
|
|
22
|
+
|
|
23
|
+
## Behaviour which changed
|
|
24
|
+
|
|
25
|
+
- A wrong or missing password raises a `ValueError` where `zipfile` raised a `RuntimeError`. The exception is `PasswordError`, which `pymetadata.omex` exports beside `ConcurrentUseError`: code which catches `ValueError` keeps working, and code which tells a protected archive from a container which is no archive catches `PasswordError`.
|
|
26
|
+
- A member with an unsupported compression method, or one which inflates beyond the 1 GiB cap of the core, is refused when its bytes are read, i.e., at `Omex.get_path`, and no longer when the archive is opened. A member with an unsupported method which the manifest does not list gets its format guessed from its suffix alone; one over the inflate cap is classified from its first bytes, which are read without inflating the rest.
|
|
27
|
+
- A member whose name points outside of the archive, or is absolute, is refused when the archive is opened with a `ValueError`. `zipfile` sanitized such a name and read the member, this is deliberate hardening. `Omex.is_omex` still answers `True` for such a file, because it asks about the structure of the archive.
|
|
28
|
+
- The `manifest.xml` of a written archive is serialized by the core: there is no `master="false"` attribute and the XML declaration is single quoted. The content is the same, the bytes are not.
|
|
29
|
+
- A member which pymetadata writes anew, e.g., an added file or the `manifest.xml`, carries the zip epoch 1980-01-01 00:00:00 as its modification time, where the previous writer used the time of the write. A member which is copied keeps the date it had in the source archive. The upside is that a written archive is reproducible: identical content gives identical bytes. The core offers no way to set a timestamp in 0.4.0.
|
|
30
|
+
- A member which is copied is not inflated, so a member with a compression method the core cannot inflate, such as bzip2, survives a write unchanged (it stays bzip2), although its bytes are refused when read. Such a member makes a write at a non-default `compresslevel`, or with a `compression` other than `ZIP_DEFLATED`, fail with a `ValueError`, because those writes inflate every member.
|
|
31
|
+
- A write applies the removals of the manifest to the archive the `Omex` was read from, so `Omex.to_omex` is not free of side effects. An entry which was removed from `manifest` loses its content in that `Omex` when the archive is written: declaring the location again afterwards and writing a second time fails with a `FileNotFoundError`, where the previous writer wrote the member again, because it still had every member as a file in the temporary directory. A write which repeats the same entries writes the same bytes again, and a removal before the first write is unaffected.
|
|
32
|
+
- `Omex.is_omex` is answered by the core, which reads the end of the file and its central directory and no member at all. The names of the container are normalized before the manifest is looked for, so a container whose manifest member is stored as `./manifest.xml` instead of `manifest.xml` is an archive. A file which is no COMBINE archive is logged with one warning naming the missing manifest, where the previous release logged a different one for a file which is no zip. `from_omex` reads such a container, where the previous release refused it, because `from_omex` was gated on `is_omex`.
|
|
33
|
+
- A location which a manifest declares twice is written once, the last entry winning, instead of producing two members of the same name.
|
|
34
|
+
- `Omex.to_omex` writes the archive through the core into a temporary file next to the target and moves it over the target, so the archive is never held in memory as a whole and the target is either the new archive or untouched. Reading still holds the container: for a 268.5 MB archive the peak of a read and write is 553.5 MB, where 0.8.3 peaked at 37.3 MB because it extracted to a temporary directory and streamed the members from there. A write which cannot be carried out, e.g. a full disk, raises an `OSError` and leaves the target alone.
|
|
35
|
+
- `compression=zipfile.ZIP_STORED` is written as deflate at level 0, with a warning, because the core has no stored path. Any other `compression` than `ZIP_DEFLATED` also deflates every member again, which gives up the copy of untouched members and its speed.
|
|
36
|
+
- `compresslevel` keeps its meaning, and `-1` is accepted as the default level (9), as with `zipfile`. A `compresslevel` outside of 0 to 9 raises a `ValueError` as before, with a different message.
|
|
37
|
+
- A member which the core deflates, e.g., an added file, the `manifest.xml`, or any member of a write at a non-default `compresslevel`, has different bytes than before, because the deflate of the core is not the one of CPython's `zlib`. The content is identical. A member whose format or `master` flag changed is not one of them: those live in the manifest, so the member is copied as the blob it is.
|
|
38
|
+
- When an archive is read with `from_omex`, one warning moved to the logger `pymetadata._core_bridge` from `pymetadata.omex`: `Entry with location missing in manifest.xml`, for a member the manifest does not list (`from_directory` still logs it under `pymetadata.omex`). Two are new, both from that logger: a manifest entry which no member of the archive provides is warned about, where it used to be dropped silently (it is still dropped), and an unlisted `.xml` member whose bytes cannot be read gets its format guessed from its suffix with a warning. The warning about a member which is neither stored nor deflated stays in `pymetadata.omex` and names the member as the core normalizes it, e.g. `./b.txt` instead of `b.txt`.
|
|
39
|
+
- The message for a file which is not a COMBINE archive changed to `Not an OMEX archive, no readable manifest.xml: malformed ...: '<path>'.`, still a `ValueError`. Code which matches on the old text needs to be adapted.
|
|
40
|
+
|
|
41
|
+
Your pymetadata team
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"""Time reading and writing COMBINE archives with `pymetadata.omex`.
|
|
2
|
+
|
|
3
|
+
Run with `uv run python scripts/omex_timing.py`. Every archive of
|
|
4
|
+
`tests/data/omex` is read with `Omex.from_omex`, and written back with
|
|
5
|
+
`Omex.to_omex` without a change. A table of the median and the fastest of
|
|
6
|
+
several runs is printed in milliseconds, which is where the figures of the
|
|
7
|
+
release notes come from.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
import argparse
|
|
11
|
+
import statistics
|
|
12
|
+
import tempfile
|
|
13
|
+
import time
|
|
14
|
+
from collections.abc import Callable
|
|
15
|
+
from pathlib import Path
|
|
16
|
+
|
|
17
|
+
from pymetadata.omex import Omex
|
|
18
|
+
|
|
19
|
+
FIXTURES: Path = Path(__file__).parent.parent / "tests" / "data" / "omex"
|
|
20
|
+
RUNS: int = 7
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def measure(function: Callable[[], object], runs: int) -> tuple[float, float]:
|
|
24
|
+
"""Time a function, after one run which is not counted.
|
|
25
|
+
|
|
26
|
+
Args:
|
|
27
|
+
function: the function to call
|
|
28
|
+
runs: the number of timed runs
|
|
29
|
+
|
|
30
|
+
Returns:
|
|
31
|
+
The median and the minimum of the runs in milliseconds.
|
|
32
|
+
"""
|
|
33
|
+
function()
|
|
34
|
+
times: list[float] = []
|
|
35
|
+
for _ in range(runs):
|
|
36
|
+
start = time.perf_counter()
|
|
37
|
+
function()
|
|
38
|
+
times.append((time.perf_counter() - start) * 1000)
|
|
39
|
+
return statistics.median(times), min(times)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def time_archive(
|
|
43
|
+
path: Path, runs: int
|
|
44
|
+
) -> tuple[int, tuple[float, float], tuple[float, float]]:
|
|
45
|
+
"""Time the read and the write of one archive.
|
|
46
|
+
|
|
47
|
+
Args:
|
|
48
|
+
path: the `.omex` file
|
|
49
|
+
runs: the number of timed runs
|
|
50
|
+
|
|
51
|
+
Returns:
|
|
52
|
+
The number of entries, and (median, minimum) of the read and of the write
|
|
53
|
+
in milliseconds.
|
|
54
|
+
"""
|
|
55
|
+
omex = Omex.from_omex(path)
|
|
56
|
+
with tempfile.TemporaryDirectory() as tmp_dir:
|
|
57
|
+
target = Path(tmp_dir) / "out.omex"
|
|
58
|
+
read = measure(lambda: Omex.from_omex(path), runs)
|
|
59
|
+
write = measure(lambda: omex.to_omex(target), runs)
|
|
60
|
+
entries = len(omex.manifest.entries)
|
|
61
|
+
omex.close()
|
|
62
|
+
return entries, read, write
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def main() -> None:
|
|
66
|
+
"""Print the timing table of all fixtures."""
|
|
67
|
+
parser = argparse.ArgumentParser(description=__doc__.splitlines()[0])
|
|
68
|
+
parser.add_argument("--runs", type=int, default=RUNS, help="timed runs per figure")
|
|
69
|
+
runs = parser.parse_args().runs
|
|
70
|
+
|
|
71
|
+
print(f"median (min) of {runs} runs in ms")
|
|
72
|
+
print(f"{'archive':<30} {'KiB':>6} {'entries':>8} {'read':>16} {'write':>16}")
|
|
73
|
+
for path in sorted(FIXTURES.glob("*.omex")):
|
|
74
|
+
entries, read, write = time_archive(path, runs)
|
|
75
|
+
print(
|
|
76
|
+
f"{path.name:<30} {path.stat().st_size // 1024:>6} {entries:>8} "
|
|
77
|
+
f"{read[0]:>8.2f} ({read[1]:>5.2f}) {write[0]:>8.2f} ({write[1]:>5.2f})"
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
if __name__ == "__main__":
|
|
82
|
+
main()
|