Skip to main content

python template package

Project description

Python Template with UV

uv Ruff

Versions

Test Coverage

Feature

CI/CD

  1. publish your package to pypi
  2. test matrix
  3. 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

  1. basic pre-commit-hooks
  2. codespell check
  3. ruff-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 enhancements
  • fix: Bug fixes
  • doc: Documentation updates
  • perf: Performance improvements
  • refactor: Code refactoring without adding features or fixing bugs
  • style: Code style changes (formatting, missing semi-colons, etc.)
  • test: Adding or modifying tests
  • chore: Routine tasks, maintenance, or tooling changes
  • revert: Reverting a previous commit

copier

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_uv-0.0.33.tar.gz (19.8 MB view details)

Uploaded Source

Built Distribution

python_uv-0.0.33-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file python_uv-0.0.33.tar.gz.

File metadata

  • Download URL: python_uv-0.0.33.tar.gz
  • Upload date:
  • Size: 19.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for python_uv-0.0.33.tar.gz
Algorithm Hash digest
SHA256 ad723e22cae1b17894418027fbf9d2a296ea3122b4004cb653e01d0d76a35060
MD5 a63653c6bc845e2662d6307e596c6553
BLAKE2b-256 fc41d63ba55a82a61eb9b8558212a0b0fd5b62088891f994bf2b83b58db99d52

See more details on using hashes here.

File details

Details for the file python_uv-0.0.33-py3-none-any.whl.

File metadata

  • Download URL: python_uv-0.0.33-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for python_uv-0.0.33-py3-none-any.whl
Algorithm Hash digest
SHA256 883f5cf5ffb997077647ad12e732a93a218dad14442d02e8151d9e1b62e30472
MD5 ed0538232f1caba040b1facc869443c5
BLAKE2b-256 409f1ea0b9ffa64ec7876dd54da359781661ba3d9adb2cd0407f98618bdb48ab

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page