Skip to content

Commit

Permalink
Merge pull request #39 from gisaia/feat/template
Browse files Browse the repository at this point in the history
templates for help
  • Loading branch information
WilliGautier authored Nov 17, 2024
2 parents 8ce5cd1 + e0f13aa commit c3d6779
Show file tree
Hide file tree
Showing 31 changed files with 1,647 additions and 767 deletions.
367 changes: 189 additions & 178 deletions docs/docs/collections.md

Large diffs are not rendered by default.

250 changes: 250 additions & 0 deletions docs/docs/collections.md.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,250 @@
## ARLAS Collections

ARLAS collection are built on top of ES index. They describe yhe basic data structure for visualization and handle data access policy.

`arlas_cli` provide tools to manage the ARLAS collections with the `collections` command.

**List collections management commands**

<!-- termynal -->
```shell
> !!!execute arlas_cli collections --help
```

## create

The ARLAS Collection is linked to an index or even an index pattern.

The command line options let you specify how the index should be used by the collection.

<!-- termynal -->
```shell
> !!!execute arlas_cli collections --config local create --help
```

!!! note "Collection visibility"

The visibility options (`--public`, `--private`, `--owner` and `--orgs`) allow you to choose who can access the collection.

!!! note "--owner"

If ARLAS is used with ARLAS IAM (like ARLAS Cloud), then a collection must be associated to an organisation.

Example:

`--owner your.organisation.com`

By default, the organisation referenced in your `config` is used as owner.


### Create an ARLAS collection

The collection has to reference an ES index available with the [arlas_cli conf](confs.md#configurations).

The index option set the targeted index:`--index index_name`

!!! tip "Index pattern"

The collection can target an index pattern.
Instead of an index name, the target is an expression using `*` to reference multiple ES indices.

Example:

`--index index_name_prefix*`

All the indices have to share exactly the same data mapping.

The data contained in all referenced indices are then explorable together in arlas.


The collection also describe a basic structure for spatio-temporel datasets:

- **ID path**: A data field containing unique element identifier. `--id-path unique_id_field`
- **Centroid path**: A data field containing a point geometry used for aggregations `--centroid-path point_geom_field`
- **Geometry path**: A data field containing a geometry representing the element `--geometry-path element_geom_field`
- **Date path**: A data field containing the date associated to each element `--date-path date_field`

!!! tip "Pretty name"

A pretty name for the collection can be set at the creation with the `display-name` option

Example:

`--display-name "Pretty Collection Name"`


To create the collection, run the following command:

<!-- termynal -->
```shell
> arlas_cli collections \
--config {local} \
create {collection_name} \
--index {index_name} \
--id-path {unique_id_field} \
--centroid-path {point_geom_field} \
--geometry-path {element_geom_field} \
--date-path {date_field} \
--display-name {"Pretty Collection Name"}
```

## name

The collection can be defined by a pretty name. It can be set with `name` subcommand:

<!-- termynal -->
```shell
> !!!execute arlas_cli collections --config local name --help
```

### Set a pretty name for the collection

The pretty name can be used in ARLAS to display the collection. It can also be set by the `--display-name` option at the [collection creation](#create).

To set it with the `name` subcommand:
```shell
> arlas_cli collections \
--config {local} \
name {collection_name} {"Pretty Collection Name"}
```

## set_alias

The data fields are sometimes not very suitable in ARLAS Exploration dashboards. You can set aliases to improve their display in the interface.

<!-- termynal -->
```shell
> !!!execute arlas_cli collections --config local set_alias --help
```
### Set a pretty name for a data field

Each field of the data has a raw name. It can be replaced by a pretty name to display. For example:
```shell
> arlas_cli collections \
--config {local} \
set_alias {collection_name} \
{raw_field_name} {"Pretty Field Name (unit)"}
```

## list

### List available collections

You can access the list of available collections with the `list` subcommand:

<!-- termynal -->
```shell
> arlas_cli collections --config local set_alias --help

Usage: arlas_cli collections list [OPTIONS]

List collections

Options:
--help Show this message and exit.

```


## describe

### Describe a collection

The `describe` command line provides a description of the collection's structure (fields) and its metadata.

<!-- termynal -->
```shell
> !!!execute arlas_cli collections --config local describe --help
```

## count

### Count the number of element within a collection

The `count` command show the total number of elements (data rows) accessible in a collection.

<!-- termynal -->
```shell
> !!!execute arlas_cli collections --config local count --help
```

## sample

### Display a sample of the collection data

The `sample` command show few data rows accessible in a collection.

<!-- termynal -->
```shell
> !!!execute arlas_cli collections --config local sample --help
```

!!! note
The number of rows to display can be set with `--size` option

## private

By default, a collection is private, it can be seen only from the members of the owner or shared organisation.

ARLAS user has to be logged and have the correct rights to access the collection.

### Set the collection as private

To switch a collection from **public** to **private**, use the `private` command:

<!-- termynal -->
```shell
> !!!execute arlas_cli collections --config local private --help
```

## public

A public collection can be accessed in ARLAS dashboards without any logging. It can be used to host demo dashboards for example.

### Set the collection as public

To switch a collection from **private** to **public**, use the `public` command:

<!-- termynal -->
```shell
> !!!execute arlas_cli collections --config local public --help
```

## share

A collection can be shared between different organisations to make it available for its users.

### Share collections between organisations

A collection can be shared to other organisation with the `share` command:

<!-- termynal -->
```shell
> !!!execute arlas_cli collections --config local share --help
```

## unshare

The right to access a collection can be removed to the users of an organisation.

### Remove collection access for an organisation

The access to a collection can be removed with the `unshare` command:

<!-- termynal -->
```shell
> !!!execute arlas_cli collections --config local unshare --help
```

## delete

A collection can be deleted. It doesn't delete the data (ES index can still exist) but it will no longer be accessible in ARLAS.

### Delete a collection

The collection can be removed with the `delete` command:

<!-- termynal -->
```shell
> !!!execute arlas_cli collections --config local delete --help
```
4 changes: 0 additions & 4 deletions docs/docs/collections_1.md

This file was deleted.

8 changes: 0 additions & 8 deletions docs/docs/collections_2.md

This file was deleted.

8 changes: 0 additions & 8 deletions docs/docs/collections_3.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/docs/collections_4.md

This file was deleted.

Loading

0 comments on commit c3d6779

Please sign in to comment.