Installation

This package depends on JAX which requires special attention to enable support for GPUs, etc. Before installing this package, follow the JAX installation instructions.

PyPI

This package is available as “pyqg-jax” on PyPI. You can install it using pip:

$ python -m pip install pyqg-jax

or on Windows:

PS> py -m pip install pyqg-jax

For more details on pip, consult its user guide. Before installing it is best to ensure your package manager is up to date (upgrade pip).

Conda-Forge

This package can also be installed into a Conda environment from the conda-forge channel:

$ conda install -c conda-forge pyqg-jax

For more information, consult the conda-forge documentation. Installing JAX, particularly with GPU support may require additional attention, consult the JAX Conda install instructions.

Source

The package can also be installed from source code, which is available from our GitHub repository.

To install the package from source, navigate to the directory containing your copy of the source code and run (note the trailing .):

$ python -m pip install .

Running Tests

Once you have an installed version of the package, the test suite can help confirm whether the routines are operating correctly. We use pytest as a test runner. Once the package is installed, navigate to the root directory of the repository and run:

$ python -m pip install -r tests/requirements.txt
$ python -m pytest