| Total Complexity | 2 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | # Author: Simon Blanke |
||
| 2 | # Email: [email protected] |
||
| 3 | # License: MIT License |
||
| 4 | |||
| 5 | import os |
||
| 6 | |||
| 7 | # from ..ltm_data_path import ltm_data_path |
||
| 8 | |||
| 9 | |||
| 10 | class Dashboard: |
||
| 11 | def __init__(self, path): |
||
| 12 | self.path = path |
||
| 13 | """ |
||
| 14 | if path is None: |
||
| 15 | self.ltm_data_dir = ltm_data_path() |
||
| 16 | else: |
||
| 17 | self.ltm_data_dir = path + "/ltm_data/" |
||
| 18 | """ |
||
| 19 | |||
| 20 | def open( |
||
| 21 | self, |
||
| 22 | plots=[ |
||
| 23 | "score_statistics", |
||
| 24 | "1d_scatter", |
||
| 25 | "2d_scatter", |
||
| 26 | "3d_scatter", |
||
| 27 | "parallel_coordinates", |
||
| 28 | ], |
||
| 29 | ): |
||
| 30 | abspath = os.path.abspath(__file__) |
||
| 31 | dname = os.path.dirname(abspath) |
||
| 32 | |||
| 33 | streamlit_plot_args = " ".join(plots) |
||
| 34 | |||
| 35 | command = ( |
||
| 36 | "streamlit run " |
||
| 37 | + dname |
||
| 38 | + "/st_script.py " |
||
| 39 | + self.path |
||
| 40 | + " " |
||
| 41 | + streamlit_plot_args |
||
| 42 | ) |
||
| 43 | os.system(command) |
||
| 44 |