Skip to content

Commit a213c30

Browse files
committed
added configuration docs
1 parent c24039e commit a213c30

File tree

2 files changed

+46
-1
lines changed

2 files changed

+46
-1
lines changed

docs/tutorials/configuration/index.md

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,45 @@ Run the command
1212
dataherb configure
1313
```
1414

15-
and some questions will show up.
15+
and some questions will show up:
16+
17+
```bash
18+
[?] Where should I put all the datasets and flora database? An empty folder is recommended.: ~/dataherb
19+
[?] How would you name the default flora? Please keep the default value if this is not clear to you.: flora
20+
```
21+
22+
!!! warning "config file already exists"
23+
If a config file (`~/.dataherb/config.json`) is already created, a warning will be shown:
24+
25+
```bash
26+
Config file (~/.dataherb/config.json) already exists
27+
```
28+
29+
You could overwrite it or leave it be.
30+
31+
32+
33+
### Manually Create Configuration
34+
35+
Once the `dataherb configure` command is run, a `config.json` file will be created inside the folder `~/.dataherb`.
36+
37+
```json
38+
{
39+
"workdir": "~/dataherb",
40+
"default": {
41+
"flora": "flora"
42+
}
43+
}
44+
```
45+
46+
| key | example | description |
47+
|---|---|---|
48+
| `workdir` | `~/dataherb` | The work directory for dataherb. |
49+
| `default.flora` | `flora` | The name of the flora to be used by default. For example, the value `flora` means we will use the `flora.json` database in the folder `(workdir setting in the above row)/flora/flora.json`. |
50+
51+
52+
!!! note "More about `workdir`"
53+
By default, two folders will be created inside it: `~/dataherb/flora` (default storage for all flora) and `~/dataherb/serve` (the cache folder for the website of all datasets when we run `dataherb serve`)
54+
55+
!!! note "More about `default.flora`"
56+
If `workdir` is set to `~/dataherb`, then the database will be `~/dataherb/flora/flora.json`. If the value of `default.flora` is set to `abc`, then the database will be `~/dataherb/flora/abc.json`.

mkdocs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,7 @@ nav:
8989
- "dataherb.utils.awscli": references/utils/awscli.md
9090
- "dataherb.utils.data": references/utils/data.md
9191
- "Changelog": changelog.md
92+
93+
extra_javascript:
94+
- 'https://unpkg.com/[email protected]/dist/mermaid.min.js'
95+

0 commit comments

Comments
 (0)