-
Documentation - any documentation/meeting notes.
-
Input_Files - contains dummy input files for Foundries.
-
Param Inventory and UI Mockup
-
2. ParamtersTab_Inventory_20191107_withCTHWork.xlsx - descriptions of all parameters in the Excel Builder "Parameters" sheet, including primary/secondary designation, implementation within Excel Builder, and ideas on implementation in the new pyBuilder. See the Powerpoint file below for visual mockup ideas of the pyBuilder UI.
-
3. AllOtherTabs_Inventory_20191107_withCTHWork.xlsx - same as file 2 above, but for all the other sheets in the Excel Builder.
-
GUI Slides.pptx - Powerpoint mockups of potential pyBuilder UI screens. The two Excel files above are a companion to this, as they contain additional descriptions of these screens and their functionality.
-
-
PyQt5_Test - PyQt5 example.
-
Scripts - contains the following folders:
-
Classes - contains Parcel.py, ParcelCollection.py, and OutputFormatter.py, which implement a parcel, parcel collection, and output formatting classes respectively. Also includes test_modules.py, a non-exhaustive unit test file which tests the Parcel and Parcel Collection classes.
-
HelperFunctions - contains Layout.py which houses miscellaneous functions used in the Layout tab of the builder. Additional helper functions can go here.
-
OutputFileGenerators - contains GenerateCompartments.py, GenerateProperties.py, GenerateSources.py, and GenerateVolumeElements.py which produce the TRIM syntax output files.
-
-
Navigate to the
./Scriptsfolder. -
Start a Python console in your virtual environment.
- If the DB has not previously been initialized, run the following,
then restart your python console:
from trim_db.migrate import run_migration run_migration('./trim_db/migrations/scripts/migrate.sql')
- If the DB has not previously been initialized, run the following,
then restart your python console:
-
Open a DB connection and initialize dummy User/Role classes:
from trim_db.local import *
-
Import the DB services:
from trim_db.services import *
This will let you use the
dbobject and[name]Serviceclasses from the console. E.g.,c = ChemicalService.get(name='MethylMercury')
- To do this from the console, run the following in your virtual environment:
python ./Scripts/import_scenario.py -c "path/to/import/config.json"Or,
python ./Scripts/import_scenario.py --scenario "Name" --directory "path/to/trim/files" --import-rules "import/rules/file.json"See ./Scripts/import_config for premade configs.
- To do this from the Python interpreter, run
from import_scenario import import_scenario
import_scenario({
"scenario_name": "Name",
"directory": "path/to/trim/files",
"import_rules": "import/rules/file.json" # Optional
})