Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
athena
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Scott Snyder
athena
Commits
bd62a7fe
Commit
bd62a7fe
authored
5 years ago
by
Walter Lampl
Browse files
Options
Downloads
Patches
Plain Diff
ComponentAccumulator cleanup
parent
1029e7f7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Control/AthenaConfiguration/python/ComponentAccumulator.py
+1
-27
1 addition, 27 deletions
Control/AthenaConfiguration/python/ComponentAccumulator.py
with
1 addition
and
27 deletions
Control/AthenaConfiguration/python/ComponentAccumulator.py
+
1
−
27
View file @
bd62a7fe
...
...
@@ -64,8 +64,6 @@ class ComponentAccumulator(object):
self
.
_algorithms
=
{}
#Flat algorithms list, useful for merging
self
.
_conditionsAlgs
=
[]
#Unordered list of conditions algorithms + their private tools
self
.
_services
=
[]
#List of service, not yet sure if the order matters here in the MT age
self
.
_eventInputs
=
set
()
#List of items (as strings) to be read from the input (required at least for BS-reading).
self
.
_outputPerStream
=
{}
#Dictionary of {streamName,set(items)}, all as strings
self
.
_privateTools
=
None
#A placeholder to carry a private tool(s) not yet attached to its parent
self
.
_primaryComp
=
None
#A placeholder to designate the primary service
...
...
@@ -93,7 +91,7 @@ class ComponentAccumulator(object):
def
empty
(
self
):
return
len
(
self
.
_sequence
)
+
len
(
self
.
_conditionsAlgs
)
+
len
(
self
.
_services
)
+
\
len
(
self
.
_publicTools
)
+
len
(
self
.
_
outputPerStream
)
+
len
(
self
.
_
theAppProps
)
==
0
len
(
self
.
_publicTools
)
+
len
(
self
.
_theAppProps
)
==
0
def
__del__
(
self
):
if
not
getattr
(
self
,
'
_wasMerged
'
,
True
)
and
not
self
.
empty
():
...
...
@@ -118,7 +116,6 @@ class ComponentAccumulator(object):
def
printConfig
(
self
,
withDetails
=
False
,
summariseProps
=
False
):
self
.
_msg
.
info
(
"
Event Inputs
"
)
self
.
_msg
.
info
(
self
.
_eventInputs
)
self
.
_msg
.
info
(
"
Event Algorithm Sequences
"
)
...
...
@@ -149,8 +146,6 @@ class ComponentAccumulator(object):
self
.
printCondAlgs
(
summariseProps
=
summariseProps
)
self
.
_msg
.
info
(
"
Services
"
)
self
.
_msg
.
info
(
[
s
.
getName
()
for
s
in
self
.
_services
]
)
self
.
_msg
.
info
(
"
Outputs
"
)
self
.
_msg
.
info
(
self
.
_outputPerStream
)
self
.
_msg
.
info
(
"
Public Tools
"
)
self
.
_msg
.
info
(
"
[
"
)
for
t
in
self
.
_publicTools
:
...
...
@@ -385,21 +380,6 @@ class ComponentAccumulator(object):
else
:
return
self
.
__getOne
(
self
.
_services
,
name
,
"
Services
"
)
def
addEventInput
(
self
,
condObj
):
#That's a string, should do some sanity checks on formatting
self
.
_eventInput
.
add
(
condObj
)
pass
def
addOutputToStream
(
self
,
streamName
,
outputs
):
if
streamName
in
self
.
_outputsPerStream
:
self
.
_outputsPerStream
[
streamName
].
update
(
set
(
outputs
))
else
:
self
.
_outputsPerStream
[
streamName
]
=
set
(
outputs
)
pass
def
setAppProperty
(
self
,
key
,
value
,
overwrite
=
False
):
if
(
overwrite
or
key
not
in
(
self
.
_theAppProps
)):
...
...
@@ -516,12 +496,6 @@ class ComponentAccumulator(object):
for
pt
in
other
.
_publicTools
:
self
.
addPublicTool
(
pt
)
#Profit from deduplicaton here
for
k
in
other
.
_outputPerStream
.
keys
():
if
k
in
self
.
_outputPerStream
:
self
.
_outputPerStream
[
k
].
update
(
other
.
_outputPerStream
[
k
])
else
:
#New stream type
self
.
_outputPerStream
[
k
]
=
other
.
_outputPerStream
[
k
]
#Merge AppMgr properties:
for
(
k
,
v
)
in
six
.
iteritems
(
other
.
_theAppProps
):
self
.
setAppProperty
(
k
,
v
)
#Will warn about overrides
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment