Skip to content

Commit

Permalink
Merge pull request #3 from gisaia/bug/doc
Browse files Browse the repository at this point in the history
fix doc
  • Loading branch information
sylvaingaudan authored Feb 19, 2024
2 parents a207fe8 + 5fcc484 commit 77a2c43
Show file tree
Hide file tree
Showing 67 changed files with 915 additions and 17 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
23 changes: 13 additions & 10 deletions docs/docs/started.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ Install `arlas_cli` ([prerequisite](install.md#Prerequisite))
For running the various examples bellow, ARLAS and elasticsearch must be running on the local machine.

## Initial configuration
`arlas_cli` uses a yaml file for storing various ARLAS and elasicsearch configurations. By default, the file is located in `~/.arlas/cli/configuration.yaml`. [One is automatically created for your convinience at the first launch](https://raw.githubusercontent.com/gisaia/arlas-cli/master/configuration.yaml). It contains the ARLAS demo endpoint and the local ARLAS and elasticsearch endpoints.
`arlas_cli` uses a yaml file for storing various ARLAS and elasticsearch configurations. By default, the file is located in `~/.arlas/cli/configuration.yaml`. [One is automatically created for your convinience at the first launch](https://raw.githubusercontent.com/gisaia/arlas-cli/master/configuration.yaml). It contains the ARLAS demo endpoint and the local ARLAS and elasticsearch endpoints.

The configuration can also contain references to collection models for creating collections. A default one is provided for ARLAS EO. A reference can be an http url or a path to a local file.
It can also contain references to index mappings for creating indices. A default one is provided for ARLAS EO. A reference can be an http url or a path to a local file.
It can also contain references to index mappings for creating indices. A default one is provided for ARLAS EO.

## Running

Expand All @@ -20,27 +20,28 @@ It can also contain references to index mappings for creating indices. A default
> arlas_cli --version
0.2.8
Warning : no configuration file found, we created an empty one for
you (/Users/gaudan/.arlas/cli/configuration.yaml).
you (~/.arlas/cli/configuration.yaml).
```

## Examples

In the following examples, you will see how to:

- generate an elasticsearch mapping based on json objects
- add the mapping in elasticsearch
- list the elasticsearch indices
- add (index) data in the elasticsearch index
- get the structure of the mapping
- add a collection in arlas
- list the arlas collection
- get the structure of a arlas collection
- delete a collection from arlas
- add a collection in ARLAS
- list the ARLAS collections
- get the structure of a ARLAS collection
- delete a collection from ARLAS
- delete a mapping from elasticsearch
- list, create, describe and delete a configuration for `arlas_cli`

... with the `arlas_cli` command line only!

We suppose you hava an elasticsearch and arlas server running.
We suppose you have an elasticsearch and arlas server running.

### Generate the elasticsearch mapping

Expand Down Expand Up @@ -71,12 +72,14 @@ Note that the three timestamps are not identified as datetimes by `arlas_cli`. T
#### Type identification

A geometry is identified as such if

- it is a geojson
- it is a WKT string
- the fielf name contains `geohash`
- the field name contains `geohash`
- it is a string containing two float seperated by a comma

A date is identified as such if

- its name is one of `timestamp`, `date`, `start` or `end` and that it can be parsed as a date
- its name contains `timestamp`, `date`, `start` or `end` and its values are number within [631152000, 4102444800] or [631152000000, 4102444800000] (year 1990 to 2100)

Expand Down Expand Up @@ -219,7 +222,7 @@ models:
```
The `arlas` section contains the different deployment configurations. The mapping section lists the mapping template that you can use.
Finaly, the models are the templates for the collections. A [detaild description](docs/model/README.md) of the configuration structure is provided.
Finally, the models are the templates for the collections. A [detailed description](docs/model/README.md) of the configuration structure is provided.


### Create, describe and delete a configuration for `arlas_cli`
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/version.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ARLAS Version:
0.2.8
0.2.9
3 changes: 2 additions & 1 deletion docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ theme:
accent: 'light-blue'

nav:
- arlas_cli version: version.md
- About arlas_cli: index.md
- Installation: install.md
- Getting started: started.md
Expand All @@ -35,7 +36,7 @@ nav:
- Indices: indices.md
- Collections: collections.md
- Configurations: confs.md
- arlas_cli version: version.md
- Configuration data model: model/model.md


plugins:
Expand Down
20 changes: 20 additions & 0 deletions docs/site/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,26 @@









<li class="md-nav__item">
<a href="/arlas_cli/version/" class="md-nav__link">


<span class="md-ellipsis">
arlas_cli version
</span>


</a>
</li>



</ul>
</nav>
</div>
Expand Down
20 changes: 20 additions & 0 deletions docs/site/collections/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,26 @@









<li class="md-nav__item">
<a href="../version/" class="md-nav__link">


<span class="md-ellipsis">
arlas_cli version
</span>


</a>
</li>



</ul>
</nav>
</div>
Expand Down
20 changes: 20 additions & 0 deletions docs/site/collections_1/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,26 @@









<li class="md-nav__item">
<a href="../version/" class="md-nav__link">


<span class="md-ellipsis">
arlas_cli version
</span>


</a>
</li>



</ul>
</nav>
</div>
Expand Down
20 changes: 20 additions & 0 deletions docs/site/collections_2/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,26 @@









<li class="md-nav__item">
<a href="../version/" class="md-nav__link">


<span class="md-ellipsis">
arlas_cli version
</span>


</a>
</li>



</ul>
</nav>
</div>
Expand Down
20 changes: 20 additions & 0 deletions docs/site/collections_3/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,26 @@









<li class="md-nav__item">
<a href="../version/" class="md-nav__link">


<span class="md-ellipsis">
arlas_cli version
</span>


</a>
</li>



</ul>
</nav>
</div>
Expand Down
20 changes: 20 additions & 0 deletions docs/site/collections_4/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,26 @@









<li class="md-nav__item">
<a href="../version/" class="md-nav__link">


<span class="md-ellipsis">
arlas_cli version
</span>


</a>
</li>



</ul>
</nav>
</div>
Expand Down
24 changes: 23 additions & 1 deletion docs/site/confs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
<link rel="prev" href="../collections/">


<link rel="next" href="../version/">


<link rel="icon" href="../assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.5.3, mkdocs-material-9.5.9">
Expand Down Expand Up @@ -427,6 +429,26 @@









<li class="md-nav__item">
<a href="../version/" class="md-nav__link">


<span class="md-ellipsis">
arlas_cli version
</span>


</a>
</li>



</ul>
</nav>
</div>
Expand Down Expand Up @@ -492,7 +514,7 @@ <h1>Configurations</h1>
</div>
<div class="admonition bug">
<p class="admonition-title">Bug</p>
<p>If you used the ARLAS Exploration Stack, it is possible that you already have a directory named <code>$HOME/.arlas</code>. This directory has been created by docker as root. The owner of the directory must be changed to the local user (<code>chown ${USER}: $HOME/.arlas</code>).</p>
<p>If you used the ARLAS Exploration Stack, it is possible that you already have a directory named <code>$HOME/.arlas</code>. This directory has been created by docker as root. The owner of the directory must be changed to the local user (<code>sudo chown ${USER}: $HOME/.arlas</code>).</p>
</div>
<h2 id="list-configuration-management-commands">List configuration management commands</h2>
<div class="termy" data-termynal data-ty-macos data-ty-title="bash"><span data-ty="input" data-ty-prompt="&gt;">arlas_cli confs --help</span><span data-ty> <br> Usage: python -m arlas.cli.cli confs [OPTIONS] COMMAND [ARGS]... <br> <br>╭─ Options ──────────────────────────────────────────────────────────╮<br>│ --help Show this message and exit. │<br>╰────────────────────────────────────────────────────────────────────╯<br>╭─ Commands ─────────────────────────────────────────────────────────╮<br>│ create Add a configuration │<br>│ delete Delete a configuration │<br>│ describe Describe a configuration │<br>│ list List configurations │<br>╰────────────────────────────────────────────────────────────────────╯<br><br></span></div>
Expand Down
22 changes: 21 additions & 1 deletion docs/site/confs_1/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,26 @@









<li class="md-nav__item">
<a href="../version/" class="md-nav__link">


<span class="md-ellipsis">
arlas_cli version
</span>


</a>
</li>



</ul>
</nav>
</div>
Expand Down Expand Up @@ -425,7 +445,7 @@ <h1>Confs 1</h1>
</div>
<div class="admonition bug">
<p class="admonition-title">Bug</p>
<p>If you used the ARLAS Exploration Stack, it is possible that you already have a directory named <code>$HOME/.arlas</code>. This directory has been created by docker as root. The owner of the directory must be changed to the local user (<code>chown ${USER}: $HOME/.arlas</code>).</p>
<p>If you used the ARLAS Exploration Stack, it is possible that you already have a directory named <code>$HOME/.arlas</code>. This directory has been created by docker as root. The owner of the directory must be changed to the local user (<code>sudo chown ${USER}: $HOME/.arlas</code>).</p>
</div>
<h2 id="list-configuration-management-commands">List configuration management commands</h2>
<p>```shell</p>
Expand Down
20 changes: 20 additions & 0 deletions docs/site/confs_2/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,26 @@









<li class="md-nav__item">
<a href="../version/" class="md-nav__link">


<span class="md-ellipsis">
arlas_cli version
</span>


</a>
</li>



</ul>
</nav>
</div>
Expand Down
20 changes: 20 additions & 0 deletions docs/site/confs_3/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,26 @@









<li class="md-nav__item">
<a href="../version/" class="md-nav__link">


<span class="md-ellipsis">
arlas_cli version
</span>


</a>
</li>



</ul>
</nav>
</div>
Expand Down
Loading

0 comments on commit 77a2c43

Please sign in to comment.