Module for a code quality related scripts.
Project description
[!IMPORTANT]
This project is under development. All source code and features on the main branch are for the purpose of testing or evaluation and not production ready.
MFD Code Quality
This module provides a set of methods for checking code quality.
Along with the module installation, additional CLI tools appear in your environment.
Usage
When installing mfd-code-quality package all the commands from table below will become available from command-line.
So you can just type i.e. mfd-help in your terminal without a need to call it from Python.
If command requires configuration, the config file will be automatically created and removed after execution.
Available commands
| Command | Description |
|---|---|
mfd-help |
Log available commands. |
mfd-code-standard |
Check code standard using Ruff (format, check) or flake8. Depending on what is available. |
mfd-code-format |
Format code using ruff check --fix and ruff format. |
mfd-import-tests |
Try to import each Python file to check import problems. |
mfd-system-tests |
Run system tests. |
mfd-unit-tests |
Run unit tests. |
mfd-unit-tests-with-coverage |
Run unittests and check if diff coverage (new code coverage) is reaching the threshold (80%). |
mfd-all-checks |
Run all available checks. |
Available arguments (for all commands)
-
-p/--project-dir- path to the root directory (default: current working directory) -
-v/--verbose- enable verbose output
[!NOTE] All commands are expected to be run from the root directory of the project.
Recommended file structure:<project> ├── <package> │ ├── __init__.py │ ├── ... ├── tests │ ├── system │ │ ├── __init__.py │ │ └── ... │ ├── unit │ │ ├── __init__.py │ │ └── ... │ └── __init__.py ├── pyproject.toml ├── README.md └── ...
Configuration files
We are using 2 configuration files (created/modified/removed automatically):
-
ruff.toml- for ruff configuration -
pyproject.toml- for project/generic configuration
Custom configuration
Some modules have custom configuration files. Files are stored in mfd_code_quality/code_standard/config_per_module directory. Configuration files are merged with generic one during configuration process.
OS supported:
OS agnostic
Issue reporting
If you encounter any bugs or have suggestions for improvements, you're welcome to contribute directly or open an issue here.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mfd_code_quality-1.3.0-py3-none-any.whl.
File metadata
- Download URL: mfd_code_quality-1.3.0-py3-none-any.whl
- Upload date:
- Size: 42.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a13a03adbd8bb4669f0f178a121983ce54918ea281bc922996b7798e8eede9ab
|
|
| MD5 |
c66c5ac1f8c2e1a0af339436f96a01bb
|
|
| BLAKE2b-256 |
a5a9d5e6f8d55491c567ae9ef7975e05ec439b77fa08d3bc936998ade664b2e9
|