Skip to content

Commit

Permalink
-add a bit clarity to examples.py and remove creating a new local db …
Browse files Browse the repository at this point in the history
…for each different example
  • Loading branch information
nick-harder committed Nov 22, 2024
1 parent efbaa8f commit f70c7dc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion examples/examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,16 @@
- local_db: without database and grafana
- timescale: with database and grafana (note: you need docker installed)
"""

# select to store the simulation results in a local database or in timescale
# when using timescale, you need to have docker installed and can access the grafana dashboard
data_format = "local_db" # "local_db" or "timescale"

# select the example to run from the available examples above
example = "small"

if data_format == "local_db":
db_uri = f"sqlite:///./examples/local_db/assume_db_{example}.db"
db_uri = "sqlite:///./examples/local_db/assume_db.db"
elif data_format == "timescale":
db_uri = "postgresql://assume:assume@localhost:5432/assume"

Expand Down

0 comments on commit f70c7dc

Please sign in to comment.