Skip to main content

pygoodpractices

pygoodpractices is a Python tool designed to automate the setup of pre-commit hooks and standard configuration files, promoting best practices in Python projects.

Table of Contents

Features

  • Automatically generates configuration files:
    • .pre-commit-config.yaml
    • .flake8
    • isort.cfg
    • pyproject.toml
  • Installs and initializes pre-commit hooks.
  • Ensures code quality and consistency across projects.

Installation

Ensure you have Python 3.6 or later installed. You can install pygoodpractices using pip:

pip install pygoodpractices

Alternatively, clone the repository and install it locally:

git clone https://github.com/yourusername/pygoodpractices.git
cd pygoodpractices
pip install .

Usage

After installation, you can set up your project with the following commands:

setup-pygoodpractices
install-pygoodpractices
  • pygood-init: Generates the necessary configuration files in your project directory and Installs and initializes the pre-commit hooks.
  • pygood --all: Runs all pre-commit hooks on every file in the repository, ensuring code follows best practices before committing.
  • pygood --files <file1> <file2> <file3>: Runs all pre-commit hooks on specified files , ensuring code follows best practices before committing.

Configuration Files

The tool generates the following configuration files:

  • ``: Configures pre-commit hooks.
  • ``: Sets rules for Flake8, a Python linting tool.
  • ``: Configures isort for sorting imports.
  • ``: Contains project metadata and tool configurations.

Feel free to customize these files to fit your project's specific needs.

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/YourFeature).
  3. Commit your changes (git commit -m 'Add YourFeature').
  4. Push to the branch (git push origin feature/YourFeature).
  5. Open a Pull Request.

Ensure your code adheres to the existing style and passes all tests. For more details, see the CONTRIBUTING.md file.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For questions or suggestions, please open an issue or contact petudeveloper.

Release files for pygoodpractices 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pygoodpractices 0.1.0
File Size Uploaded
pygoodpractices-0.1.0.tar.gz 5.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pygoodpractices 0.1.0
File Interpreter ABI Platform
pygoodpractices-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.8 kB

Release files / pygoodpractices-0.1.0.tar.gz

Download URL pygoodpractices-0.1.0.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
45be4c29033b0b8ef5f51dae45ee147da0d73f9827981d19c824f3f0c4fa28f4
BLAKE2b-256 checksum
How to use checksums
d117621f8db405f03a3a6bc9e3aa793cb9bcc1f4447482fc145bc3f612e54af2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.0

Release files / pygoodpractices-0.1.0-py3-none-any.whl

Download URL pygoodpractices-0.1.0-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ad75f3acd08a92649545dfa1e16bde9caef4fb703131ec6205bac39bc993754b
BLAKE2b-256 checksum
How to use checksums
5be5cabaeef4b2b5643413451a2e73f8c0a566658651879c96c942f74f3c16f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.0

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page