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.flake8isort.cfgpyproject.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
isortfor 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:
- Fork the repository.
- Create a new branch (
git checkout -b feature/YourFeature). - Commit your changes (
git commit -m 'Add YourFeature'). - Push to the branch (
git push origin feature/YourFeature). - 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)
| File | Size | Uploaded | |
|---|---|---|---|
| pygoodpractices-0.1.0.tar.gz | 5.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|