boot strap a new project or migrate an old one into modern uv setup with tests
mkdir newproject
cd newproject/
wget -q https://raw.githubusercontent.com/brian-learns/testafize/main/Makefile
make init
curl https://raw.githubusercontent.com/brian-learns/testafize/main/pyproject_tool.toml >> pyproject.toml
Then you will have stub python project set up with uv and static tests installed.
$ uv run newproject
Hello from newproject!
$ tree -a -I .venv/ -I .git/
.
├── .gitignore
├── Makefile
├── pyproject.toml
├── .python-version
├── README.md
├── src
│ └── newproject
│ └── __init__.py
└── uv.lock
3 directories, 7 files
Then you can run
make check
to run the static tests. There is also a stub to run pytest.
make test # will fail because there are no tests yet
wget -q https://raw.githubusercontent.com/brian-learns/testafize/main/Makefile
make init
make check
ruff An extremely fast Python linter and code formatterbandit AST based security scannervulture Find dead Python coderefurb A tool for refurbishing and modernizing Python codebasestyAn extremely fast Python type checker and language serverYou can uncomment interrogate to check for docstring coverage, but the uv init stubs don't pass this
interrogate Interrogate a codebase for docstring coverage (commented out)8 commits
Makefile
59.6%
Shell
40.4%
boot strap a new project or migrate an old one into modern uv setup with tests
mkdir newproject
cd newproject/
wget -q https://raw.githubusercontent.com/brian-learns/testafize/main/Makefile
make init
curl https://raw.githubusercontent.com/brian-learns/testafize/main/pyproject_tool.toml >> pyproject.toml
Then you will have stub python project set up with uv and static tests installed.
$ uv run newproject
Hello from newproject!
$ tree -a -I .venv/ -I .git/
.
├── .gitignore
├── Makefile
├── pyproject.toml
├── .python-version
├── README.md
├── src
│ └── newproject
│ └── __init__.py
└── uv.lock
3 directories, 7 files
Then you can run
make check
to run the static tests. There is also a stub to run pytest.
make test # will fail because there are no tests yet
wget -q https://raw.githubusercontent.com/brian-learns/testafize/main/Makefile
make init
make check
ruff An extremely fast Python linter and code formatterbandit AST based security scannervulture Find dead Python coderefurb A tool for refurbishing and modernizing Python codebasestyAn extremely fast Python type checker and language serverYou can uncomment interrogate to check for docstring coverage, but the uv init stubs don't pass this
interrogate Interrogate a codebase for docstring coverage (commented out)8 commits
Makefile
59.6%
Shell
40.4%