Skip to content

Commit

Permalink
Insert reading of default optimade_config.json in example run script …
Browse files Browse the repository at this point in the history
…run.sh (Materials-Consortia#627)

* insert reading of default optimade_config.json in example run script run.sh

* Only set OPTIMADE_CONFIG_FILE in run.sh if it isn't already set

Co-authored-by: Matthew Evans <[email protected]>

* Remove use of test v flag for if a variable exists in run.sh script

* Added docs link to default printout

Co-authored-by: Matthew Evans <[email protected]>
  • Loading branch information
rartino and ml-evs authored Dec 14, 2020
1 parent f5e7b57 commit 5461237
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
#!/bin/bash

if [ -z "$OPTIMADE_CONFIG_FILE" ]; then
export OPTIMADE_CONFIG_FILE="./optimade_config.json"
echo "Using the demo config file at ${OPTIMADE_CONFIG_FILE}."
echo "Set the environment variable OPTIMADE_CONFIG_FILE to override this behaviour."
echo "For more configuration options, please see https://www.optimade.org/optimade-python-tools/configuration/."
fi

export OPTIMADE_LOG_LEVEL=info
if [ "$1" == "debug" ]; then
export OPTIMADE_DEBUG=1
Expand Down

0 comments on commit 5461237

Please sign in to comment.