Skip to main content

Apply ruff code modifications and preserve git blame history.

Project description

gitruff

This package allows to quickly initialise new Python package using bleeding edge tools like linters, just run:

  • pip install gitruff
  • gitruff <your-package-name>

Now you are able to:

  • cd <your-package-name>
  • make check # To run tests and linters
  • make publish # To publish your new package to PyPi.org to make it accessable to everyone

This is also a boilerplate for a new python package, so you can create a new package this way as well:

  • git clone git@github.com:albertas/gitruff.git <your-package-name>
  • cd <your-package-name>
  • make init <your-package-name> - to start your modern package.

Development

Commonly used commands for package development:

  • make check - run unit tests and linters.
  • make fix - format code and fix detected fixable issues.
  • make publish - publishes current package version to pypi.org.
  • make compile - bump and freeze dependency versions in requirements*.txt files
  • make sync - upgrade installed dependencies in Virtual Environment (executed after make compile)

Toolset

This package uses these cutting edge tools:

  • ruff - for linting and code formatting
  • mypy - for type checking
  • pip-audit - for known vulnerability detection in dependencies
  • deadcode - for unused code detection
  • pytest - for collecting and running unit tests
  • coverage - for code coverage by unit tests
  • hatch - for publishing package to pypi.org
  • uv - for Python virtual environment and dependency management
  • pyproject.toml - configuration file for all tools
  • Makefile - aliases for commonly used command line commands

Feature requests:

  • Newly installed package could have virtualenv initialised.
  • Check if git is available before trying to initialise the repository.
  • remove init Makefile alias and cli.py command python files.
  • make a cli command: this package should be installable. Ideally this flow should work:
    • pip install gitruff
    • gitruff mynewpackage
    • cd mynewpackage && make check && make publish
  • Add pre-commit hooks with all the tools enabled.
  • codspeed.io could be considered for Continuous integration pipeline

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

gitruff-0.0.1.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

gitruff-0.0.1-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file gitruff-0.0.1.tar.gz.

File metadata

  • Download URL: gitruff-0.0.1.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.2

File hashes

Hashes for gitruff-0.0.1.tar.gz
Algorithm Hash digest
SHA256 20744b6399f28482cbe77f8bc297b1425c9ad874ce36b7828fd2f44e04cc4e48
MD5 6edd3c1f37f5a9c10f3541d4b4cfbca4
BLAKE2b-256 04a80258d8216fe889f11fe12820c4e43bf10bd877656d3d31a956d0d59e189d

See more details on using hashes here.

File details

Details for the file gitruff-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: gitruff-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.2

File hashes

Hashes for gitruff-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4b5fbb0c35ab282d5e9c4649ac075bdfe7902c4fa3a3bcdea73cc3e9b760cfb5
MD5 2261e603574449e9b7616eae755da1ce
BLAKE2b-256 b9bc9003eda4b12bcdcbe4e4d7b7134445b729fc072da381cda9a6ae75634412

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