Skip to content
Merged
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
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ obtain into a single multiclass mask.
:maxdepth: 1

SLURP configuration <slurp_config>
Tutorial <tutorial>
CLI Usage <usage_cli>
API Usage <usage_api>
API Documentation <apidoc/modules>
Slurp tutorial <tutorial>

.. toctree::
:caption: Contributing
Expand Down
56 changes: 8 additions & 48 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,19 @@ Installation
Stable release
--------------

If deployed in Pypi, to install slurp, run this command in your terminal:
SLURP is deployed on Pypi. To install slurp, please create a python 3.10 virtual environment :

.. code-block:: console

$ pip install slurp
$ python3.10 -m venv slurp_env
$ pip install slurp-masks

This is the preferred method to install slurp, as it will always install the most recent stable release.

Consider using a virtualenv to separate and test the installation.
.. warning::

Depending on which computation you want to perform (cf. `Use cases <use_cases.html>`_ page), you may need to install OTB on your system as an additional dependencies.
Please refer to the OTB installation guide provided `here <https://www.orfeo-toolbox.org/CookBook-develop/Installation.html#create-an-healthy-python-environment-for-otb>`_ for more details.

If you don't have `pip`_ installed, this `Python installation guide`_ can guide
you through the process.
Expand All @@ -28,7 +32,7 @@ you through the process.
From sources
------------

The sources for slurp can be downloaded from the `Github repo`_.
The sources for SLURP can be downloaded from the `Github repo`_.

You can either clone the public repository:

Expand All @@ -51,50 +55,6 @@ Once you have a copy of the source, you can install it in a virtualenv with:
$ make install
$ source venv/bin/activate

Install (from the README.md)
-------

You need to clone the repository and pip install SLURP.

.. code-block:: console

git clone git@gitlab.cnes.fr:pluto/slurp.git

To install SLURP, you need OTB,
`EOScale <https://gitlab.cnes.fr/pluto/eoscale>`__ and some libraries
already installed on VRE OT.

Otherwise, if you are are connected to TREX, or working on your personal
computer (Linux), you may set the environment as mentioned below. ###
Create a virtual env with all libraries (if you don’t use VRE OT) On
TREX, connect to a computing node to create & compile the virtual
environment (needed to compile rasterio at install time)

.. code-block:: console

sinter -A cnes_level2 -N 1 -n 8 --time=02:00:00 --mem=64G --x11 --pty bash

Load OTB and create a virtual env with some Python libraries. Compile
and install EOScale and then SLURP

.. code-block:: console

module load otb/9.0.0-python3.8
# Creates a virtual env base on Python 3.8.13
python -m venv slurp_env
. slurp_env/bin/activate
# upgrade pip and install several libraries
pip install pip --upgrade
cd <EOScale source folder>
pip install .
cd <SLURP source folder>
pip install .
# for validation tests
pip install pytest

Your environment is ready, you can compute SLURP masks with
slurp_watermask, slurp_urbanmask, etc.


.. _Github repo: https://github.com/CNES/slurp
.. _tarball: https://github.com/CNES/slurp/tarball/master
37 changes: 21 additions & 16 deletions docs/source/main_config_descr.md

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions docs/source/slurp_config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ SLURP can be configured with JSON files that allows you to set various parameter

The main configuration file is given to the SLURP's API or CLI through the `main_config` argument.

Below is an example of a main configuration file:
.. tip::

Some arguments defined by the JSON file can be overwritten by command line arguments or by API's arguments.
For more information, please refer to `API's documentation <usage_api.html>`_ or refer to the help of your CLI command (`cli_command_name --help`).

Below is an example of a configuration file:

.. include:: main_config_descr.md
:parser: myst_parser.sphinx_

Some arguments defined by the JSON file can be overwritten by command line arguments or by API's arguments.
For more information, please refer to `API's documentation <usage_api.html>`_ or refer to the help of your CLI command (`cli_command_name --help`).


Loading
Loading