Installation#
Release version#
First create a suitable virtual environment, e.g.:
python -m venv cavcalc_env
Activate this environment by running:
source cavcalc_env/bin/activate
cavcalc_env\Scripts\activate.bat
Once this virtual environment is activated, you can install
cavcalc
simply via:pip install cavcalc
You can check that the installation was successful with:
cavcalc --version
if you see something along the lines of:
cavcalc v1.2.0
then you should be ready to start using
cavcalc
!
From source (development version)#
The steps below assume that you have a working git installation, and that the environment you are using has Python version 3.9 as a minimum. The steps to follow are:
Clone the repository. For example, via ssh:
git clone git@gitlab.com:sjrowlinson/cavcalc.git
If you haven’t done so already, install the Python package
poetry
. The official instructions for doing so can be found here. In short, on *nix based systems the recommended command to run for installingpoetry
is:curl -sSL https://install.python-poetry.org | python3 -
(Optional) If you’d prefer that the virtual environment, which
poetry
makes when installing this package, is created within the project root, then run:poetry config virtualenvs.in-project true
See the documentation on this option for more details.
Simply run:
poetry install
in the root of your local copy of the repository. This will create a virtual environment for
cavcalc
; first installing its dependencies as defined in thepoetry.lock
file, then installing the package itself in editable mode. You can check that the installation was successful by activating the virtual environment (e.g. viapoetry shell
), and running:cavcalc --version
If this results in an output similar to:
cavcalc v1.3.0.dev0
then you should be ready to start using the development version of
cavcalc
.