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
d61536f2
Commit
d61536f2
authored
3 years ago
by
Cain, Payton David
Committed by
Jeremy M Fee
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Derived Factory in Controller/ws
parent
61c75d4a
No related branches found
No related tags found
2 merge requests
!146
Release CMO metadata to production
,
!119
Derived ts factory
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
geomagio/Controller.py
+2
-1
2 additions, 1 deletion
geomagio/Controller.py
geomagio/api/ws/data.py
+4
-3
4 additions, 3 deletions
geomagio/api/ws/data.py
with
6 additions
and
4 deletions
geomagio/Controller.py
+
2
−
1
View file @
d61536f2
...
@@ -8,6 +8,7 @@ from typing import List, Optional, Tuple, Union
...
@@ -8,6 +8,7 @@ from typing import List, Optional, Tuple, Union
from
obspy.core
import
Stream
,
UTCDateTime
from
obspy.core
import
Stream
,
UTCDateTime
from
.algorithm
import
Algorithm
,
algorithms
,
AlgorithmException
from
.algorithm
import
Algorithm
,
algorithms
,
AlgorithmException
from
.DerivedTimeseriesFactory
import
DerivedTimeseriesFactory
from
.PlotTimeseriesFactory
import
PlotTimeseriesFactory
from
.PlotTimeseriesFactory
import
PlotTimeseriesFactory
from
.StreamTimeseriesFactory
import
StreamTimeseriesFactory
from
.StreamTimeseriesFactory
import
StreamTimeseriesFactory
from
.
import
TimeseriesUtility
,
Util
from
.
import
TimeseriesUtility
,
Util
...
@@ -543,7 +544,7 @@ def get_input_factory(args):
...
@@ -543,7 +544,7 @@ def get_input_factory(args):
input_factory
=
StreamTimeseriesFactory
(
input_factory
=
StreamTimeseriesFactory
(
factory
=
input_factory
,
stream
=
input_stream
factory
=
input_factory
,
stream
=
input_stream
)
)
return
input_factory
return
DerivedTimeseriesFactory
(
input_factory
)
def
get_output_factory
(
args
):
def
get_output_factory
(
args
):
...
...
This diff is collapsed.
Click to expand it.
geomagio/api/ws/data.py
+
4
−
3
View file @
d61536f2
...
@@ -5,7 +5,7 @@ from fastapi import APIRouter, Depends, Query
...
@@ -5,7 +5,7 @@ from fastapi import APIRouter, Depends, Query
from
obspy
import
UTCDateTime
,
Stream
from
obspy
import
UTCDateTime
,
Stream
from
starlette.responses
import
Response
from
starlette.responses
import
Response
from
...
import
TimeseriesFactory
,
TimeseriesUtility
from
...
import
DerivedTimeseriesFactory
,
TimeseriesFactory
,
TimeseriesUtility
from
...edge
import
EdgeFactory
,
MiniSeedFactory
from
...edge
import
EdgeFactory
,
MiniSeedFactory
from
...iaga2002
import
IAGA2002Writer
from
...iaga2002
import
IAGA2002Writer
from
...imfjson
import
IMFJSONWriter
from
...imfjson
import
IMFJSONWriter
...
@@ -35,15 +35,16 @@ def get_data_factory(
...
@@ -35,15 +35,16 @@ def get_data_factory(
SamplingPeriod
.
HOUR
,
SamplingPeriod
.
HOUR
,
SamplingPeriod
.
DAY
,
SamplingPeriod
.
DAY
,
]:
]:
return
MiniSeedFactory
(
factory
=
MiniSeedFactory
(
host
=
host
,
port
=
int
(
os
.
getenv
(
"
DATA_MINISEED_PORT
"
,
"
2061
"
))
host
=
host
,
port
=
int
(
os
.
getenv
(
"
DATA_MINISEED_PORT
"
,
"
2061
"
))
)
)
elif
sampling_period
in
[
SamplingPeriod
.
SECOND
,
SamplingPeriod
.
MINUTE
]:
elif
sampling_period
in
[
SamplingPeriod
.
SECOND
,
SamplingPeriod
.
MINUTE
]:
return
EdgeFactory
(
factory
=
EdgeFactory
(
host
=
host
,
port
=
int
(
os
.
getenv
(
"
DATA_EARTHWORM_PORT
"
,
"
2060
"
))
host
=
host
,
port
=
int
(
os
.
getenv
(
"
DATA_EARTHWORM_PORT
"
,
"
2060
"
))
)
)
else
:
else
:
return
None
return
None
return
DerivedTimeseriesFactory
(
factory
)
def
get_data_query
(
def
get_data_query
(
...
...
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