TextConfig: add block to add blocks from YAML file
Inorder to allow for users to add blocks from the YAML file without editting the python code, a new block was added.
Example adding the CommonServices
block:
AddConfigBlocks:
- modulePath: 'AsgAnalysisAlgorithms.AsgAnalysisConfig'
functionName: 'makeCommonServicesConfig'
algName: 'CommonServices'
pos: 'PileupReweighting'
The code calls import functionName from modulePath
. The function or class that will be called corresponds to functionName
and will be run before the block at pos
. The block can be referenced in the yaml file using algName
.
Merge request reports
Activity
This merge request affects 1 package:
- PhysicsAnalysis/Algorithms/AnalysisAlgorithmsConfig
This merge request affects 2 files:
- PhysicsAnalysis/Algorithms/AnalysisAlgorithmsConfig/python/ConfigFactory.py
- PhysicsAnalysis/Algorithms/AnalysisAlgorithmsConfig/python/ConfigText.py
CI Result SUCCESS (hash da3771f6)Athena AnalysisBase AthAnalysis externals cmake make tests Full details available on this CI monitor view. Check the JIRA CI status board for known problems
Athena: number of compilation errors 0, warnings 1
AnalysisBase: number of compilation errors 0, warnings 0
AthAnalysis: number of compilation errors 0, warnings 0
For experts only: Jenkins output [CI-MERGE-REQUEST-EL9 3998]- Resolved by Joseph Earl Lambert
hi @jolamber, thanks a lot for implementing this!
In the example above you have this argument
methodName: 'makeCommonServicesConfig'
-- do I understand correctly, that it works the same way as in the python interface, that one can pass either a make-method or the block class itself ? Because if yes, I am slightly worried that themethodName
might confuse people a bit.
added 1 commit
- ff30c192 - remove unused import and change fxn name for addBlock
This merge request affects 1 package:
- PhysicsAnalysis/Algorithms/AnalysisAlgorithmsConfig
This merge request affects 2 files:
- PhysicsAnalysis/Algorithms/AnalysisAlgorithmsConfig/python/ConfigFactory.py
- PhysicsAnalysis/Algorithms/AnalysisAlgorithmsConfig/python/ConfigText.py
CI Result SUCCESS (hash ff30c192)Athena AnalysisBase AthAnalysis externals cmake make tests Full details available on this CI monitor view. Check the JIRA CI status board for known problems
Athena: number of compilation errors 0, warnings 0
AnalysisBase: number of compilation errors 0, warnings 0
AthAnalysis: number of compilation errors 0, warnings 0
For experts only: Jenkins output [CI-MERGE-REQUEST-EL9 4008]- Resolved by Lucy Lewitt
added review-approved label and removed review-pending-level-1 label
added analysis-review-approved label and removed analysis-review-required label
mentioned in commit 7b926b5c