Skip to content
Snippets Groups Projects
Commit 72fc3910 authored by Bert Palm's avatar Bert Palm 🎇
Browse files

Merge branch 'version_option' into 'develop'

Version option

Closes #436

See merge request !713
parents 88eab9b4 47c85d02
No related branches found
No related tags found
1 merge request!713Version option
Pipeline #182705 passed with stages
in 7 minutes and 14 seconds
...@@ -10,6 +10,7 @@ SPDX-License-Identifier: GPL-3.0-or-later ...@@ -10,6 +10,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
[List of commits](https://git.ufz.de/rdm-software/saqc/-/compare/v2.4.0...develop) [List of commits](https://git.ufz.de/rdm-software/saqc/-/compare/v2.4.0...develop)
### Added ### Added
- added checks and unified error message for common inputs. - added checks and unified error message for common inputs.
- added command line `--version` option
### Changed ### Changed
- pin pandas to versions >= 2.0 - pin pandas to versions >= 2.0
- parameter `fill_na` of `SaQC.flagUniLOF` and `SaQC.assignUniLOF` is now of type - parameter `fill_na` of `SaQC.flagUniLOF` and `SaQC.assignUniLOF` is now of type
......
...@@ -18,6 +18,7 @@ import pyarrow as pa ...@@ -18,6 +18,7 @@ import pyarrow as pa
from saqc.core import DictOfSeries from saqc.core import DictOfSeries
from saqc.core.core import TRANSLATION_SCHEMES from saqc.core.core import TRANSLATION_SCHEMES
from saqc.parsing.reader import fromConfig from saqc.parsing.reader import fromConfig
from saqc.version import __version__
logger = logging.getLogger("SaQC") logger = logging.getLogger("SaQC")
...@@ -66,6 +67,7 @@ def writeData(writer_dict, df, fname): ...@@ -66,6 +67,7 @@ def writeData(writer_dict, df, fname):
@click.command() @click.command()
@click.version_option(__version__)
@click.option( @click.option(
"-c", "-c",
"--config", "--config",
...@@ -82,11 +84,16 @@ def writeData(writer_dict, df, fname): ...@@ -82,11 +84,16 @@ def writeData(writer_dict, df, fname):
help="path to the data file", help="path to the data file",
) )
@click.option( @click.option(
"-o", "--outfile", type=click.Path(exists=False), help="path to the output file" "-o",
"--outfile",
type=click.Path(exists=False),
required=False,
help="path to the output file",
) )
@click.option( @click.option(
"--scheme", "--scheme",
default=None, default="simple",
show_default=True,
type=click.Choice(tuple(TRANSLATION_SCHEMES.keys())), type=click.Choice(tuple(TRANSLATION_SCHEMES.keys())),
help="the flagging scheme to use", help="the flagging scheme to use",
) )
...@@ -94,6 +101,7 @@ def writeData(writer_dict, df, fname): ...@@ -94,6 +101,7 @@ def writeData(writer_dict, df, fname):
@click.option( @click.option(
"--log-level", "--log-level",
default="INFO", default="INFO",
show_default=True,
type=click.Choice(["DEBUG", "INFO", "WARNING"]), type=click.Choice(["DEBUG", "INFO", "WARNING"]),
help="set output verbosity", help="set output verbosity",
) )
......
...@@ -35,8 +35,8 @@ np.seterr(invalid="ignore") ...@@ -35,8 +35,8 @@ np.seterr(invalid="ignore")
TRANSLATION_SCHEMES = { TRANSLATION_SCHEMES = {
"float": FloatScheme,
"simple": SimpleScheme, "simple": SimpleScheme,
"float": FloatScheme,
"dmp": DmpScheme, "dmp": DmpScheme,
"positional": PositionalScheme, "positional": PositionalScheme,
} }
......
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