Skip to content

Commit

Permalink
Merge pull request #97 from Deltares/DEI-177-update-docs-on-poetry-ve…
Browse files Browse the repository at this point in the history
…rsion

fix[DEI-177]: update documentation on using poetry
  • Loading branch information
mKlapwijk authored Apr 2, 2024
2 parents 7283d03 + ff27404 commit da69a8e
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Anaconda (elaborate functionality) and minicoda (minimum functionality) are envi

1. Open your commandline (cmd) or conda prompt, and execute:
```sh
$ conda create -y -c conda-forge --name <env_name> poetry python=3.11
$ conda create -y -c conda-forge --name <env_name> python=3.11
```

2. Activate the newly created environment
Expand All @@ -24,14 +24,31 @@ Anaconda (elaborate functionality) and minicoda (minimum functionality) are envi
3. Move to the folder where you have placed the D-Eco Impact source code
You can use cd ../ and cd <folder_name> to move to the location or use windows explorer and type “cmd” + enter in the path bar.

4. To install the required libraries Poetry is used. Poetry makes use of the poetry.lock and pyproject.toml (present in the D-Eco Impact folder) to find these required libraries.
4. To install the required libraries Poetry is used.
Use poetry 1.3 or higher: ([installation instructions](https://python-poetry.org/docs/#installation))
If you prefer to install poetry with conda then we recommed to install poetry only to the base environment.

Activate base environment:
```sh
$ conda activate base
```
Install poetry using pip:
```sh
$ pip install poetry
```
Activate your created environment:
```sh
$ conda activate <env_name>
```

5. Poetry makes use of the poetry.lock and pyproject.toml (present in the D-Eco Impact folder) to find these required libraries.
Execute the following command:
```
poetry install
```
NB. If errors occur while installing the libraries, this might have to do with your administrative rights. Either start the cmd or conda promt “As administrator” or discuss this with your IT support.

5. Now D-Eco Impact is setup for use. You can test this by executing one of the input yaml files.
6. Now D-Eco Impact is ready to use. You can test this by executing one of the input yaml files.
To execute use the following in the command prompt while your environment is active:
```
python main.py <your_input_file>.yaml
Expand Down

0 comments on commit da69a8e

Please sign in to comment.