A tool that inserts "chips" to your code, detecting unused fragments. Might be used for developing, refactoring and manual testing purposes
Project description
👾 Chips
Handsome testing tool. It inserts "chips" to your code, detecting unused fragments. Then shows unused functions in a pretty table.
Visit chips git to see the insights
Installation
Use the package manager pip to install Chips
pip install python-chips
Setup Chips
By default chips setups everything for you, after -s command. If you are running into problems, use args below.
-v --venv <on/off>Defaults toon. Determine whether you are using virtualenv or not. If set toonChips will search for a virtualenv on a root path. Note: if--venv off, you should run commands below withpython -m chipsinstead of$chips-p --path <YOUR_VIRTUALENV_PATH>Specify virtualenv path if venv not found
python -m chips -s
Open a new tab in terminal or run source <YOUR_VIRTUALENV_PATH>/bin/activate
Usage
BEFORE YOU START: If you want to fully "chip" a big project (not a single app directory), it's highly recommended
to use --auto off with -a command, for improving project performance. Learn more about --auto option below.
- Add chips to your project (-a --add)
$chips -a
-
Use your code (trigger functions in a way: make api requests, click website, etc..)
-
Generate results file with
$chips -rs(only if--auto offon-a). See the generated results at .chipping_results/results.py in a pretty table
- Remove chips (-r --remove)
$chips -r
Ignore particular dirs and files
To exclude particular dirs and files from chipping (f.e. tests and manage.py in Django) Chips generates a .chipsignore file, based on your .gitignore. Syntax is the same.
There's a basic excludes list in .chipsignore. You can modify it any time you want.
Full ignores list here
Chipping path
Basically Chips are performing on a root path of your project. You can specify a folder or file local path, where you want Chips to perform (add or remove). Use -p --path arg.
$chips -a -p <DESIRED PATH>
Bad performance
If you struggle from a bad performance after chipping, use --auto off to turn off auto generated results
$chips -a --auto off
Then you'll need to generate results manually (-rs --results)
$chips -rs
Chips logging
Choose logging type. Can be applied to remove and add (-rt --result_type)
- list (default for add) - list all affected files,
- count (default for remove) - print number of files affected,
- blind - no output
$chips -a -rt count
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. git 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 Distribution
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 python-chips-1.0.15.tar.gz.
File metadata
- Download URL: python-chips-1.0.15.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.8.2 Darwin/20.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38a222dcfed01233a80049237b1e72218789503b5897b2e9fa57f4b7cd0220c4
|
|
| MD5 |
841e5a81c226abd417805648da583f88
|
|
| BLAKE2b-256 |
7945617fc194d8a0bef4512423d4afac1f0131414c24f0c4fbbcfb6cddfcf096
|
File details
Details for the file python_chips-1.0.15-py3-none-any.whl.
File metadata
- Download URL: python_chips-1.0.15-py3-none-any.whl
- Upload date:
- Size: 13.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.8.2 Darwin/20.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
806cc697bc5c33cd1c494bd7cd117d50e30d3b319af7b47a1b44dcaf4fcddde3
|
|
| MD5 |
e959d0c8fb112073d773644cea335df7
|
|
| BLAKE2b-256 |
b9f4670007fe0a2414bc7c66d1e8894071160f310f053873a123318e8ce7b266
|