Commit 00e527dd authored by Knut Behrends's avatar Knut Behrends
Browse files

addd horizontal lines in USAGE.md

parent 9a7e2e9a
......@@ -37,6 +37,8 @@ First, look at the `bin/` subdirectory to execute Shell scripts, or enter the `s
For regular usage, call the scripts from the parent directory.
-----
### Debugging
To enable debugging with the Chrome Developer Tools in the shell scripts: Open any shellscript `bin/api_caller*.sh`, comment out the line
......@@ -46,12 +48,16 @@ and uncomment line
To debug with `.js` files directly, call the node binary on the command line.
-----
### Inserting fake data
#### Inserting a Fake Program
Usually the `program` table is not necessary to automate. This can be done by hand. The table has only 3 columns.
-----
#### Inserting a Fake Expedition
To insert a single new expedition, call the script without arguments:
......@@ -63,6 +69,8 @@ Change the line
`num_expeditions=1`
accordingly, if you want to add more than 1 expedition.
-----
#### Inserting a Fake Site
To insert a single new site, call the script without arguments:
......@@ -81,6 +89,8 @@ accordingly, if you want to add any sites to that expedition.
You can get the expedition id from the expedition form or from an SQL query.
-----
#### Inserting a Fake Hole
To insert a single new hole, call the script without arguments:
......@@ -97,6 +107,8 @@ accordingly, if you want to add any holes to that site.
You can get the site id from the site form or from an SQL query.
-----
#### Inserting a Fake Core
To insert a single new core, call the script with arguments `-n`, `-e`, `-s`, `-h`:
......@@ -115,6 +127,8 @@ Error `Data Validation Failed`:
Copy the returned JSON structure and insert it into Postman, test the API response. The HTTP response will be easier to work with, and the error message will be more verbose.
-----
#### Inserting a Fake Section
Creating new sections is a complex operation.
......@@ -186,6 +200,8 @@ core 1: 4 sections
}
```
-----
#### Inserting a Fake Split
Splits get inserted core-by-core. (write a bash for-loop of you need to insert more)
......@@ -227,6 +243,8 @@ Map(2) {
}
```
-----
#### Inserting a Fake scientist
> Before you can insert *samples*, you need to insert *scientists* and their *requests*.
......@@ -257,10 +275,14 @@ Created fake scientists from undefined entries in file scientists-hole-20-enty.j
#############################################################
```
-----
#### Inserting a Fake sample request
`node src/request-inserter.js -e 10 # -e is the expedition number`
-----
#### Inserting a Fake sample
Fake Samples for a hole can only be added, if splits, scientists, requests for that hole exist.
......@@ -288,12 +310,16 @@ Expedition 12 (ENTY) has 28 splits.
########################################################################
```
-----
#### Inserting a Fake section-unit (lithology)
`node src/geology-inserter.js -e 10 # -e is the expedition-id`
Depth values and sample amounts, interval lengths etc are not really assigned in a meaningful way yet.
-----
#### Inserting a Fake New List-Value Entry
TBC
......@@ -341,6 +367,8 @@ node list-values.js -n CITIES -e
}
```
-----
### Configuration
To use the scripts you must get a [Bearer token](https://data.icdp-online.org/mdis-docs/guide/rest-api/#security) for the REST API first. Add it either as an environment variable (`export token=thiSisWHatAtOKENlooKSLikE`), or insert it at the top of the `src/config` file.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment