pcsFilter
Tool for filtering out Python Code Smells by formatting the code and checking the code style after.
pcsFilter is a wrapper around the following tools:
pcsFilter runs mentioned tools in a given order. The following functionality is applied on top:
- flake8 number of issues with details and radon cc score are saved upon
the first run to ./.pcsFilter folder. The ./.pcsFilter folder path is
default and can be overriden via the output path option
(
-oor--output-path). - When pcsFilter is executed again the new results are compared with the previous ones.
- If new results are worse then:
- a short message will be printed
- if "strict" (
-sor--strict) option is used then:- pcsFilter will exit with status = 1
- New scores and their details will be saved to a default or given output path.
Usage
Shell
Installation
pip install pcsFilter
Base command
pcsFilter <path to project or file>
Strict
Fail with status = 1, when new scores are worse. Has no effect during the first run.
pcsFilter -s <path to project or file>
pcsFilter --strict <path to project or file>
Override output path
Default output path is ./.pcsFilter. It can be overriden the following way:
pcsFilter -o <new output path> <path to project or file>
pcsFilter --output-path <new output path> <path to project or file>
Help message
pcsFilter --help
Docker
Installation
docker pull alexdbondarev/pcsfilter:latest
Base command
docker run --rm -v $(PWD):/project -it alexdbondarev/pcsfilter:latest <path to project or file>
Strict
Fail with status = 1, when new scores are worse. Has no effect during the first run.
docker run --rm -v $(PWD):/project -it alexdbondarev/pcsfilter:latest -s <path to project or file>
docker run --rm -v $(PWD):/project -it alexdbondarev/pcsfilter:latest --strict <path to project or file>
Override output path
Default output path is ./.pcsFilter. It can be overriden the following way:
docker run --rm -v $(PWD):/project -it alexdbondarev/pcsfilter:latest -o <new output path> <path to project or file>
docker run --rm -v $(PWD):/project -it alexdbondarev/pcsfilter:latest --output-path <new output path> <path to project or file>
Help message
docker run --rm -v $(PWD):/project -it alexdbondarev/pcsfilter:latest --help
Contributing
Any contribution is always welcome!
Please follow this code of conduct.
This doc explains contribution details.
Metadata
Release files for pcsFilter 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pcsfilter-1.0.4.tar.gz | 7.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pcsfilter-1.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.5 kB
Release files / pcsfilter-1.0.4.tar.gz
| Download URL | pcsfilter-1.0.4.tar.gz |
|---|---|
| Size | 7.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4a91a08e023d50a2d297650ad3d0a9d93295143e07ecfe0cabada67a9ad58d7c
|
|
BLAKE2b-256 checksum How to use checksums |
f4fa1fe47c6829ee36644829646f272bf5a4a50269c0f4294ea634d85cf79b6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.6.1 CPython/3.11.0 Linux/6.2.0-1012-azure
|
Release files / pcsfilter-1.0.4-py3-none-any.whl
| Download URL | pcsfilter-1.0.4-py3-none-any.whl |
|---|---|
| Size | 11.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a4aecfba9fd4f011662872775112ccb92822de1fa777b9a6a06eeee9da3f52cb
|
|
BLAKE2b-256 checksum How to use checksums |
90ac79c2d5c36706e685d32494d13a13f7bce288581524c26cd253e3b61053c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.6.1 CPython/3.11.0 Linux/6.2.0-1012-azure
|