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 src/codeflare_sdk
- Please follow the e2e documentation
- Run tests with the following command:
coverage run -m pytest
- 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>