Python Template with UV
Feature
CI/CD
- publish your package to pypi
- test matrix
- mkdocs-material
mkdocs deps
uv add mkdocs-material pymdown-extensions mkdocs-glightbox mkdocs-git-revision-date-localized-plugin mkdocs-obsidian-bridge mkdocs-publisher --optional mkdocs
pre-commit
- basic
pre-commit-hooks codespell checkruff-pre-commit
Lint and Format with Ruff
[tool.ruff]
# cover and extend the default config in https://docs.astral.sh/ruff/configuration/
extend-exclude = [""]
target-version = "py310"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"ARG001", # unused arguments in functions
]
ignore = [
"E501", # line too long, handled by black
"B008", # do not perform function calls in argument defaults
"W191", # indentation contains tabs
"B904", # Allow raising exceptions without from e, for HTTPException
"COM819", # Trailing comma prohibited
"D100", # Missing docstring in public module(file)
"D104", # Missing docstring in public package
"D203", # 1 blank line required before class docstring
"E201", # Whitespace after '('
"E202", # Whitespace before ')'
"E203", # Whitespace before ':'
"E221", # Multiple spaces before operator
"E241", # Multiple spaces after ','
"E251", # Unexpected spaces around keyword / parameter equals
"W291", # Trailing whitespace
"W293", # Blank line contains whitespace
]
isort = { combine-as-imports = true , split-on-trailing-comma = false }
# Avoid trying to fix flake8-bugbear (`B`) violations.
unfixable = ["B"]
[tool.ruff.format]
docstring-code-format = true
skip-magic-trailing-comma = true
Mypy and Pytest
[tool.pytest.ini_options]
# Set additional command line options for pytest:
# -r: show extra test summary info
# X: show extra info on xfailed tests
# s: don't capture stdout (allow print statements)
# --strict-config: any warnings about configuration are treated as errors
# --strict-markers: treat unregistered markers as errors
addopts = "-rXs --strict-config --strict-markers"
xfail_strict = true # Treat tests that are marked as xfail but pass as test failures
filterwarnings = ["error"] # Treat all warnings as errors
[tool.coverage.report]
fail_under = 100
show_missing = true
skip_covered = true
todo:codecov ci and replace coverage with it
git-cliff
We follow a specific format for commit messages to maintain a clear and organized project history.
with git-cliff default config
feat:New features or enhancementsfix:Bug fixesdoc:Documentation updatesperf:Performance improvementsrefactor:Code refactoring without adding features or fixing bugsstyle:Code style changes (formatting, missing semi-colons, etc.)test:Adding or modifying testschore:Routine tasks, maintenance, or tooling changesrevert:Reverting a previous commit
copier
Release files for python-uv 0.0.38
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| python_uv-0.0.38.tar.gz | 19.8 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| python_uv-0.0.38-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.8 MB
Release files / python_uv-0.0.38.tar.gz
| Download URL | python_uv-0.0.38.tar.gz |
|---|---|
| Size | 19.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
df498a8d28bb7de2442cddf68a19d61a79db3bcd0370d70158e4eddffe3018c4
|
|
BLAKE2b-256 checksum How to use checksums |
8aef32978c1bd934d5b536e0a24b34e43b7404df42b9eb255b8c404e793a897a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.4.30
|
Release files / python_uv-0.0.38-py3-none-any.whl
| Download URL | python_uv-0.0.38-py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
af247965406fc44eaea5c5a0c8d24111eacc0674cdbbb6512b7334c9193e1806
|
|
BLAKE2b-256 checksum How to use checksums |
6368e4507dd4434dc787cb8afaea90939de39e946fed2cc6cb8b3afd2da687ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.4.30
|