Fix/issue 100 python 314#101
Merged
Merged
Conversation
This update includes the addition of the pydantic package with a version constraint of >=2,<3 to the dependencies list in pyproject.toml, enhancing type validation capabilities.
_fetch_with_fetchers caught every exception and discarded it, so a failing fetch reported only "no fetcher found" with no cause. Collect each fetcher's actual error and include them in the raised ValueError.
PDB returns pdbx_database_id_PubMed as an int, but the Citation model typed pubmed_id as str
add_entry copies the SBML file from disk, but was called inside the open() block before the write flushed. On Python 3.14 this produced a 0-byte model.xml, breaking every SBML round-trip. Close the file first.
…n tests as remote This commit introduces a new unit test file for the composer module, which includes tests for handling successful and failed fetcher scenarios. Additionally, the integration test for the composer has been marked with the pytest remote marker to indicate its dependency on external resources.
This commit adds a new PubMed reference (https://pubmed.ncbi.nlm.nih.gov/9572841) to the expected JSON fixtures for both `expected_compose.json` and `expected_compose_no_vessel.json`, enhancing the citation information for the sequences.
…oject.toml and uv.lock This commit updates the project version in pyproject.toml to 2.2.3 and modifies the fastobo dependency version in uv.lock to 0.14.1, ensuring compatibility with the latest features and fixes.
…s/setup-python@v7, and upgrade astral-sh/setup-uv to v9.0.0. This ensures consistency across workflows and leverages the latest features and improvements in the actions used.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
uv-lock re-locks uv.lock when pyproject.toml changes to prevent drift; ruff mirrors the lint.yml gate (scoped to pyenzyme/ and tests/). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
pre-commit is a standalone tool, not a project dependency, so 'uv run' cannot find it. Use 'uv tool install pre-commit' instead. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Remote tests hit external APIs (e.g. RHEA-DB) that block CI datacenter IPs with 403, making CI permanently red for reasons unrelated to the code. They still run locally via 'pytest' (or 'pytest -m remote'); CI's unit-tests already excludes them with -m 'not remote'. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Fix Python 3.14 support (#100) + release-pipeline hardening
Fixes #100. Also fixes a latent 3.14 runtime bug behind it, plus some fetcher/CI cleanup found along the way.
Python 3.14 support (#100)
fastobo>=0.13.0,<0.14pin. fastobo isn't imported anywhere — it's transitive viapymetadata/pronto. The<0.14cap forced 0.13.0, which has no 3.14 wheel (PyO3 build fails). Removing it resolves fastobo 0.14.1 (shipscp314wheels).sbml/omex.py: flushmodel.xmlbefore archiving it.add_entry()copies the file from disk but ran inside the openwithblock, before flush. On 3.14's I/O buffering this wrote a 0-byte SBML file, breaking every OMEX round-trip. On ≤3.13 it passed by luck.'3.14'to the unit + remote CI matrices.Fetcher / composer fixes
fetcher/pdb.py: accept integer PubMed IDs. PDB returnspdbx_database_id_PubMedas anint; the model typed itstr, so pydantic rejected every PDB fetch. NowOptional[int], stringified at the one use site.composer.py: surface real fetcher errors._fetch_with_fetchersswallowed every exception → useless "no fetcher found". Now aggregates each fetcher's actual failure into the raisedValueError.tests/unit/test_composer.py; marked network-dependent composer testsremote.Misc
__version__now reads from installed metadata (single source =pyproject.toml).publish.yamlnowneedsa version==tag check and the reused test matrix, so a mismatched tag or red tests can't ship.checkout@v7,setup-python@v7,setup-uv@v9.0.0).Testing
Full suite green on 3.13 (106 passed) and a clean 3.14.6 venv (86 offline + 18 remote), all extras installed.
This change is