git clone https://github.com/mitre/caldera.git --recursive
python3 -m venv venv . venv/bin/activate
pip install -r requirements.txt -r requirements-dev.txt
pre-commit install --install-hooks
We use the basic feature branch GIT flow. Fork this repository and create a feature branch off of master and when ready, submit a merge request. Make branch names and commits descriptive. A merge request should solve one problem, not many.
Tests can be run by executing:
python -m pytest --asyncio-mode=auto
This will run all unit tests in your current development environment. Depending on the level of the change, you might need to run the test suite on various versions of Python. The unit testing pipeline will run the entire suite across multiple Python versions that we support when you submit your PR.
We utilize tox to test Caldera in multiple versions of Python. This will only run if the interpreter is present on your system. To run tox, execute:
tox
You can generate code coverage reports manually or by running tox. To run them manually, you must have coverage installed and run the following commands:
coverage run -m pytest coverage report coverage html
You can find the code coverage report in htmlcov/index.html