Skip to content

B1: Modernize packaging, tooling and CI #39

Closed

Description

@otsobide

The 1.0 redesign rewrites the library family by family, and every one of those commits has to be checked by the same reliable gates. Today the metadata is split between a broken setup.cfg and a stub pyproject.toml, make test runs unittest in a way that shadows the stdlib numbers module, nothing lints or type-checks the code, and CI targets Python versions 1.0 drops. This block moves packaging to PEP 621, makes uv and pytest the single way to run the project, adds ruff, mypy and coverage, and replaces CI with a 3.11-3.15 matrix plus a quality job. It leaves the 0.x behaviour untouched: the legacy suite keeps passing, now under pytest with warnings as errors.

Fixes items C08/C44, C45, C50, C43 and C55 of #32.

Tasks

  • Move the packaging metadata to a PEP 621 pyproject.toml (transitional packages.find); delete setup.cfg and requirements.txt; requires-python >= 3.11, version stays 0.28.1. (8f78371)
  • Add the dev dependency group and uv.lock. (1583582)
  • Run the 0.x suite under pytest (both file patterns; warnings are errors, plus the transitional SyntaxWarning filter). (f7d5efb)
  • Rewrite the Makefile with real .PHONY targets. (4fa9bac)
  • Add the ruff and mypy configuration, excluding legacy code. (bcfc00f)
  • Replace the CI workflow with the uv matrix for 3.11-3.15 plus the quality job, and fix the README badge. (a0c8e52)
  • Update the AGENTS.md commands for pytest, uv and make. (f71d20c)

Related bugs

Review fixes

  • Fix the C43 collection report for stdlib paths with spaces. (e4ca431)
  • Fix the C43 module-name check that passed on partial runs. (023143b)
  • Fix the duplicated assertions and helpers in test_project.py. (c38fa65)
  • Fix the .gitignore checks outside a git work tree. (a89fb1f)
  • Fix the sdist that shipped a lone tests/test_project.py: MANIFEST.in prunes tests/. (39ddaa8)
  • Fix the coverage report that left out never-imported legacy modules (transitional include_namespace_packages). (55bd8e4)
  • Fix the CI checks that passed with commented-out steps. (d4fcd2c)
  • Fix the untested mypy gate and ruff rule set. (9a62c8a)
  • Fix the no-op python_files setting labelled transitional. (5d3473d)
  • Fix the Python versions named for the reworded escape-sequence warning. (b9e131f)
  • Fix the Typing :: Typed claim made without a py.typed marker. (acfdc41)
  • Fix the AGENTS.md note that hid the remaining stdlib shadowing. (521522a)
  • Fix the .gitignore section that filed the mypy daemon files under ruff. (fdff6dc)

Notes

  • The coverage configuration ([tool.coverage.run]/[tool.coverage.report], with the transitional fail_under = 0) landed in 4fa9bac, although that commit's subject only names the Makefile. bcfc00f also reformatted the README. Published history is left as is.
  • The legacy tests/numbers package still shadows the stdlib numbers whenever tests/ itself is on sys.path (e.g. cd tests && python -m pytest). AGENTS.md says to run tests from the repository root; the hazard ends when B3.5 deletes tests/numbers.
  • For B10: python_files is gone already (it was pytest's default), so B10.1 has nothing to remove there. B10.2 adds Typing :: Typed and the py.typed package data together with pyvalueobjects/py.typed; a test requires all three to come together. include_namespace_packages is transitional too, and becomes unnecessary once the legacy code has __init__.py files (B2.1) and is omitted (B2.7).
  • GitHub Actions is disabled for this repository (tests.yml and codeql.yml are in state disabled_inactivity), so no B1 commit has run in CI yet. Every commit was checked locally on Python 3.11-3.15. The owner can re-enable it with gh workflow enable tests.yml -R otsobide/python-value-objects.

Activity

  1. otsobide commented on Oct 26, 2026

    @otsobide
    OwnerAuthor

    Done in 8f78371..fdff6dc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions