-
Notifications
You must be signed in to change notification settings - Fork 773
Open
Labels
Description
- Part of: WAMP Python Ecosystem Modernization
- Depends on: Modernization Phase 1.1: Git Submodules Setup #1784 Phase 1.1 (Git Infrastructure) - ✅ Complete
- Phase: 1.2 of 1.6
Objective
Modernize build system to use modern Python tooling: pyproject.toml, ruff, uv, just, pytest, and mypy. Remove legacy
build files and consolidate all configuration into pyproject.toml following PEP 621.
Background
Phase 1.1 established git infrastructure (.ai/.cicd submodules, git hooks, GitHub templates). Phase 1.2 modernizes the
build tooling to ensure consistent, maintainable builds across the WAMP Python ecosystem.
Tasks
- Audit Current State
- Document current build system configuration
- Identify which legacy files exist (setup.py, setup.cfg, requirements.txt, tox.ini, .flake8, etc.)
- Review existing pyproject.toml (if present)
- Check justfile completeness
- Configuration Migration
- Add/update [tool.ruff] configuration in pyproject.toml
- Lint rules
- Format settings
- Line length, target Python versions
- Add/update [tool.mypy] configuration in pyproject.toml
- Type checking strictness
- Ignore patterns
- Plugin configuration (if needed)
- Add/update [tool.pytest.ini_options] in pyproject.toml
- Test discovery patterns
- Pytest options
- Add/update [tool.coverage.*] in pyproject.toml
- Coverage thresholds
- Exclude patterns
- Report settings
- Legacy File Removal
- Remove flake8 configuration files (.flake8, setup.cfg flake8 section)
- Remove tox.ini (replaced by justfile recipes)
- Remove/minimize setup.py (keep minimal shim only if needed for editable installs)
- Remove setup.cfg entirely (migrate to pyproject.toml)
- Remove requirements.txt files (migrate to pyproject.toml dependencies)
- Justfile Enhancement
- Verify all essential recipes exist:
- test - Run pytest
- check-format - Check code formatting with ruff
- check-typing - Type check with mypy
- check-lint - Lint with ruff
- check - Run all checks
- format - Auto-format code with ruff
- build - Build distributions
- Add missing recipes if needed
- Ensure recipes use virtual environment isolation
- Verification
- Run just check cpy314 - all checks must pass
- Run just test cpy314 - all tests must pass
- Run just build cpy314 - package builds successfully
- Verify editable install works: pip install -e .
- Test on additional Python versions (cpy311, cpy312, cpy313, pypy311)
- Documentation
- Update README.md if build instructions changed
- Update CONTRIBUTING.md if development workflow changed
- Ensure pyproject.toml is well-commented
Deliverables
- ✅ pyproject.toml with complete modern configuration (PEP 621)
- ✅ All tools configured: ruff, mypy, pytest, coverage
- ✅ No legacy build files (setup.py minimized, setup.cfg/requirements.txt removed)
- ✅ Comprehensive justfile with all necessary recipes
- ✅ All checks passing (just check cpy314)
- ✅ Documentation updated
Success Criteria
- just check cpy314 passes with zero errors
- Package builds successfully
- No legacy configuration files remain
- pyproject.toml follows PEP 621 standards
- Consistent tooling with other WAMP ecosystem repos
Related Issues
- Phase 1.1: Modernization Phase 1.1: Git Submodules Setup #1784 - Complete
- Phase 1.3: Build tooling must be complete before wheel building
Notes
- This work follows the multi-stage git workflow (asgard1 → bare repo → dev PC → GitHub)
- Changes will be made with AI assistance (Claude Code) following AI_POLICY.md
- Maintain backward compatibility where possible
- Focus on consistency across the WAMP Python ecosystem
Branch
Work will be done on branch: modernization-phase-1.2
Note: This is part of a coordinated modernization effort across 7 WAMP Python repositories. See the tracking document for the full plan.