-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Spine requirements, master project
We now require latest version of spinetoolbox. The project modification script was moved to its own template file and updated accordingly. Also, pulled the latest master project submodule. Re #11
- Loading branch information
Showing
4 changed files
with
28 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule master_project
updated
20 files
+39 −25 | .spinetoolbox/project.json | |
+1 −1 | .spinetoolbox/specifications/Exporter/export_flextool3_csv.json | |
+889 −122 | .spinetoolbox/specifications/Exporter/results_to_excel.json | |
+54 −77 | .spinetoolbox/specifications/Importer/flextool3_excel_input.json | |
+1,395 −227 | .spinetoolbox/specifications/Importer/import_flex3.json | |
+81 −80 | .spinetoolbox/specifications/Tool/flextool3.json | |
+1 −1 | FlexTool3_base_sets.dat | |
+ − | FlexTool_import_template.xlsx | |
+ − | Init.sqlite | |
+ − | Input_data.sqlite | |
+11 −0 | docs/reference.md | |
+315 −123 | flexModel3.mod | |
+71 −87 | flextoolrunner.py | |
+ − | highs.exe | |
+ − | libFortranHighs.so | |
+ − | libgcc_s_seh-1.dll | |
+ − | libhighs.so | |
+ − | libstdc++-6.dll | |
+ − | libwinpthread-1.dll | |
+ − | zlib1.dll |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from spinedb_api import DatabaseMapping | ||
from spinedb_api.filters.scenario_filter import SCENARIO_FILTER_TYPE | ||
from spinedb_api.filters.tool_filter import TOOL_FILTER_TYPE | ||
connection = project.find_connection("Import_results", "Results") | ||
connection.options["purge_before_writing"] = False | ||
db_path = project.project_dir / "Input_data.sqlite" | ||
db_url = "sqlite:///" + str(db_path) | ||
db_map = DatabaseMapping(db_url) | ||
active_scenarios = {{{scenarios}}} | ||
try: | ||
connection = project.find_connection("Input_data", "Export_to_CSV") | ||
available_scenarios = [r.name for r in db_map.query(db_map.scenario_sq)] | ||
for name in available_scenarios: | ||
enabled = name in active_scenarios | ||
connection.set_filter_enabled("db_url@Input_data", SCENARIO_FILTER_TYPE, name, enabled) | ||
available_tools = [r.name for r in db_map.query(db_map.tool_sq)] | ||
for name in available_tools: | ||
enabled = name == "FlexTool3" | ||
connection.set_filter_enabled("db_url@Input_data", TOOL_FILTER_TYPE, name, enabled) | ||
finally: | ||
db_map.connection.close() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
django[argon2] | ||
spinetoolbox>=0.6.12 | ||
spinedb-api>=0.22.0 | ||
spinetoolbox>=0.6.13 |