Report bugs at https://github.com/udl-ai/udlai/issues.
If you are reporting a bug, please include:
Detailed steps to reproduce the bug.
Minimal reproducible example
Ready to contribute? Here’s how to set up
udlai for local development.
Clone the repository locally:
git clone https://github.com/udl-ai/udlai.git
Create a conda environment
Ideally, you should always create a fresh environment for new project, unless you are
certain you can manage environments yourself. There is an
environment.yml file that
should help you.
cd udlai conda env create -f environment.yml
This will create a new development environment called
with all required dependencies. You can now activate the environment.
conda activate udlai_env
Install the package in an editable way
Install the package to the environment with the
-e flag to keep it editable.
pip install -e .
Pre-commit ensures that your code follows
It is highly recommended to set-up your IDE to check for these formatting styles for you. The CI will fail if the commit does not adhere. You can also enforce the style manually.
black udlai flake8 udlai isort udlai
Create a branch for local development::
$ git checkout -b name-of-your-bugfix-or-feature
Now you can make your changes locally.
Once ready, run the complete unit tests.
pytest -v udlai --cov=udl_test --cov-fail-under=95 --cov-report term-missing
The command will also report code coverage and fail if it is under 95%.
Ensure that 100% of your code is tested unless there is a good reason not to. You can
also change the threshold manually in the command with
Coverage check also reports lines that are not covered as
Commit your changes and push your branch to Github:
git add . git commit -m "Your detailed description of your changes." git push origin name-of-your-bugfix-or-feature
Submit a pull request through the Github website.
Pull Request Guidelines#
Before you submit a pull request, check that it meets these guidelines:
The pull request should include tests.
If the pull request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring, and add the feature to the list in README.md.
All tests pass.
Documentation lives in the
docs folder and is (mostly) automatically generated via
sphinx. To generate a new version of docs, navigate to the folder and use a Makefile
to clean previous versions and build a new one.
cd docs make clean make html
The documentation is generated in
build/html and automatically deployed to