Contributing¶
Development Environment Setup¶
Prerequisites¶
- Python (version >=3.9 & <3.10)
Clone the repository to a local working directory:
git clone https://github.com/tellor-io/telliot-core.git
Create and activate a virtual environment in that cloned repo. In this example, the virtual environment is called tenv
:
python3 -m venv tenv
source tenv/bin/activate
py -m venv tenv
tenv\Scripts\activate
Install the project using using an editable installation.
pip install -e .
pip install -r requirements-dev.txt
Test Environment¶
Make sure you've configured Telliot before continuing.
Verify the development environment by running pytest
and ensure that all tests pass.
pytest
Making Contributions¶
Once your dev environment is set up, make desired changes, create new tests for those changes, and conform to the style & typing format of the project. To do so, in the project home directory:
Run all unit tests:
pytest
Check code typing:
tox -e typing
Check style (you may need run this step several times):
tox -e style
Once all those pass, you're ready to make a pull request to the project's main branch.
Link any related issues, tag desired reviewers, and watch the #telliot-core channel in the community discord for updates.
New Release Process/Checklist¶
For manually creating a new package version release:
- Ensure all tests are passing on main.
- Remove "dev" from version in the main package's init.py . Example: version = "0.0.5dev" --> version = "0.0.5".
- On Github, go to Releases-->Draft a new release-->Choose a tag
- Write in a new tag that corresponds with the version in init.py. Example: v.0.0.5
- If the tag is v.0.0.5, the release title should be Release 0.0.5.
- Click Auto-generate release notes.
- Check the box for This is a pre-release.
- Click Publish release.
- Navigate to the Actions tab from the main page of the package on github and make sure the release workflow completes successfully.
- Check to make sure the new version was released to test PyPI here.
- Test downloading and using the new version of the package from test PyPI (example).
- Navigate back to the pre-release you just made and click edit (the pencil icon).
- Uncheck the This is a pre-release box.
- Publish the release.
- Make sure the release github action goes through.
- Download and test the new release on PyPI official here.
- Change the package version in init.py to be the next development version. For example, if you just released version 0.0.5, change version to be "0.0.6dev0".