Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
locklost
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
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
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Austin Jennings
locklost
Commits
9e1c278b
Commit
9e1c278b
authored
5 years ago
by
Jameson Rollins
Browse files
Options
Downloads
Patches
Plain Diff
Update internal references to plugins
with a descriptive docstring.
parent
cda490c3
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
locklost/analyze.py
+4
-4
4 additions, 4 deletions
locklost/analyze.py
locklost/plotutils.py
+1
-1
1 addition, 1 deletion
locklost/plotutils.py
locklost/plugins/__init__.py
+30
-17
30 additions, 17 deletions
locklost/plugins/__init__.py
with
35 additions
and
22 deletions
locklost/analyze.py
+
4
−
4
View file @
9e1c278b
...
...
@@ -7,7 +7,7 @@ from matplotlib import pyplot as plt
from
.
import
__version__
,
set_signal_handlers
from
.
import
config
from
.plugins
import
FOLLOWUP
S
from
.plugins
import
PLUGIN
S
from
.event
import
LocklossEvent
,
find_events
from
.
import
condor
...
...
@@ -46,10 +46,10 @@ def analyze_event(event, plugins=None):
logging
.
info
(
"
event url: {}
"
.
format
(
event
.
url
()))
complete
=
True
for
name
,
func
in
FOLLOWUP
S
.
items
():
for
name
,
func
in
PLUGIN
S
.
items
():
if
plugins
and
name
not
in
plugins
:
continue
logging
.
info
(
"
executing
followup
: {}({})
"
.
format
(
logging
.
info
(
"
executing
plugin
: {}({})
"
.
format
(
name
,
event
.
id
))
try
:
func
(
event
)
...
...
@@ -116,7 +116,7 @@ def _parser_add_arguments(parser):
def
main
(
args
=
None
):
"""
Analyze event(s)
By default all analysis
follow-up
s for the specified event will
By default all analysis
plugin
s for the specified event will
exeuted. If the --condor option is given with GPS start and end
times all events within the specified time span will be analyzed.
...
...
This diff is collapsed.
Click to expand it.
locklost/plotutils.py
+
1
−
1
View file @
9e1c278b
...
...
@@ -23,7 +23,7 @@ def set_thresh_crossing(ax, thresh_crossing, gps, segment):
def
set_rcparams
():
"""
S
ets
matplotlib p
arameters for followups
.
"""
S
tandard
matplotlib p
lot styling
.
"""
plt
.
rcParams
[
'
font.size
'
]
=
30
...
...
This diff is collapsed.
Click to expand it.
locklost/plugins/__init__.py
+
30
−
17
View file @
9e1c278b
'''
locklost followup analysis plugins
The package consists of functions to be run during a locklost event
followup analysis. Plugin functions should take a LocklossEvent as
argument.
Plugins are registerd with the register_plugin() function. Plugins
are currently executed sequentially in a single process, so register
ordering is preserved as a poor-man
'
s dependency tree.
FIXME: figure out better way to express dependencies (e.g. DAG)
'''
import
collections
import
matplotlib.pyplot
as
plt
...
...
@@ -5,49 +18,49 @@ from matplotlib import rcParamsDefault
plt
.
rcParams
.
update
(
rcParamsDefault
)
FOLLOWUP
S
=
collections
.
OrderedDict
()
def
add_follow
(
mod
):
FOLLOWUP
S
.
update
([(
mod
.
__name__
,
mod
)])
PLUGIN
S
=
collections
.
OrderedDict
()
def
register_plugin
(
func
):
PLUGIN
S
.
update
([(
func
.
__name__
,
func
)])
from
.discover
import
discover_data
add_follow
(
discover_data
)
register_plugin
(
discover_data
)
from
.refine
import
refine_time
add_follow
(
refine_time
)
register_plugin
(
refine_time
)
from
.observe
import
check_observe
add_follow
(
check_observe
)
register_plugin
(
check_observe
)
from
.history
import
find_previous_state
add_follow
(
find_previous_state
)
register_plugin
(
find_previous_state
)
from
.saturations
import
find_saturations
add_follow
(
find_saturations
)
register_plugin
(
find_saturations
)
from
.lpy
import
find_lpy
add_follow
(
find_lpy
)
register_plugin
(
find_lpy
)
from
.lsc_asc
import
plot_lsc_asc
add_follow
(
plot_lsc_asc
)
register_plugin
(
plot_lsc_asc
)
from
.glitch
import
analyze_glitches
add_follow
(
analyze_glitches
)
register_plugin
(
analyze_glitches
)
from
.overflows
import
find_overflows
add_follow
(
find_overflows
)
register_plugin
(
find_overflows
)
from
.brs
import
check_brs
add_follow
(
check_brs
)
register_plugin
(
check_brs
)
from
.board_sat
import
check_boards
add_follow
(
check_boards
)
register_plugin
(
check_boards
)
from
.wind
import
check_wind
add_follow
(
check_wind
)
register_plugin
(
check_wind
)
from
.ads_excursion
import
check_ads
add_follow
(
check_ads
)
register_plugin
(
check_ads
)
# add last since this needs to wait for additional data
from
.seismic
import
check_seismic
add_follow
(
check_seismic
)
register_plugin
(
check_seismic
)
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