If you have found an issue with dqpu, first do a search in the dqpu issue tracker to ensure that there are no existing issues with similar content. If you can't find another related issue, open a new one: please try to be as detailed as possible.
If you want to contribute to dqpu, you have to follow this flow:
- First fork the dqpu repository so you can work on your copy of the code
- Clone it locally by running
git clone https://github.com/YOUR_USERNAME/dqpu.git
- Add the original repo as upstream
git remote add upstream https://github.com/dakk/dqpu.git
We also suggest to use pyenv
to create an isolated pip environment:
- Create a new env:
pyenv virtualenv dqpu-env
- Activate it:
pyenv activate dqpu-env
-
Now that you have your local copy of dqpu, you can start working on the code; first, search or create the issue you want to contribute to in the dqpu issue tracker, and ask to be assigned to that issue in order to avoid duplicate work.
-
Create e new branch with a descriptibe name where you will do the changes; the starting point is always upstream/main:
git fetch upstream
git checkout -b your-branch-name upstream/master
- Before each commit, use tox (
pip install tox
) in order to check that typechecker, linters and tests run fine:
tox
Use short and descriptive commit message, and remember to add tests to check new functionalities.
- If your branch drifts out of sync from upstream/main, you can fetch and merge the updated version:
git pull upstream main
- Finally push your code in your branch
git push origin your-branch-name
- Once you're happy with your changes, visit dqpu github and start a new pull request from
USERNAME:your-branch-name
todakk:main
. Maintainers will start reviewing your code and they may ask you to do some changes (in your branch): PR updates automatically every time you push to your working branch.
You can also create docs locally in order to check if everything is as expected:
pip install sphinx sphinx_rtd_theme sphinx_rtd_dark_mode myst_nb
cd docs
make html
-
Update dqpu version in
dqpu/__init__.py
-
Create a new tag and a new release on github
-
Submit the release on pypi using twine:
rm -r build dist *.egg-info
python setup.py sdist bdist
python -m twine upload dist/*