Skip to content

kfiramar/Python-quality-toolkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Python Code Quality Assurance Toolkit

A powerful πŸ’ͺ bash script to automate the process of maintaining code quality in Python projects.

πŸ—‚οΈ Table of Contents

πŸ“š Description

The Python Code Quality Assurance Toolkit provides a bash script that automates various tasks related to maintaining code quality in Python projects. Whether you're an individual developer or part of a larger team, this tool offers a flexible solution to keep your Python code clean, efficient, and secure.

The script performs the following actions:

  1. Installs necessary Python packages for linting, formatting, and complexity analysis.
  2. Runs linters and formatters including flake8, pylint, pycodestyle, pydocstyle, autopep8, isort, and black on the Python project.
  3. Performs type checking with mypy.
  4. Scans the Python code for security vulnerabilities with Bandit.
  5. Analyzes the complexity of the Python code with Radon.
  6. Runs tests on the Python project with pytest.
  7. Checks code coverage of the tests.
  8. Checks for known security vulnerabilities in the installed dependencies with Safety.
  9. Generates a requirements file with pipreqs.
  10. Creates a .gitignore and optionally a .dockerignore file.
  11. Counts the lines of code in the Python project with cloc.

πŸš€ Installation

πŸ“₯ To install and set up the project, follow these steps:

  1. Clone the repository: git clone https://github.com/username/project.git.
  2. Navigate to the project directory: cd project.
  3. Ensure you have all the necessary Python packages installed. They're listed in the requirements.txt file. You can install them using pip: pip install -r requirements.txt.

πŸ› οΈ Usage

You can run the script using the bash command in the terminal: bash code_quality.sh. Remember to replace the DIR variable in the script with the path to your Python project directory. The REQUIREMENTS variable should point to the location where you want to generate the requirements file.

πŸ§ͺ Tests

The script uses pytest to run the tests in your Python project. Make sure you write comprehensive tests to ensure the correctness of your code.

πŸ› οΈ Built With

  • Python
  • Bash
  • And a range of Python libraries and tools including flake8, autopep8, isort, black, mypy, bandit, pipreqs, radon, pylint, pytest, coverage, safety, pycodestyle, pydocstyle, and cloc.

πŸ‘₯ Contributing

Contributions are welcome. Here's how you can contribute:

  1. Fork the project.
  2. Create your feature branch: git checkout -b my-new-feature.
  3. Commit your changes: git commit -am 'Add some feature'.
  4. Push to the branch: git push origin my-new-feature.
  5. Submit a pull request.

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE.md file for details.

πŸ™ Acknowledgments

  • Contribute to the code and you will be here

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages