Skip to content

Cap dependency versions, exercise no-rdkit path in CI, add hygiene - #2

Merged
aaronkanzer merged 1 commit into
mainfrom
fix/hygiene-and-bugs
Aug 31, 2026
Merged

aaronkanzer merged 1 commit into
mainfrom
fix/hygiene-and-bugs

Conversation

@aaronkanzer

Copy link
Copy Markdown
Member

Summary

  • Add upper bounds to dependencies: gemmi>=0.6,<1, requests>=2.25,<3 (both were unbounded).
  • Add a test-no-rdkit CI job so the "rdkit absent" path is actually exercised (previously the test extra always bundled rdkit in).
  • Fix fetch_cif(retries=N) raising a confusing TypeError for negative retries instead of a clear ValueError (found via mypy).
  • Fix a real (if unlikely) Summary.id type mismatch in rcsb.find().
  • Add a minimal, non-strict [tool.mypy] config; mypy is clean.
  • Add README badges (CI, PyPI, license, Python versions), matching scigantic-pubchem's style.
  • Add CHANGELOG.md, backfilled from git log and existing tags.
  • Bump version to 0.2.1.

Test plan

  • pytest -q passes locally with the rdkit extra installed (25 passed, 4 skipped — network tests gated behind SCIGANTIC_LIVE_TESTS).
  • pytest -q -rs passes in a clean venv installed WITHOUT the rdkit extra (22 passed, 7 skipped — the 3 rdkit tests skip via pytest.importorskip, not fail).
  • mypy clean.

…/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).
@aaronkanzer
aaronkanzer merged commit 69fb6ec into main Aug 31, 2026
4 checks passed
@aaronkanzer
aaronkanzer deleted the fix/hygiene-and-bugs branch August 31, 2026 15:20
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