Metadata-Version: 2.1
Name: pcsfilter
Version: 1.0.0
Summary: 
Author: Sasha Bondarev
Author-email: github.pcsfilter@gmail.com
Requires-Python: >=3.7,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: ConfigUpdater (>=3.0.0,<3.1.0)
Requires-Dist: blue (>=0.9.0,<0.10.0)
Requires-Dist: click (>=8.0.0,<8.1.0)
Requires-Dist: flake8 (>=3.8,<5.0.0)
Requires-Dist: isort (>=5.10.0,<5.11.0)
Requires-Dist: pytest (>=7.2.0,<7.3.0)
Requires-Dist: radon (>=6.0.1,<6.1.0)
Requires-Dist: wheel (>=0.38.1)
Description-Content-Type: text/markdown

# pcsFilter
Tool for filtering out **P**ython **C**ode **S**mells by 
formatting the code and checking the code style after.

---

**pcsFilter** is a wrapper around the following tools: 
1. [blue](https://pypi.org/project/blue/)
2. [isort](https://pypi.org/project/isort/)
3. [flake8](https://pypi.org/project/flake8/)
4. [radon](https://pypi.org/project/radon/) ("cc" command)

pcsFilter runs mentioned tools in a given order. The following functionality 
is applied on top:

1. _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 
   (`-o` or `--output-path`).
2. When _pcsFilter_ is executed again the new results are compared with the 
   previous ones.
3. If new results are worse then: 
   1. a short message will be printed
   2. if "strict" (`-s` or `--strict`) option is used then:
      - _pcsFilter_ will exit with status = 1
4. New scores and their details will be saved to a default or given output path.

## Installation
```shell
pip install pcsFilter
```

## Usage
### Base
```shell
pcsFilter <path to project or file>
```

### Strict
Fail with status = 1, when new scores are worse. Has no effect during the 
first run.
```shell
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:
```shell
pcsFilter -o <new output path> <path to project or file>
pcsFilter --output-path <new output path> <path to project or file>
```

### Help message
```shell
pcsFilter --help
```

## Contributing
Any contribution is always welcome!  
Please follow [this code of conduct](./CODE_OF_CONDUCT.md).  
[This doc](./CONTRIBUTING.md) explains contribution details.

