Contributing to Cligon is easy. Cligon is written in Python3 and requires a copy of it on your machine. Please use Python 3.8.2 or higher.
If pip is not installed, install pip by running:
sudo apt install python3-pip
pip is the standard package-management system used to install and manage software packages written in Python.
Create a virtual env by using:
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
Additionally, please use Visual Studio Code to ensure proper settings. This project uses Python Black for formatting and Flake8 for linting and is automatically configured to run on save.
To format all files at once, use:
black .
To lint files use:
flake8 .
Ensure you are inside your virtual env (.venv) when using the above commands.
It is recommended to use git pre-commit hooks for this project. Please install pre-commit:
pip install pre-commit
And execute:
pre-commit install
to install git hooks in to the .git/
directory.
To test project please run:
pytest
To run test code coverage:
coverage run -m pytest
To see test code coverage report:
coverage report -m
Any tests are welcome. Even tests that are similar to existing tests.
Currently there is no organization to the tests except they are designed to test UrlChecker and UrlStatus.
An area they may need some tests is cligon.py.
Also, please note, when writing assert test for the output, ensure to remember to put color codes to match the output of the teriminal.
Once the above items are installed, you can simply edit any file to your desire. If you have added a new feature or fixed a bug, please feel free to open a PR.