Skip to main content

Automates task to check configurations about Python project to follow best practices to increase development velocity.

Project description

pyvelocity

Test CodeQL Code Coverage Maintainability Dependabot Python versions X URL

Automates task to check configurations about Python project to follow best practices to increase development velocity.

Attention

The development status of this package is Beta now. It may not be able to keep backward compatibility. Be careful to use, especially for CI.

Available Checks

PyVelocity performs the following checks to ensure your Python project follows best practices:

Core Configuration Checks

line-length

Ensures consistent line length settings across all Python development tools:

  • docformatter: wrap-descriptions and wrap-summaries
  • isort: line_length
  • Black: line-length
  • flake8: max-line-length
  • Ruff: line-length
  • Pylint: format.max-line-length

using-py-project-toml

Verifies that your project uses pyproject.toml for configuration instead of legacy files.

legacy-setup-files

Ensures that neither setup.py nor setup.cfg files are present in the project. These legacy configuration files should be replaced with pyproject.toml for modern Python packaging.

Project Metadata Checks

classifiers

Validates that Python version classifiers in pyproject.toml are consistent with the requires-python field. For example, if requires-python = ">=3.9", the classifiers should include all supported Python versions from 3.9 to the latest available.

requires-python

Ensures that the requires-python field supports the latest stable Python version to encourage adoption of newer Python features and improvements.

readme

Checks that the readme field is properly configured as "README.md" in the [project] section of pyproject.toml.

keywords

Ensures that at least one keyword is defined in the [project] section of pyproject.toml. Keywords help improve package discoverability on PyPI and other package indexes.

Package Configuration Checks

zip-safe-false

Verifies that zip-safe = false is set in the [tool.setuptools] section to prevent issues with modern Python packaging.

typed

Ensures proper type hint configuration for typed packages:

  • Validates that tool.setuptools.package-data includes "*" = ["py.typed"]
  • Checks for the presence of py.typed files in package directories
  • Requires the "Typing :: Typed" classifier in project metadata

This check helps ensure your package properly declares itself as typed for better IDE support and type checking.

Quickstart

1. Install

pip install pyvelocity

2. Run command

Run the following command in your project directory (where pyproject.toml exists):

pyvelocity

Expected Output

Success: If all checks pass, you'll see:

Looks high velocity! ⚡️ 🚄 ✨

Issues Found: If checks fail, PyVelocity will display specific error messages and exit with a non-zero status code, making it perfect for CI/CD integration.

How do I...

Ignore specific check?

You can configure PyVelocity to ignore specific checks by adding them to the filter list in pyproject.toml. For example, to ignore the line-length and typed checks:

[tool.pyvelocity]
filter = [
  "line-length",
  "typed"
]

Available check IDs:

  • line-length
  • using-py-project-toml
  • legacy-setup-files
  • classifiers
  • requires-python
  • readme
  • keywords
  • zip-safe-false
  • typed

Credits

This package was created with Cookiecutter and the yukihiko-shinoda/cookiecutter-pypackage project template.

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

pyvelocity-0.8.1.tar.gz (27.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyvelocity-0.8.1-py3-none-any.whl (36.6 kB view details)

Uploaded Python 3

File details

Details for the file pyvelocity-0.8.1.tar.gz.

File metadata

  • Download URL: pyvelocity-0.8.1.tar.gz
  • Upload date:
  • Size: 27.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyvelocity-0.8.1.tar.gz
Algorithm Hash digest
SHA256 c4ec3260b3c79aa8b469e9e27259ddee616c0ea404a13dc2d039d30693fb0277
MD5 98709a3fe4a59130656e34b3770872fb
BLAKE2b-256 89de48847ae1eba0e9f8c640f1b7f1e6826df40ff50ac05e313efdf9ad0727e9

See more details on using hashes here.

File details

Details for the file pyvelocity-0.8.1-py3-none-any.whl.

File metadata

  • Download URL: pyvelocity-0.8.1-py3-none-any.whl
  • Upload date:
  • Size: 36.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyvelocity-0.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f9598379f7a98569d7e05704b1a760626ea8cc93cf10a930ed2b4c68c190516d
MD5 3a0824c7ca0b67412aa888991a425781
BLAKE2b-256 168d0621f826feb239c7f85b9a25c53f2c53b7fe881a3bcb7f28e7ac09a40e63

See more details on using hashes here.

Supported by

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