Skip to content

Commit

Permalink
Convert raw_dir_rule to list because of consistency reasons
Browse files Browse the repository at this point in the history
  • Loading branch information
MaGering committed Jun 3, 2024
1 parent 606062b commit 347199b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions oemof_b3/tools/testing_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,17 +120,17 @@ def get_raw_path():
def check_raw_data_exists():
raw_dir_path = get_raw_path()

raw_dir_rule = "raw/oemof-B3-raw-data.zip"
raw_dir_rule = ["raw/oemof-B3-raw-data.zip"]

if not os.path.isdir(raw_dir_path):
output = snakemake.snakemake(
targets=[raw_dir_rule],
targets=raw_dir_rule,
snakefile="Snakefile",
)

if not output:
raise FileExistsError(
f"The output corresponding to rule {raw_dir_rule} could not be created. \n"
f"The output corresponding to rule {raw_dir_rule[0]} could not be created. \n"
f"Hence this tests are failing."
)

Expand Down
4 changes: 2 additions & 2 deletions tests/test_pipeline_raw_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# Set the current path to the target path
os.chdir(target_path)

raw_dir_rule = "raw/oemof-B3-raw-data.zip"
raw_dir_rule = ["raw/oemof-B3-raw-data.zip"]
raw_dir = "raw"

output_rule_list = [
Expand Down Expand Up @@ -52,7 +52,7 @@ def test_raw_dir():
try:
# Run the snakemake rule in this loop
output = snakemake.snakemake(
targets=[raw_dir_rule],
targets=raw_dir_rule,
snakefile="Snakefile",
)

Expand Down

0 comments on commit 347199b

Please sign in to comment.