Skip to content

Commit e0671ff

Browse files
authored
Merge pull request #18 from CNES/add_usage_doc_only
Add documentation for SLURP's usage only
2 parents 726105e + b9aa916 commit e0671ff

7 files changed

Lines changed: 391 additions & 172 deletions

File tree

‎docs/source/index.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ obtain into a single multiclass mask.
1717
:maxdepth: 1
1818

1919
SLURP configuration <slurp_config>
20+
Tutorial <tutorial>
2021
CLI Usage <usage_cli>
2122
API Usage <usage_api>
2223
API Documentation <apidoc/modules>
23-
Slurp tutorial <tutorial>
2424

2525
.. toctree::
2626
:caption: Contributing

‎docs/source/installation.rst‎

Lines changed: 8 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,19 @@ Installation
88
Stable release
99
--------------
1010

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

1313
.. code-block:: console
1414
15-
$ pip install slurp
15+
$ python3.10 -m venv slurp_env
16+
$ pip install slurp-masks
1617
1718
This is the preferred method to install slurp, as it will always install the most recent stable release.
1819

19-
Consider using a virtualenv to separate and test the installation.
20+
.. warning::
21+
22+
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.
23+
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.
2024

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

31-
The sources for slurp can be downloaded from the `Github repo`_.
35+
The sources for SLURP can be downloaded from the `Github repo`_.
3236

3337
You can either clone the public repository:
3438

@@ -51,50 +55,6 @@ Once you have a copy of the source, you can install it in a virtualenv with:
5155
$ make install
5256
$ source venv/bin/activate
5357
54-
Install (from the README.md)
55-
-------
56-
57-
You need to clone the repository and pip install SLURP.
58-
59-
.. code-block:: console
60-
61-
git clone git@gitlab.cnes.fr:pluto/slurp.git
62-
63-
To install SLURP, you need OTB,
64-
`EOScale <https://gitlab.cnes.fr/pluto/eoscale>`__ and some libraries
65-
already installed on VRE OT.
66-
67-
Otherwise, if you are are connected to TREX, or working on your personal
68-
computer (Linux), you may set the environment as mentioned below. ###
69-
Create a virtual env with all libraries (if you don’t use VRE OT) On
70-
TREX, connect to a computing node to create & compile the virtual
71-
environment (needed to compile rasterio at install time)
72-
73-
.. code-block:: console
74-
75-
sinter -A cnes_level2 -N 1 -n 8 --time=02:00:00 --mem=64G --x11 --pty bash
76-
77-
Load OTB and create a virtual env with some Python libraries. Compile
78-
and install EOScale and then SLURP
79-
80-
.. code-block:: console
81-
82-
module load otb/9.0.0-python3.8
83-
# Creates a virtual env base on Python 3.8.13
84-
python -m venv slurp_env
85-
. slurp_env/bin/activate
86-
# upgrade pip and install several libraries
87-
pip install pip --upgrade
88-
cd <EOScale source folder>
89-
pip install .
90-
cd <SLURP source folder>
91-
pip install .
92-
# for validation tests
93-
pip install pytest
94-
95-
Your environment is ready, you can compute SLURP masks with
96-
slurp_watermask, slurp_urbanmask, etc.
97-
9858
9959
.. _Github repo: https://github.com/CNES/slurp
10060
.. _tarball: https://github.com/CNES/slurp/tarball/master

‎docs/source/main_config_descr.md‎

Lines changed: 21 additions & 16 deletions
Large diffs are not rendered by default.

‎docs/source/slurp_config.rst‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ SLURP can be configured with JSON files that allows you to set various parameter
66

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

9-
Below is an example of a main configuration file:
9+
.. tip::
10+
11+
Some arguments defined by the JSON file can be overwritten by command line arguments or by API's arguments.
12+
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`).
13+
14+
Below is an example of a configuration file:
1015

1116
.. include:: main_config_descr.md
1217
:parser: myst_parser.sphinx_
1318

14-
Some arguments defined by the JSON file can be overwritten by command line arguments or by API's arguments.
15-
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`).
16-
1719

0 commit comments

Comments
 (0)