Problem Statement
The repository currently has 40+ Python projects with zero automated tests and no Python CI pipeline. When contributors submit new projects or modify existing ones, there is no mechanism to verify the code runs without syntax errors, ensure new changes don't break existing projects, or enforce code quality standards. This makes maintenance challenging as the project grows.
Proposed Enhancement
Set up a Python CI pipeline and lightweight testing infrastructure using only Python standard library (unittest) to maintain the zero-dependency ethos:
- Create a
tests/ directory with test files for existing projects
- Add a
.github/workflows/python-ci.yml workflow that runs on push/PR to main
- Test matrix across Python 3.10, 3.11, 3.12
- Syntax-check all
.py files with python -m py_compile
- Run
python -m unittest discover -s tests -v
- Add basic
unittest tests for representative projects (math, games, utilities)
- Update
CONTRIBUTING.md with a "Writing Tests" section
Suggested Implementation
.github/workflows/python-ci.yml:
- Trigger:
push and pull_request on main
- Strategy matrix:
python-version: ["3.10", "3.11", "3.12"]
- Steps: checkout → setup-python → syntax check all
.py files → run unittest
tests/ directory:
tests/test_armstrong.py — test pure math functions
tests/test_number_guessing.py — test game logic
tests/test_typing_speed.py — test utility functions
pyproject.toml:
- Basic project metadata, Python >=3.10 requirement
Problem Statement
The repository currently has 40+ Python projects with zero automated tests and no Python CI pipeline. When contributors submit new projects or modify existing ones, there is no mechanism to verify the code runs without syntax errors, ensure new changes don't break existing projects, or enforce code quality standards. This makes maintenance challenging as the project grows.
Proposed Enhancement
Set up a Python CI pipeline and lightweight testing infrastructure using only Python standard library (
unittest) to maintain the zero-dependency ethos:tests/directory with test files for existing projects.github/workflows/python-ci.ymlworkflow that runs on push/PR tomain.pyfiles withpython -m py_compilepython -m unittest discover -s tests -vunittesttests for representative projects (math, games, utilities)CONTRIBUTING.mdwith a "Writing Tests" sectionSuggested Implementation
.github/workflows/python-ci.yml:pushandpull_requestonmainpython-version: ["3.10", "3.11", "3.12"].pyfiles → rununittesttests/directory:tests/test_armstrong.py— test pure math functionstests/test_number_guessing.py— test game logictests/test_typing_speed.py— test utility functionspyproject.toml: