Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updates for database builder executable #576

Merged
merged 2 commits into from
Nov 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions distribution/build_database_builder_executable.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ def run_pyinstaller() -> None:

command.append("--collect-all=flood_adapt")
command.append("--recursive-copy-metadata=flood_adapt")
command.append("--hiddenimport=scipy.special._special_ufuncs")
command.append("--hiddenimport=scipy._lib.array_api_compat.numpy.fft")
command.append("--collect-all=rasterio")
command.append("--collect-all=pyogrio")
command.append("--collect-all=xugrid")
Expand Down
7 changes: 6 additions & 1 deletion flood_adapt/database_builder/create_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from flood_adapt.api.projections import create_projection, save_projection
from flood_adapt.api.static import read_database
from flood_adapt.api.strategies import create_strategy, save_strategy
from flood_adapt.config import Settings
from flood_adapt.log import FloodAdaptLogging
from flood_adapt.object_model.interface.site import Obs_pointModel, SlrModel
from flood_adapt.object_model.io.unitfulvalue import UnitfulDischarge, UnitfulLength
Expand Down Expand Up @@ -389,7 +390,11 @@ def create_standard_objects(self):
physical and socio-economic conditions, and saves them to the database.
"""
# Load database
read_database(self.root.parent, self.config.name)
Settings(
database_root=self.root.parent,
database_name=self.config.name,
)
read_database(Settings().database_root, Settings().database_name)
# Create no measures strategy
strategy = create_strategy({"name": "no_measures", "measures": []})
save_strategy(strategy)
Expand Down
Loading