Make clean-checkout installation and test execution reproducible #5

Closed
opened 2026-08-23 22:37:28 +02:00 by kristofferopsahl · 1 comment
Collaborator

Finding

A clean checkout does not declare enough information to install and validate the project reliably:

  • pyproject.toml lists runtime dependencies only; pytest and Playwright test requirements are undeclared.
  • There is no lockfile or constraints file, despite broad lower bounds such as numpy>=1.26 and fastapi>=0.110.
  • There is no Forgejo Actions workflow.
  • [tool.setuptools].packages omits backend.web and backend.odds, even though both are imported by the application. An installed wheel would therefore be incomplete.
  • No [build-system] is declared.

Observed baseline: python3 -m pytest fails immediately with No module named pytest; syntax compilation and Node parse checks pass, but the test suite cannot be run from repository metadata alone.

Suggested direction

  • Declare complete runtime packages using package discovery.
  • Add a build backend and a test/dev dependency group including pytest and browser-test requirements.
  • Add a lock/constraints strategy appropriate to the supported Python versions.
  • Add Forgejo CI that installs from the declared metadata, builds a wheel, verifies wheel contents/imports, and runs the non-browser and browser suites in clearly separated jobs.

Acceptance criteria

  • One documented command creates an environment and runs the test suite from a clean checkout.
  • A built distribution imports backend.web.main and backend.odds successfully.
  • CI exercises the same declared dependency path without hidden machine-global packages.
## Finding A clean checkout does not declare enough information to install and validate the project reliably: - `pyproject.toml` lists runtime dependencies only; `pytest` and Playwright test requirements are undeclared. - There is no lockfile or constraints file, despite broad lower bounds such as `numpy>=1.26` and `fastapi>=0.110`. - There is no Forgejo Actions workflow. - `[tool.setuptools].packages` omits `backend.web` and `backend.odds`, even though both are imported by the application. An installed wheel would therefore be incomplete. - No `[build-system]` is declared. Observed baseline: `python3 -m pytest` fails immediately with `No module named pytest`; syntax compilation and Node parse checks pass, but the test suite cannot be run from repository metadata alone. ## Suggested direction - Declare complete runtime packages using package discovery. - Add a build backend and a test/dev dependency group including pytest and browser-test requirements. - Add a lock/constraints strategy appropriate to the supported Python versions. - Add Forgejo CI that installs from the declared metadata, builds a wheel, verifies wheel contents/imports, and runs the non-browser and browser suites in clearly separated jobs. ## Acceptance criteria - One documented command creates an environment and runs the test suite from a clean checkout. - A built distribution imports `backend.web.main` and `backend.odds` successfully. - CI exercises the same declared dependency path without hidden machine-global packages.
Author
Collaborator

Implemented on main in commit 76ab711 and covered by regression tests. Closing as complete.

Implemented on main in commit 76ab711 and covered by regression tests. Closing as complete.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
solvreven/FPL#5
No description provided.