Installation#
Stable release#
The latest stable release of wavespectra package can be installed using pip or conda.
Install using pip#
Wavespectra can be installed using pip. There are several differet options. For a basic intall that does not include some readers and writers:
$ pip install wavespectra
For the full install which includes netcdf4 and some other extra libraries run this command:
$ pip install wavespectra[extra]
If you don’t have pip installed, this Python installation guide can guide you through the process.
Install from conda#
The package can also be installed using `conda`_:
$ conda install -c conda-forge wavespectra
From sources#
The sources for wavespectra can be downloaded from the Github repo.
You can either clone the public repository using git:
$ git clone https://github.com/wavespectra/wavespectra.git
Or download the tarball:
$ curl -o wavespectra.tar.gz -L https://github.com/wavespectra/wavespectra/tarball/master
$ tar xzf wavespectra.tar.gz
Note
The following commands assume that you are in the root directory of the source code. That is, the directory that contains the pyproject.toml file.
Once you have a copy of the source, you can install wavespectra with:
$ pip install .
Again, include the [extra] tag for the full install:
$ pip install './[extra]'
Notes to developers#
If you want to work on the wavespectra codebase, you can install it in development mode. This will allow you to edit the code and see the changes reflected in the package without having to reinstall it.
To install wavespectra in development mode, run this command in your terminal:
$ pip install -e .
Include the extra dependencies by running:
$ pip install -e '.[extra]'
Tests#
To run the tests, install the test dependencies:
$ pip install '.[test]'
and run the tests with:
$ pytest tests
docs#
To build the docs, install the docs dependencies:
$ pip install '.[docs]'
and build the docs with:
$ make docs