The following proposal addresses the following issues:
- Copying the model's output files shouldn't be necessary for a dedicated visualisation app.
- For development purposes it's alright to store data inside the package's structure. But what happens for persons who install from the python package index? The data should be stored in a dedicated data directory, outside the directory structure of the python package.
Current behaviour
Copy the TiMBA output pickle file from TiMBA to TiMBA_Charts:
- from /home/paul/rp/zz_forks/TiMBA/TiMBA/data/output
- to /home/paul/rp/zz_forks/TiMBA_Charts/Toolbox/Input/Scenario_Files
Expressed as a shell command the copy instruction would be like this:
cp /home/paul/rp/zz_forks/TiMBA/TiMBA/data/output /home/paul/rp/zz_forks/TiMBA_Charts/Toolbox/Input/Scenario_Files
Then to import the data into python. The TiMBA_Charts python package is
strangely called "Toolbox". Current behaviour:
from Toolbox.classes.import_data import import_pkl_data
print(import_pkl.SCENARIOPATH)
The paths are defined in Toolbox/parameters/paths.py
PACKAGEDIR = Path(__file__).resolve().parent.parent
SCINPUTPATH = PACKAGEDIR / Path("Input") / Path("Scenario_Files")
AIINPUTPATH = PACKAGEDIR / Path("Input") / Path("Additional_Information")
Proposal
Make SCINPUTPATH and AIINPUTPATH sub directories of TIMBA_DATA_DIR and point them to the model's output directory:
SCINPUTPATH = TIMBA_DATA_DIR / Path("output") / Path("Scenario_Files")
AIINPUTPATH = TIMBA_DATA_DIR / Path("output") / Path("Additional_Information")
You can pull my commit from the fork branch timba_data_dir to get the example
paulrougieux@6e4dc4b
Related issues:
The following proposal addresses the following issues:
Current behaviour
Copy the TiMBA output pickle file from TiMBA to TiMBA_Charts:
Expressed as a shell command the copy instruction would be like this:
Then to import the data into python. The TiMBA_Charts python package is
strangely called "Toolbox". Current behaviour:
The paths are defined in Toolbox/parameters/paths.py
Proposal
Make SCINPUTPATH and AIINPUTPATH sub directories of TIMBA_DATA_DIR and point them to the model's output directory:
You can pull my commit from the fork branch timba_data_dir to get the example
paulrougieux@6e4dc4b
Related issues:
The proposal above depends on adding TiMBA as a requirement of TiMBA_Charts.
TiMBA_charts could add TiMBA as a dependency to . See issue: