Skip to content
Snippets Groups Projects
Unverified Commit bb622828 authored by Dmitry Kalinkin's avatar Dmitry Kalinkin Committed by GitHub
Browse files

drop use of Snakemake 7.x-specific remote functionality (#30)

parent 0b6ddfeb
No related branches found
No related tags found
No related merge requests found
Pipeline #97396 canceled with stages
configfile: "config.yaml"
if config["remote"] == "S3":
from snakemake.remote.S3 import RemoteProvider as S3RemoteProvider
provider = S3RemoteProvider(
endpoint_url="https://eics3.sdcc.bnl.gov:9000",
access_key_id=os.environ["S3_ACCESS_KEY"],
secret_access_key=os.environ["S3_SECRET_KEY"],
)
remote_path = lambda path: f"eictest/{path}"
elif config["remote"] == "XRootD":
from snakemake.remote.XRootD import RemoteProvider as XRootDRemoteProvider
provider = XRootDRemoteProvider(
stay_on_remote=False,
)
remote_path = lambda path: f"root://dtn-eic.jlab.org//work/eic2/{path}"
else:
raise ValueError(f"Unexpected config[\"remote\"] = {config['remote']}")
include: "benchmarks/backgrounds/Snakefile"
include: "benchmarks/barrel_ecal/Snakefile"
include: "benchmarks/ecal_gaps/Snakefile"
include: "benchmarks/material_scan/Snakefile"
rule fetch_epic:
output:
filepath="EPIC/{PATH}"
shell: """
xrdcp root://dtn-eic.jlab.org//work/eic2/{output.filepath} {output.filepath}
"""
rule warmup_run:
output:
"warmup/{DETECTOR_CONFIG}.edm4hep.root",
......
......@@ -3,7 +3,7 @@ import os
rule ecal_gaps_sim:
input:
steering_file=provider.remote(remote_path("EPIC/EVGEN/SINGLE/{PARTICLE}/{ENERGY}/{PHASE_SPACE}/{PARTICLE}_{ENERGY}_{PHASE_SPACE}.steer")),
steering_file="EPIC/EVGEN/SINGLE/{PARTICLE}/{ENERGY}/{PHASE_SPACE}/{PARTICLE}_{ENERGY}_{PHASE_SPACE}.steer",
warmup="warmup/{DETECTOR_CONFIG}.edm4hep.root",
output:
"sim_output/{DETECTOR_CONFIG}/{PARTICLE}/{ENERGY}/{PHASE_SPACE}/{PARTICLE}_{ENERGY}_{PHASE_SPACE}.{INDEX}.edm4hep.root",
......
remote: S3
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment