Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 3bd859bf authored by Kostis ANAGNOSTOPOULOS's avatar Kostis ANAGNOSTOPOULOS
Browse files

rename(scripts) U/PSTORE-->U/PEOS (& avoid PS1 hint)

parent 4ede6e03
No related branches found
No related tags found
No related merge requests found
......@@ -32,7 +32,7 @@ preloaded in *eos-dirs* (read section below about Nextcloud mapping).
2. Clone this repo inside your **"personal-eos" dir** (`/eos/jeodpp/home/users/$USER`):
```bash
cd $/eos/jeodpp/home/users/$USER # use $USTORE var in the future
cd $/eos/jeodpp/home/users/$USER # use $UEOS var in the future
git clone https://jeodpp.jrc.ec.europa.eu/apps/gitlab/use_cases/legent/uds-scripts.git/ \
&& cd uds-scripts
```
......@@ -113,9 +113,9 @@ Work with the above dirs is facilitated by the definitons of these Python and
ENVIRONMENT (after installation) variables:
```bash
export USTORE="/eos/jeodpp/home/users/${USER}"
export UEOS="/eos/jeodpp/home/users/${USER}"
export UTRANS="/eos/jeodpp/home/users/${USER}/transfer"
export PSTORE="/eos/jeodpp/data/projects/LEGENT"
export PEOS="/eos/jeodpp/data/projects/LEGENT"
export PTRANS="/eos/jeodpp/data/projects/LEGENT/transfer"
```
......@@ -124,14 +124,14 @@ export PTRANS="/eos/jeodpp/data/projects/LEGENT/transfer"
* activate you conda-env:
```bash
cd $USTORE/uds-scripts
conda activate $USTORE/uds-scripts/env
cd $UEOS/uds-scripts
conda activate $UEOS/uds-scripts/env
```
or launch PyCharm/VSCode.
* **Create ANOTHER working folder for you code & data**
under `USTORE/idea-1` so as to let others view (read-only)
under `UEOS/idea-1` so as to let others view (read-only)
your intermediate result (or `cd` to your private home-dir, ie `~/idea-1`).
* *--(process data)--*
......@@ -141,7 +141,7 @@ export PTRANS="/eos/jeodpp/data/projects/LEGENT/transfer"
* update db (only for users with adb admin credentials)
* copy/move specific files for/to the folders synced by the *nextcloud-agent*,
* or update the "public-eos" dir `PSTORE` (if you're certain about the results).
* or update the "public-eos" dir `PEOS` (if you're certain about the results).
### 2.1. Sample code
......@@ -155,8 +155,8 @@ df = pd.DataFrame.from_records(eea_2020_flattened.find())
... # process your data
save_to_parquet(df, Config.USTORE, 'test.parquet')
save_to_excel(df, Config.USTORE, 'test.xlsx')
save_to_parquet(df, Config.UEOS, 'test.parquet')
save_to_excel(df, Config.UEOS, 'test.xlsx')
```
> **TIP:** Don't store your pandas in CSVs, they are big, slow and loose precision.
......
......@@ -10,4 +10,4 @@ df = pd.DataFrame.from_records(eea_raw_data.find({}, {'_id': 0}).limit(10))
... # process your data
save_to_parquet(df, Config.USTORE, 'test.parquet')
save_to_parquet(df, Config.UEOS, 'test.parquet')
......@@ -153,8 +153,8 @@ function upd20_bashrc_ustore_vars {
cat >> "$check_file" <<- EOF
## UDS: BDAP Storage locations
export PSTORE="/eos/jeodpp/data/projects/LEGENT"
export USTORE="/eos/jeodpp/home/users/${USER}"
export PEOS="/eos/jeodpp/data/projects/LEGENT"
export UEOS="/eos/jeodpp/home/users/${USER}"
export UTRANS="/eos/jeodpp/home/users/${USER}/transfer"
export PTRANS="/eos/jeodpp/data/projects/LEGENT/transfer"
......@@ -296,8 +296,8 @@ function upd20_ipython_ustore_vars {
mkdir -p $(dirname "$check_file")
cat > "$check_file" <<- EOF
## BDAP Storage locations
PSTORE="/eos/jeodpp/data/projects/LEGENT"
USTORE="/eos/jeodpp/home/users/${USER}"
PEOS="/eos/jeodpp/data/projects/LEGENT"
UEOS="/eos/jeodpp/home/users/${USER}"
UTRANS="/eos/jeodpp/home/users/${USER}/transfer"
PTRANS="/eos/jeodpp/data/projects/LEGENT/transfer"
......
......@@ -9,9 +9,9 @@ USER = getpass.getuser()
class Config(mysecrets.Secrets):
USTORE = f"/eos/jeodpp/home/users/{USER}"
UEOS = f"/eos/jeodpp/home/users/{USER}"
UTRANS = f"/eos/jeodpp/home/users/{USER}/transfer"
PSTORE = "/eos/jeodpp/data/projects/LEGENT"
PEOS = "/eos/jeodpp/data/projects/LEGENT"
PTRANS = "/eos/jeodpp/data/projects/LEGENT/transfer"
EEA_2013 = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment