Skip to content

Commit

Permalink
some tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
anamileva committed Jan 9, 2025
1 parent 4420578 commit d77c2eb
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 139 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2024 Blue Marble Analytics LLC.
# Copyright 2016-2025 Blue Marble Analytics LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -19,7 +19,13 @@


def create_iterations_csv(
iterations_directory, project, profile_id, profile_name, overwrite
iterations_directory,
project,
profile_id,
profile_name,
varies_by_weather,
varies_by_hydro,
overwrite,
):
filename = os.path.join(
iterations_directory,
Expand All @@ -28,8 +34,8 @@ def create_iterations_csv(

df = pd.DataFrame(
{
"varies_by_weather_iteration": [1],
"varies_by_hydro_iteration": [0],
"varies_by_weather_iteration": [varies_by_weather],
"varies_by_hydro_iteration": [varies_by_hydro],
}
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2024 Blue Marble Analytics LLC.
# Copyright 2016-2025 Blue Marble Analytics LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -16,7 +16,7 @@
import os.path
import pandas as pd

from data_toolkit.project.opchar.var_profiles.common_methods import (
from data_toolkit.project.common_methods import (
create_iterations_csv,
)
from db.common_functions import connect_to_database
Expand Down Expand Up @@ -212,6 +212,8 @@ def create_project_csv(
project=project,
profile_id=profile_scenario_id,
profile_name=profile_scenario_name,
varies_by_weather=1,
varies_by_hydro=0,
overwrite=True,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
import os.path
import sys

from data_toolkit.project.opchar.var_profiles.common_methods import (
from data_toolkit.project.common_methods import (
create_iterations_csv,
)
from db.common_functions import connect_to_database
Expand Down Expand Up @@ -148,6 +148,8 @@ def create_variable_profile_csvs_pool(pool_datum):
project=project,
profile_id=variable_generator_profile_scenario_id,
profile_name=variable_generator_profile_scenario_name,
varies_by_weather=1,
varies_by_hydro=0,
overwrite=True,
)

Expand Down
Loading

0 comments on commit d77c2eb

Please sign in to comment.