Skip to content

Commit

Permalink
Update upstream cf.
Browse files Browse the repository at this point in the history
  • Loading branch information
riga committed Jun 10, 2024
1 parent 6da689a commit 31e65db
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 36 deletions.
27 changes: 0 additions & 27 deletions hbt/columnflow_patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,34 +55,7 @@ def htcondor_job_resources(self, job_num, branches):
logger.debug(f"patched htcondor_job_resources of {HTCondorWorkflow.task_family}")


@memoize
def patch_user_parameters():
"""
Adds user parameters to some tasks.
"""
from hbt.tasks.parameters import user_parameter_inst
from columnflow.tasks.framework.remote import (
BundleRepo,
BundleSoftware,
BuildBashSandbox,
BundleBashSandbox,
BundleCMSSWSandbox,
)

for cls in [
BundleRepo,
BundleSoftware,
BuildBashSandbox,
BundleBashSandbox,
BundleCMSSWSandbox,
]:
cls.user_parameter = user_parameter_inst

logger.debug("patched user parameters")


@memoize
def patch_all():
patch_bundle_repo_exclude_files()
patch_htcondor_workflow_naf_resources()
patch_user_parameters()
8 changes: 0 additions & 8 deletions hbt/tasks/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
Custom, common parameters.
"""

import getpass

import luigi


Expand All @@ -17,9 +15,3 @@
default=False,
description="escape some characters for markdown; default: False",
)
user_parameter_inst = luigi.Parameter(
default=getpass.getuser(),
description="the user running the current task, mainly for central schedulers to distinguish "
"between tasks that should or should not be run in parallel by multiple users; "
"default: current user",
)

0 comments on commit 31e65db

Please sign in to comment.