Skip to content
Snippets Groups Projects
Commit 6764203e authored by Frank Winklmeier's avatar Frank Winklmeier
Browse files

EvgenJobTransforms: enable flake8 and make code compliant

parent cb88da02
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,6 @@
atlas_subdir( EvgenJobTransforms )
# Install files from the package:
atlas_install_python_modules( python/*.py )
atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
atlas_install_joboptions( share/*.py )
atlas_install_runtime( scripts/*.py )
......@@ -51,9 +51,9 @@ notuneGenerators = ["ParticleGenerator", "ParticleGun", "CosmicGenerator", "Beam
def gen_require_steering(gennames):
"Return a boolean of whether this set of generators requires the steering command line flag"
if not "EvtGen" in gennames: return False
if any(("Pythia" in gen and not "Pythia8" in gen) for gen in gennames): return True
if any(("Herwig" in gen and not "Herwigpp" in gen and not "Herwig7" in gen) for gen in gennames): return True
if "EvtGen" not in gennames: return False
if any(("Pythia" in gen and "Pythia8" not in gen) for gen in gennames): return True
if any(("Herwig" in gen and "Herwigpp" not in gen and "Herwig7" not in gen) for gen in gennames): return True
return False
def gen_known(genname):
......@@ -103,7 +103,7 @@ def gen_sortkey(genname):
return (genstage, isjimmy, genname)
from PyJobTransformsCore.TransformConfig import *
from PyJobTransformsCore.TransformConfig import TransformConfig, String, ListOfStrings, Boolean, Integer, AllowedExpression, TransformConfigError
class EvgenConfig(TransformConfig):
__slots__ = ()
generators = ListOfStrings("List of used generators", allowedValues=knownGenerators)
......
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Helper functions for setting up a job options proxy
import os,shutil
......@@ -17,7 +17,7 @@ def mk_jo_proxy(targetbasepath, pkgname, proxypath, addtosearch=True):
os.environ['LOCAL_DATA_DIR'] = (os.environ['DATAPATH']).split(":")[0]
dirlist = get_immediate_subdirectories(targetbasepath)
subdirlist=dirlist;
subdirlist=dirlist
for dd in (dirlist):
if (('.svn' not in dd) and ('cmt' not in dd) and ('_joproxy' not in dd)):
deepdir = os.path.join(targetbasepath, dd)
......@@ -43,4 +43,4 @@ def mk_jo_proxy(targetbasepath, pkgname, proxypath, addtosearch=True):
os.environ["DATAPATH"] =os.path.join(targetbasepath, d)+":"+os.environ["DATAPATH"]
os.environ["JOBOPTSEARCHPATH"] = os.environ['LOCAL_INSTALL_DIR']+":"+os.environ["JOBOPTSEARCHPATH"]
os.environ["DATAPATH"] = os.environ['LOCAL_DATA_DIR']+":"+os.environ["DATAPATH"]
\ No newline at end of file
os.environ["DATAPATH"] = os.environ['LOCAL_DATA_DIR']+":"+os.environ["DATAPATH"]
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