Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GraceDB Server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
IGWN Computing and Software
GraceDB
GraceDB Server
Commits
f0405a11
Commit
f0405a11
authored
6 years ago
by
Tanner Prestegard
Committed by
GraceDB
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Bugfixes to superevent queries
parent
6b4b9c83
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
gracedb/search/query/superevents.py
+11
-10
11 additions, 10 deletions
gracedb/search/query/superevents.py
with
11 additions
and
10 deletions
gracedb/search/query/superevents.py
+
11
−
10
View file @
f0405a11
...
...
@@ -70,7 +70,7 @@ parameter_dicts = {
'
t_0
'
:
{
'
keyword
'
:
[
'
t_0
'
,
'
gpstime
'
],
'
keywordOptional
'
:
True
,
'
value
'
:
Word
(
nums
+
'
.
'
)
,
'
value
'
:
pyparsing_common
.
number
,
'
doRange
'
:
True
,
'
parseAction
'
:
maybeRange
(
'
t_0
'
),
},
...
...
@@ -78,7 +78,7 @@ parameter_dicts = {
'
t_start
'
:
{
'
keyword
'
:
'
t_start
'
,
'
keywordOptional
'
:
False
,
'
value
'
:
Word
(
nums
+
'
.
'
)
,
'
value
'
:
pyparsing_common
.
number
,
'
doRange
'
:
True
,
'
parseAction
'
:
maybeRange
(
'
t_start
'
),
},
...
...
@@ -86,7 +86,7 @@ parameter_dicts = {
'
t_end
'
:
{
'
keyword
'
:
'
t_end
'
,
'
keywordOptional
'
:
False
,
'
value
'
:
Word
(
nums
+
'
.
'
)
,
'
value
'
:
pyparsing_common
.
number
,
'
doRange
'
:
True
,
'
parseAction
'
:
maybeRange
(
'
t_end
'
),
},
...
...
@@ -199,7 +199,11 @@ for k,p in parameter_dicts.iteritems():
# Define val and set name
val
=
p
[
'
value
'
]
val
.
setName
(
k
)
expr
=
val
# Add range with format: parameter .. parameter
if
p
.
has_key
(
'
doRange
'
)
and
p
[
'
doRange
'
]:
range_val
=
val
+
Suppress
(
"
..
"
)
+
val
val
^=
range_val
# Add keyword. Format is keyword: value
if
p
.
has_key
(
'
keyword
'
):
...
...
@@ -216,12 +220,9 @@ for k,p in parameter_dicts.iteritems():
keyword
=
Optional
(
keyword
)
# Combine keyword and value into a single expression
expr
=
keyword
+
expr
# Add range with format: parameter .. parameter
if
p
.
has_key
(
'
doRange
'
)
and
p
[
'
doRange
'
]:
range_val
=
val
+
Suppress
(
"
..
"
)
+
val
val
^=
range_val
expr
=
keyword
+
val
else
:
expr
=
val
# Set parse action
expr
=
expr
.
setParseAction
(
p
[
'
parseAction
'
])
...
...
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