forked from columnflow/columnflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'columnflow:master' into run3_working_branch
- Loading branch information
Showing
36 changed files
with
680 additions
and
199 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Executable that conveniently triggers "cf_sandbox SANDBOX law ..." commands. | ||
# The SANDBOX is determined with the following precedence: | ||
# 1. CLAW_SANDBOX (env) | ||
# 2. analysis.default_columnar_sandbox (law.cfg) | ||
# 3. venv_columnar_dev (default) | ||
|
||
action() { | ||
# get the target sandbox | ||
local sandbox | ||
if [ ! -z "${CLAW_SANDBOX}" ]; then | ||
sandbox="${CLAW_SANDBOX}" | ||
fi | ||
if [ -z "${sandbox}" ]; then | ||
local sandbox_tmp="$( law config analysis.default_columnar_sandbox 2>/dev/null )" | ||
if [ "$?" = "0" ]; then | ||
# extract the name of the sandbox, remove file extension, potentially add '_dev' suffix | ||
sandbox_tmp="$( basename "${sandbox_tmp}" )" | ||
sandbox_tmp="${sandbox_tmp%.*}" | ||
[[ "${sandbox_tmp}" = *_dev ]] || sandbox_tmp="${sandbox_tmp}_dev" | ||
sandbox="${sandbox_tmp}" | ||
fi | ||
fi | ||
if [ -z "${sandbox}" ]; then | ||
sandbox="venv_columnar_dev" | ||
fi | ||
# echo "sandbox '${sandbox}'" | ||
|
||
# run the command | ||
cf_sandbox "${sandbox}" law "$@" | ||
} | ||
action "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.