Skip to content

Migrate build to Poetry and prep for PyPI release#7

Closed
faizollah wants to merge 1 commit into
mainfrom
pypi-release-prep
Closed

Migrate build to Poetry and prep for PyPI release#7
faizollah wants to merge 1 commit into
mainfrom
pypi-release-prep

Conversation

@faizollah

@faizollah faizollah commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Release-prep for #4 (publish to PyPI). This is the code half; #4 closes once the package is actually live on PyPI.

What changed

  • Build backend hatchling → poetry-core. Kept the PEP 621 [project] layout, so dependency constraints are preserved exactly (no caret upper-caps introduced). Added poetry.lock for reproducible dev/CI.
  • Added [project.urls] — Homepage / Repository / Issues → this repo.
  • Fixed requires-python. >=3.9 was never actually valid: flwr requires >=3.10, and flwr 1.31+ requires >=3.11. Set to >=3.11,<4.0 — matches flwr and our dev environments, and is what lets Poetry resolve a lockfile. Hatchling never checked this; Poetry's resolver surfaced it.
  • Dropped Python 3.10 from the CI matrix to match the new floor.
  • README: install now leads with pip install flwrcrate; states Python ≥ 3.11; source URL points at eScienceLab.

⚠️ Reviewer note (support policy)

This raises the minimum Python from an (invalid) 3.9 to 3.11, dropping 3.10. Rationale: flwr 1.31+ already requires 3.11, so keeping 3.10 would pin those users to flwr ≤ 1.30. Happy to instead keep 3.10 with split flwr constraints if we want to preserve it — flagging since it's a public support change.

Verification

  • poetry build → valid sdist + wheel; wheel contains only flwrcrate/ (no tests), correct metadata (Requires-Python: >=3.11,<4.0, MIT, all URLs).
  • Wheel installs with its full dependency tree into a clean venv and imports (from flwrcrate import FLCrateTracker OK).
  • 51 tests pass at 92% coverage.

Part of #4

@faizollah faizollah requested review from elichad and removed request for elichad July 1, 2026 12:16
Switch the build backend from hatchling to poetry-core, keeping the PEP 621
[project] layout so exact dependency constraints are preserved (no caret
upper-caps introduced). Add poetry.lock for reproducible dev/CI.

- Add [project.urls] (Homepage/Repository/Issues -> eScienceLab/flwrCrate)
- Fix requires-python: ">=3.9" was never valid because flwr requires >=3.10
  (and flwr 1.31+ requires >=3.11). Set ">=3.11,<4.0" to match flwr and the
  supported dev environments; this is what lets Poetry resolve a lockfile.
- Drop Python 3.10 from the CI matrix to match the new floor
- README: lead install with `pip install flwrcrate`, state Python >=3.11,
  and point the source URL at eScienceLab

Verified: poetry build produces a valid sdist+wheel; the wheel installs with
its full dependency tree into a clean venv and imports; 51 tests pass at 92%
coverage.

Part of #4
@faizollah faizollah force-pushed the pypi-release-prep branch from 9bca248 to feea825 Compare July 1, 2026 12:21
@faizollah faizollah closed this Jul 1, 2026
@faizollah faizollah deleted the pypi-release-prep branch July 1, 2026 12:30
Comment thread .github/workflows/tests.yml
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.

2 participants