Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,20 @@ is installed. In case you want the parallel version, follow these easy
[steps][doc_install_link].


### uv

GSTools can be installed via [uv][uv_link] on Linux, Mac, and Windows.
Install the package by typing the following command in a command terminal:

uv add gstools

To install the latest development version via uv, see the
[documentation][doc_install_link].
One thing to point out is that this way, the non-parallel version of GSTools
is installed. In case you want the parallel version, follow these easy
[steps][doc_install_link].


## Citation

If you are using GSTools in your publication please cite our paper:
Expand Down Expand Up @@ -417,6 +431,7 @@ You can contact us via <info@geostat-framework.org>.

[pip_link]: https://pypi.org/project/gstools
[conda_link]: https://docs.conda.io/en/latest/miniconda.html
[uv_link]: https://docs.astral.sh/uv/
[conda_forge_link]: https://github.com/conda-forge/gstools-feedstock#installing-gstools
[conda_pip]: https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-pkgs.html#installing-non-conda-packages
[pipiflag]: https://pip-python3.readthedocs.io/en/latest/reference/pip_install.html?highlight=i#cmdoption-i
Expand Down
51 changes: 48 additions & 3 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,25 @@ To get the latest development version you can install it directly from GitHub:

If something went wrong during installation, try the :code:`-I` `flag from pip <https://pip-python3.readthedocs.io/en/latest/reference/pip_install.html?highlight=i#cmdoption-i>`_.


uv
--

GSTools can be installed via `pip <https://docs.astral.sh/uv/>`_
on Linux, Mac, and Windows.
Install the package by typing the following command in a command terminal:

.. code-block:: none

uv add gstools

To get the latest development version you can install it directly from GitHub:

.. code-block:: none

uv add "gstools @ git+https://github.com/GeoStat-Framework/GSTools.git"


**Speeding up GSTools by parallelization**

We provide two possibilities to run GSTools in parallel, often causing a
Expand All @@ -89,32 +108,46 @@ When using conda, the parallel version of GSTools is installed per default.
***Parallelizing Cython***

For parallel support, the `GSTools-Cython <https://github.com/GeoStat-Framework/GSTools-Cython>`_
backend needs to be compiled from source the following way:
backend needs to be compiled from source. Using pip this can be done with:

.. code-block:: none

export GSTOOLS_BUILD_PARALLEL=1
pip install --no-binary=gstools-cython gstools

In case you are using uv, use these commands:

.. code-block:: none

export GSTOOLS_BUILD_PARALLEL=1
uv add --no-binary-package=gstools-cython gstools

You have to provide a C compiler and OpenMP to compile GSTools-Cython with parallel support.
The feature is controlled by the environment variable
``GSTOOLS_BUILD_PARALLEL``, that can be ``0`` or ``1`` (interpreted as ``0`` if not present).
Note, that the ``--no-binary=gstools-cython`` option forces pip to not use a wheel
for the GSTools-Cython backend.

For the development version, you can do almost the same:
For the development version, you can do almost the same. Using pip:

.. code-block:: none

export GSTOOLS_BUILD_PARALLEL=1
pip install git+git://github.com/GeoStat-Framework/GSTools-Cython.git@main
pip install git+git://github.com/GeoStat-Framework/GSTools.git@main

And using uv:

.. code-block:: none

export GSTOOLS_BUILD_PARALLEL=1
uv add "gstools @ git+https://github.com/GeoStat-Framework/GSTools-Cython.git"
uv add "gstools @ git+https://github.com/GeoStat-Framework/GSTools.git"

***Using GSTools-Core for parallelization and even more speed***

You can install the optional dependency `GSTools-Core <https://github.com/GeoStat-Framework/GSTools-Core>`_,
which is a re-implementation of GSTools-Cython:
which is a re-implementation of GSTools-Cython. Using pip, you can install it with:

.. code-block:: none

Expand All @@ -126,6 +159,18 @@ or by manually installing the package

pip install gstools-core

If you are using uv, you can install it together with GSTools in a single step with:

.. code-block:: none

uv add "gstools[rust]"

or by manually installing the package

.. code-block:: none

uv add gstools-core

The new package uses the language Rust and it should be safer and faster (in some cases by orders of magnitude).
Once the package GSTools-Core is available on your machine, it will be used by default.
In case you want to switch back to the Cython implementation, you can set
Expand Down
Loading
Loading