Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
geomag-algorithms
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
ghsc
National Geomagnetism Program
geomag-algorithms
Commits
b70d37aa
Commit
b70d37aa
authored
6 years ago
by
Jeremy M Fee
Browse files
Options
Downloads
Patches
Plain Diff
Support input-url without template parameters
parent
2189e641
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
geomagio/Controller.py
+8
-5
8 additions, 5 deletions
geomagio/Controller.py
with
8 additions
and
5 deletions
geomagio/Controller.py
+
8
−
5
View file @
b70d37aa
...
@@ -4,11 +4,12 @@ from builtins import str as unicode
...
@@ -4,11 +4,12 @@ from builtins import str as unicode
import
argparse
import
argparse
import
sys
import
sys
from
io
import
BytesIO
from
obspy.core
import
Stream
,
UTCDateTime
from
obspy.core
import
Stream
,
UTCDateTime
from
.algorithm
import
algorithms
from
.algorithm
import
algorithms
from
.PlotTimeseriesFactory
import
PlotTimeseriesFactory
from
.PlotTimeseriesFactory
import
PlotTimeseriesFactory
from
.StreamTimeseriesFactory
import
StreamTimeseriesFactory
from
.StreamTimeseriesFactory
import
StreamTimeseriesFactory
from
.
import
TimeseriesUtility
from
.
import
TimeseriesUtility
,
Util
# factory packages
# factory packages
from
.
import
binlog
from
.
import
binlog
...
@@ -289,9 +290,11 @@ def get_input_factory(args):
...
@@ -289,9 +290,11 @@ def get_input_factory(args):
elif
args
.
input_stdin
:
elif
args
.
input_stdin
:
input_stream
=
sys
.
stdin
input_stream
=
sys
.
stdin
elif
args
.
input_url
is
not
None
:
elif
args
.
input_url
is
not
None
:
input_factory_args
[
'
urlInterval
'
]
=
args
.
input_url_interval
if
'
{
'
in
args
.
input_url
:
input_factory_args
[
'
urlTemplate
'
]
=
args
.
input_url
input_factory_args
[
'
urlInterval
'
]
=
args
.
input_url_interval
input_factory_args
[
'
urlTemplate
'
]
=
args
.
input_url
else
:
input_stream
=
BytesIO
(
Util
.
read_url
(
args
.
input_url
))
input_type
=
args
.
input
input_type
=
args
.
input
if
input_type
==
'
edge
'
:
if
input_type
==
'
edge
'
:
input_factory
=
edge
.
EdgeFactory
(
input_factory
=
edge
.
EdgeFactory
(
...
@@ -317,7 +320,7 @@ def get_input_factory(args):
...
@@ -317,7 +320,7 @@ def get_input_factory(args):
elif
input_type
==
'
imfv283
'
:
elif
input_type
==
'
imfv283
'
:
input_factory
=
imfv283
.
IMFV283Factory
(
**
input_factory_args
)
input_factory
=
imfv283
.
IMFV283Factory
(
**
input_factory_args
)
elif
input_type
==
'
pcdcp
'
:
elif
input_type
==
'
pcdcp
'
:
input_factory
=
pcdcp
.
PCDCPFactory
(
**
input_factory_args
)
input_factory
=
pcdcp
.
PCDCPFactory
(
**
input_factory_args
)
# wrap stream
# wrap stream
if
input_stream
is
not
None
:
if
input_stream
is
not
None
:
input_factory
=
StreamTimeseriesFactory
(
input_factory
=
StreamTimeseriesFactory
(
...
...
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