Skip to content

Foundation: Python ≥3.10 + UV + dependency-groups#290

Open
jeandet wants to merge 14 commits into
SciQLop:mainfrom
jeandet:modernisation/pr1-uv-foundation
Open

Foundation: Python ≥3.10 + UV + dependency-groups#290
jeandet wants to merge 14 commits into
SciQLop:mainfrom
jeandet:modernisation/pr1-uv-foundation

Conversation

@jeandet
Copy link
Copy Markdown
Member

@jeandet jeandet commented May 8, 2026

Summary

First PR of a tooling/test modernisation effort (design spec on file at docs/superpowers/specs/2026-05-08-speasy-modernisation-design.md, plan at docs/superpowers/plans/2026-05-08-pr1-foundation-uv-py310.md).

  • Bumps requires-python to >=3.10 (CI matrix already starts at 3.10; the declared floor catches up). Drops the 3.9 classifier.
  • Replaces requirements.txt, requirements_dev.txt, and docs/requirements.txt with [dependency-groups].dev and [dependency-groups].docs in pyproject.toml. uv.lock is checked in for reproducible installs.
  • Switches CI (.github/workflows/tests.yml, .github/workflows/PRs.yml) and Read the Docs (.readthedocs.yaml) to astral-sh/setup-uv@v6 + uv sync + uv run.
  • Drops tox.ini (referenced deleted requirements files) and setup.cfg (only obsolete entries: bdist_wheel universal=1 is wrong since Speasy is Py3-only, [aliases] test = pytest is dead setup.py test machinery, [flake8] exclude = docs is moot once flake8 is scoped to speasy tests).
  • Updates Makefile, CLAUDE.md, CONTRIBUTING.rst to drop the PYTHONPATH=. pattern in favor of uv sync / uv run.

Build backend (flit_core) is unchanged — backend swap to hatchling + uv-dynamic-versioning is a later PR in the series.

Test plan

  • CI green across Linux/macOS/Windows × Python 3.10–3.14
  • Read the Docs preview build succeeds (RTD bot link)
  • make doctest succeeds in CI
  • Local: uv sync --group dev --group docs && uv run pytest tests/test_datetimerange.py passes

jeandet and others added 13 commits May 8, 2026 15:55
Captures decisions on UV adoption, hatchling build backend, ruff/basedpyright
tooling, and three-tier test strategy (unit/contract/e2e). Sequences the work
as 17 small PRs ending with a mass reformat.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Per-task implementation plan for the first PR of the modernisation effort.
Covers pyproject.toml updates, uv.lock generation, CI/RTD switch to uv,
deletion of requirements*.txt / tox.ini / setup.cfg, and developer-doc
updates to drop the PYTHONPATH=. pattern.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add SPEASY_CORE_HTTP_REWRITE_RULES env to PRs.yml non-3.10 pytest step
  (previously only on push/scheduled tests.yml — would have hit a
  non-existent server on PR builds for non-3.10 matrix entries).
- Add --with wheel to PRs.yml build step for parity with tests.yml.
- Scope flake8 to 'speasy tests' in both workflows (matches Makefile
  lint target). Avoids silently broadening lint to docs/conf.py and
  removes the .venv exclusion workaround that was needed when
  flake8 ran from repo root.
@jeandet jeandet force-pushed the modernisation/pr1-uv-foundation branch from 0dafd72 to 0ef85dc Compare May 8, 2026 13:56
Without UV_PROJECT_ENVIRONMENT, uv creates .venv/ inside the project
and RTD's sphinx step (which calls $READTHEDOCS_VIRTUALENV_PATH/bin/python
directly) fails with 'python: not found'. Point uv at RTD's venv so the
install lands where the runner looks for it.
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 8, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
2 Security Hotspots

See analysis details on SonarQube Cloud

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