Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARLAS CLI Documentation #22

Merged
merged 10 commits into from
Nov 18, 2024
Merged

ARLAS CLI Documentation #22

merged 10 commits into from
Nov 18, 2024

Conversation

WilliGautier
Copy link
Contributor

No description provided.

@WilliGautier WilliGautier added the documentation Improvements or additions to documentation label Oct 8, 2024
@WilliGautier WilliGautier self-assigned this Oct 8, 2024
@WilliGautier WilliGautier force-pushed the feat/update_documentation branch 2 times, most recently from 66a3518 to 9c5662e Compare November 4, 2024 16:50
docs/docs/collections.md Outdated Show resolved Hide resolved
docs/docs/index.md Outdated Show resolved Hide resolved
@@ -2,6 +2,21 @@

__ARLAS Exploration__ is an Open Source software for exploring and analysing Geo BigData. __ARLAS Command Line__ (`arlas_cli`) is for managing elasticsearch indices, ARLAS collections and elasticsearch/ARLAS endpoint configurations.


TODO: Definition of concepts and schema, at least:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not in this page. You could create a page "Concepts" and put all definitions theres, and make some links from this page to the concepts page. Keep this page readable in 5 mins

Make sure to take enough rows into account to get all the fields with the option `--nb_lines`

!!! tip
For NDJSON files generated with Apache Spark, files are often partitioned into several parts into a `data.json` folder:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many tools generate many files, no need to mention Apache Spark here.


!!! warning "--owner"

It is mandatory to associate an organisation to a collection.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, it is not mandatory (some deployment do not use arlas iam).
also, arlas cli provide the one from the conf file, so you do not have to provide it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The collection can be associated to an organisation.

Example:

`--owner your.organisation.com`

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

Ok?


## Configure arlas_cli for ARLAS Cloud

To configure `arlas_cli` for your cloud.arlas.io account:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that this is quite important and that having a dedicated page was a good way to spot it. If you put it in this big file, then it must be more highlighted


## Elasticsearch index

ARLAS rely on [elasticsearch](https://www.elastic.co/fr/elasticsearch), an open-source search engine to perform quick aggregation requests over data.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could move this in the "concepts" page and add a link here.


Once you're happy with the mapping, you can either store it in a file or directly push it on elasticsearch.

!!! tip "Store mapping in a file"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we do not have to teach how to redirect the content in a file. I would remove this "tip"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we have the command create that rely on a mapping file, it can be usefull to explain how to easily create a mapping file no?


## Install

### Python Virtual environment
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move ### Python Virtual environment after ### Install arlas_cli

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even if the pip install is advised to be done in a virtual env?

Copy link
Member

@sylvaingaudan sylvaingaudan Nov 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is recommended for packages within a python project, not necessarily for a global shell command line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes except in windows where it has to be in a virtual env, but you're right I can put it after and add a simple warning for windows users

```

The version of `arlas_cli` is `X.Y.Z` where `X` is ARLAS Stack main version and `Y.Z` is the increment of arlas_cli version.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, we should speak about cloud.arlas.io and add a link to the configuration doc.

@WilliGautier WilliGautier force-pushed the feat/update_documentation branch from 9c5662e to b272863 Compare November 13, 2024 17:17
@WilliGautier WilliGautier changed the title WIP ARLAS CLI Documentation Nov 13, 2024
README.md Outdated

See the documentation at https://gisaia.github.io/arlas_cli/

NB: To run the commands locally from the project root, simply replace `arlas_cli` by `python3.10 -m arlas.cli.cli`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they will install arlas cli, not clone the project. They will get confused with this.
We can add a "developper section" and provide that information if you believe that this is necessary.


!!! note "--owner"

The collection can be associated to an organisation.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say instead:
"If ARLAS is used with ARLAS IAM (like ARLAS Cloud), then a collection must be associated ..."

To set it with the `name` subcommand:
```shell
> arlas_cli collections \
--config local \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here you choose a lot of default values, like local, collection_name, and so on. It is not easy to know which parameter the user is supposed to change. Can you fond a trick to highlight the values to be changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I added a {local} syntaxe for all that can be changed


## set_alias

The data fields are sometimes not very readable. You can set aliases to improve their display in the ARLAS Dashboards configuration.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

```shell
> arlas_cli collections --config local set_alias --help

Usage: arlas_cli collections set_alias [OPTIONS] COLLECTION FIELD_PATH
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be generated. But this is not necessary to list all the subcommands. This is going to be horrible to maintain.


You can also use the command line itself.

!!! tip
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if this is a good idea : it is so easy to mess up the file ...

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If people want to, they can edit it, but yeah, we shouldn't tell them that they can/should

...
```

TODO: Check: org filter:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove


The following options are used to create the conf:
```
arlas_cli confs create
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think that this is a good idea to have partial commands. You can list the parameters if presenting it as a command is dangerous, people will copy paste.

The ARLAS server url (`ARLAS_SERVER_URL`) and the persistence server URL (`ARLAS_PERSISTENCE_URL`) has to be set in the configuration:
```
arlas_cli confs create
...
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think that this is a good idea to have partial commands. You can list the parameters if presenting it as a command is dangerous, people will copy paste.

The following options are used to create the conf:
```
arlas_cli confs create
...
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think that this is a good idea to have partial commands. You can list the parameters if presenting it as a command is dangerous, people will copy paste.

docs/docs/collections.md Outdated Show resolved Hide resolved
docs/docs/collections.md Outdated Show resolved Hide resolved
docs/docs/collections.md Outdated Show resolved Hide resolved

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`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If kept in the doc: set -> sets

docs/docs/collections.md Outdated Show resolved Hide resolved
docs/docs/started.md Outdated Show resolved Hide resolved
docs/docs/started.md Outdated Show resolved Hide resolved
docs/docs/started.md Outdated Show resolved Hide resolved
docs/docs/started.md Outdated Show resolved Hide resolved
docs/docs/started.md Outdated Show resolved Hide resolved
docs/docs/collections.md Outdated Show resolved Hide resolved
docs/docs/confs.md Outdated Show resolved Hide resolved
@sylvaingaudan sylvaingaudan force-pushed the feat/update_documentation branch from 3faf8d1 to 1fb33b6 Compare November 15, 2024 13:11
@WilliGautier WilliGautier force-pushed the feat/update_documentation branch from 1fb33b6 to 8ce5cd1 Compare November 15, 2024 17:34
@WilliGautier WilliGautier force-pushed the feat/update_documentation branch from cbd5ef4 to 05b33b5 Compare November 18, 2024 11:20
@sylvaingaudan sylvaingaudan merged commit 40461a9 into master Nov 18, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants