Adapt data to package directory structure.

Move static data to server package directory.
Assure data/*.npz data is included in the server package.

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
This commit is contained in:
Bobby Noelte
2024-10-07 12:24:45 +02:00
committed by Andreas
parent 7c13cb6e1c
commit b9f65ef7db
3 changed files with 7 additions and 1 deletions

View File

@@ -123,7 +123,10 @@ def flask_gesamtlast_simple():
###############
# Load Forecast
###############
file_path = os.path.join("data", "load_profiles.npz")
server_dir = os.path.dirname(os.path.realpath(__file__))
file_path = os.path.join(server_dir, "data", "load_profiles.npz")
print(file_path)
lf = LoadForecast(
filepath=file_path, year_energy=year_energy