Thank you for your interest in contributing to the CodeFlare SDK!
- Python 3.9
- Poetry
-
Clone the repository:
git clone https://github.com/project-codeflare/codeflare-sdk.git cd codeflare-sdk
-
Create a Poetry virtual environment:
poetry shell
-
Install dependencies:
poetry install
-
To include test dependencies, run:
poetry install --with test
-
To include docs dependencies, run:
poetry install --with docs
-
To include both test and docs dependencies, run:
poetry install --with test,docs
-
We use pre-commit to ensure consistent code formatting. To enable pre-commit hooks, run:
pre-commit install
To install CodeFlare SDK in editable mode, run:
pip install -e .
To run the unit tests, execute:
pytest -v tests/unit_test.py
- Please follow the e2e documentation
- Run tests with the following command:
coverage run -m --source=src pytest tests/unit_test.py
- To then view a code coverage report w/ missing lines, run
coverage report -m
- To check file formatting, in top-level dir run
black --check .
- To auto-reformat all files, remove the
--check
flag - To reformat an individual file, run
black <filename>