Skip to content

Commit db98ea3

Browse files
committed
Fix _test_script
1 parent 8d523c6 commit db98ea3

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

sunbeam/scripts/run.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,12 @@ def main(argv: list[str] = sys.argv):
1818

1919
sc = SunbeamConfig.from_file(configfile)
2020
Cfg = sc.resolved_paths()
21-
log_fp = Cfg["all"]["log_fp"]
2221

2322
# From here on everything is considered part of the "pipeline"
2423
# This means all logs are handled by the pipeline logger (or pipeline extension loggers)
2524
# You could argue it would make more sense to start this at the actual snakemake call
2625
# but this way we can log some relevant setup information that might be useful on post-mortem analysis
27-
logger = get_pipeline_logger(log_fp)
26+
logger = get_pipeline_logger()
2827

2928
snakefile = Path(__file__).parent.parent / "workflow" / "Snakefile"
3029
if not snakefile.exists():

sunbeam/workflow/Snakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ MIN_RUNTIME = int(os.getenv("SUNBEAM_MIN_RUNTIME", 15))
2020

2121
sc = SunbeamConfig(config)
2222
Cfg = sc.resolved_paths()
23-
logger = get_pipeline_logger(Cfg["all"]["log_fp"])
23+
logger = get_pipeline_logger()
2424
logger.debug(f"Sunbeam configuration: {Cfg}")
2525

2626
# Load extensions

sunbeam/workflow/scripts/_test_script.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1+
from pathlib import Path
2+
3+
14
l = snakemake.log[0]
5+
o = Path(snakemake.output[0])
6+
27
with open(l, "w") as log:
38
log.write("HERE\n")
49

@@ -9,3 +14,5 @@
914
logger.info("This works!")
1015

1116
SampleList()
17+
18+
o.write_text("This is a test output file.\n")

0 commit comments

Comments
 (0)