Installation¶
Via pip
¶
To install bartiq
run:
bartiq
also has a number of optional extras, which can be installed with the following commands:
# To use jupyter integrations
pip install "bartiq[jupyter]"
# To use optimization tooling
pip install "bartiq[optimization]"
# To use a full suite of interactive tools
pip install "bartiq[interactive]"
bartiq[interactive]
encapsulates the bartiq[jupyter]
install, with additional packages for interactive plotting of routines. Multiple extras can be installed with comma separation inside the square brackets, i.e. bartiq[jupyter,optimization]
.
Note
To use the QREF ⧉ rendering tool in Jupyter Notebook, ensure the Graphviz software is installed on your OS and that its executables are included in your system variables. For installation instructions, please refer to the Graphviz download page ⧉.
From Source¶
For a source install run:
# Clone bartiq repo (you can use HTTP link as well)
git clone git@github.com:PsiQ/bartiq.git
cd bartiq
pip install .
pip install ".[jupyter]"
and similarly for optimization
, interactive
.
Development¶
For development we recommend installing using poetry
:
With poetry
, install extras with poetry install -E jupyter
, and similarly for optimization
, interactive
.
This will create a virtual environment for you and install all developer and docs dependencies within it. For Poetry 2.0 and above, you can enter this environment by running:
or, for Poetry 1.x:We encourage the use of pre-commit
hooks in bartiq
development to maintain code quality standards. You can view the documentation for pre-commit
here ⧉. Prior to committing anything to your branch, run the following commands:
bartiq
development standards.
To run all pre-commit
hooks locally:
Warning
If using Visual Studio Code, the git
integration in Source Control does not detect pre-commit
hooks. To use these, git
commands must be run through the terminal in the installed bartiq
virtual environment.
Tests¶
To run the test suite, from the project root directory run:
Documentation¶
To build docs, from the project root directory run: