To contribute to this project you will need to install poetry, fork this repo, and clone your copy locally. Then run:
$ poetry install [--extras "$COMMA_SEPARATED_EXTRAS"]
Notice that specific platforms are not installed automatically. You can specify which ones to install through the extras tag (e.g. qiskit, cirq, qsharp).
The resulting virtual environment with all the dependencies is activated as usual. If located inside the repo (i.e. poetry config virtualenvs.in-project true
before poetry install
):
$ source .venv/bin/activate
Alternatively this one-liner is available:
source `poetry env info --path`/bin/activate
Finally, git hooks are available via:
(.venv) $ pre-commit install # Install pre-commit hooks
pre-commit installed at .git/hooks/pre-commit
(.venv) $ pre-commit install --hook-type commit-msg # Install commit-msg hooks
pre-commit installed at .git/hooks/commit-msg
We enforce a specific style of code syntax by using Black. Also, for naming, we follow the usual Python convention. Finally, for git commits, we adhere to the Conventional Commits standard.
For this project we adhere to the numpydoc docstring guide. If you make any changes to the code, remember updating the docstring wherever relevant.
All issues in this repo are assigned a Difficulty Class (DC) from 1 to 5. These different levels roughly correspond to:
DC-1
→ Basic knowledgeDC-2
→ Application/user level knowledgeDC-3
→ Domain/technology specific knowledgeDC-4
→ Multidomain knowledgeDC-5
→ System-wide knowledge
As of October 2020, MacOS Xcode ships with python 3.8.2 specially set up to support future arm64 architectures. This will cause the build process of regex
(a dependency of black
) to fail, which in turn will cause an error when the pre-commit hooks get executed for the first time (i.e. on git commit
). To fix this issue one must create the virtual environment with a compatible version of python before running poetry install
(e.g. using homebrew):
$ brew install [email protected]
$ virtualenv .venv -p /usr/local/Cellar/[email protected]/3.9.0/bin/python3.9
This requires virtualenv
to be installed beforehand.
(c) 2021 Pedro Rivero