Repository navigation
Cap dependency versions, exercise no-rdkit path in CI, add hygiene - #2
Merged
Merged
Conversation
…/changelog/mypy - Add upper bounds to dependencies: gemmi>=0.6,<1, requests>=2.25,<3. Neither had a ceiling, so a future major bump could break installs unnoticed. - Add a test-no-rdkit CI job that installs without the rdkit extra and runs the suite, so the "rdkit absent" code path actually gets exercised in CI (rdkit-dependent tests skip via pytest.importorskip, they don't fail). - Fix fetch_cif(retries=N) raising a bare "exceptions must derive from BaseException" TypeError when called with a negative retries (the retry loop never executes, leaving nothing to re-raise); now raises a clear ValueError instead. Found via mypy. - Fix a mypy type mismatch in rcsb.find(): Summary.id could receive None when both rcsb_id and chem_comp.id are absent from a row; coerce to str explicitly. - Add a minimal, non-strict [tool.mypy] config. - Add README badges (CI, PyPI version, license, Python versions), matching scigantic-pubchem's style. - Add CHANGELOG.md, backfilled from git log and existing tags. - Bump version to 0.2.1 in src/scigantic_wwpdb/_version.py (the hatchling dynamic-version source of truth).
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.
Summary
gemmi>=0.6,<1,requests>=2.25,<3(both were unbounded).test-no-rdkitCI job so the "rdkit absent" path is actually exercised (previously thetestextra always bundled rdkit in).fetch_cif(retries=N)raising a confusingTypeErrorfor negativeretriesinstead of a clearValueError(found via mypy).Summary.idtype mismatch inrcsb.find().[tool.mypy]config; mypy is clean.scigantic-pubchem's style.CHANGELOG.md, backfilled from git log and existing tags.Test plan
pytest -qpasses locally with therdkitextra installed (25 passed, 4 skipped — network tests gated behindSCIGANTIC_LIVE_TESTS).pytest -q -rspasses in a clean venv installed WITHOUT the rdkit extra (22 passed, 7 skipped — the 3 rdkit tests skip viapytest.importorskip, not fail).mypyclean.