Skip to content
Snippets Groups Projects
Commit df9a399a authored by Jeremy M Fee's avatar Jeremy M Fee
Browse files

Merge branch 'controller-derived-option' into 'master'

Make derived factory optional for controller

See merge request !137
parents e2b2eb85 9195b41f
No related branches found
Tags 1.4.2
2 merge requests!146Release CMO metadata to production,!137Make derived factory optional for controller
Pipeline #69410 passed
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
"name": "geomag-algorithms", "name": "geomag-algorithms",
"organization": "U.S. Geological Survey", "organization": "U.S. Geological Survey",
"description": "Library for processing Geomagnetic timeseries data.", "description": "Library for processing Geomagnetic timeseries data.",
"version": "1.4.1", "version": "1.4.2",
"status": "Development", "status": "Development",
"permissions": { "permissions": {
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
}, },
"date": { "date": {
"metadataLastUpdated": "2021-08-24" "metadataLastUpdated": "2021-08-26"
} }
} }
] ]
...@@ -548,7 +548,7 @@ def get_input_factory(args): ...@@ -548,7 +548,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 DerivedTimeseriesFactory(input_factory) return input_factory
def get_output_factory(args): def get_output_factory(args):
...@@ -725,6 +725,8 @@ def _main(args): ...@@ -725,6 +725,8 @@ def _main(args):
""" """
# create controller # create controller
input_factory = get_input_factory(args) input_factory = get_input_factory(args)
if args.input_derived:
input_factory = DerivedTimeseriesFactory(input_factory)
output_factory = get_output_factory(args) output_factory = get_output_factory(args)
algorithm = algorithms[args.algorithm]() algorithm = algorithms[args.algorithm]()
algorithm.configure(args) algorithm.configure(args)
...@@ -766,6 +768,12 @@ def parse_args(args): ...@@ -766,6 +768,12 @@ def parse_args(args):
help='Input format (Default "edge")', help='Input format (Default "edge")',
) )
input_group.add_argument(
"--input-derived",
action="store_true",
default=False,
help="Wrap the input factory in a DerivedTimeseriesFactory",
)
input_group.add_argument( input_group.add_argument(
"--input-file", help="Read from specified file", metavar="FILE" "--input-file", help="Read from specified file", metavar="FILE"
) )
......
...@@ -17,7 +17,7 @@ packages = [ ...@@ -17,7 +17,7 @@ packages = [
{include = "geomagio" } {include = "geomagio" }
] ]
repository="https://code.usgs.gov/ghsc/geomag/geomag-algorithms" repository="https://code.usgs.gov/ghsc/geomag/geomag-algorithms"
version = "1.4.1" version = "1.4.2"
[tool.poetry.dependencies] [tool.poetry.dependencies]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment