Skip to content

Commit

Permalink
Update README.md (#76)
Browse files Browse the repository at this point in the history
Co-authored-by: Hendrik van der Stok <[email protected]>
  • Loading branch information
FWuellhorst and HvanderStok authored Apr 22, 2024
1 parent adaffe7 commit 4b43a9d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ To install all dependencies, you need python installed (>= 3.7).
If you don't have python or don't want to install it, just clone the required libraries manually.
You can extract the relevant information from the `dependencies.cfg` script.

Using the script, it's just:

To install, open a command line interface in the folder of BESMod and run:
```python
python install_dependencies.py full
```
Expand Down
8 changes: 8 additions & 0 deletions install_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import sys
import pathlib
import json
from subprocess import check_output, STDOUT, CalledProcessError


class LibraryInstaller:
Expand Down Expand Up @@ -56,6 +57,13 @@ def install_dependencies(
for optional_dependency in optional_dependencies:
if optional_dependency not in optional_dependencies_config:
raise KeyError(f"Given dependency '{optional_dependency}' is not supported.")
if optional_dependency == "Buildings":
try:
check_output(['git', 'lfs', 'version'], stderr=STDOUT)
except CalledProcessError:
raise ModuleNotFoundError(
"The optional requirement Buildings requires git large-file-storage (git lfs).\n"
"Install it when you want to use this library.")
install_libraries[optional_dependency] = optional_dependencies_config[optional_dependency]

open_models = []
Expand Down

0 comments on commit 4b43a9d

Please sign in to comment.