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
[List of commits](https://git.ufz.de/rdm-software/saqc/-/compare/v2.4.0...develop)
### Added
- added checks and unified error message for common inputs.
- added command line `--version` option
### Changed
- pin pandas to versions >= 2.0
- parameter `fill_na` of `SaQC.flagUniLOF` and `SaQC.assignUniLOF` is now of type
......
......@@ -18,6 +18,7 @@ import pyarrow as pa
from saqc.core import DictOfSeries
from saqc.core.core import TRANSLATION_SCHEMES
from saqc.parsing.reader import fromConfig
from saqc.version import __version__
logger = logging.getLogger("SaQC")
......@@ -66,6 +67,7 @@ def writeData(writer_dict, df, fname):
@click.command()
@click.version_option(__version__)
@click.option(
"-c",
"--config",
......@@ -82,11 +84,16 @@ def writeData(writer_dict, df, fname):
help="path to the data file",
)
@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(
"--scheme",
default=None,
default="simple",
show_default=True,
type=click.Choice(tuple(TRANSLATION_SCHEMES.keys())),
help="the flagging scheme to use",
)
......@@ -94,6 +101,7 @@ def writeData(writer_dict, df, fname):
@click.option(
"--log-level",
default="INFO",
show_default=True,
type=click.Choice(["DEBUG", "INFO", "WARNING"]),
help="set output verbosity",
)
......
......@@ -35,8 +35,8 @@ np.seterr(invalid="ignore")
TRANSLATION_SCHEMES = {
"float": FloatScheme,
"simple": SimpleScheme,
"float": FloatScheme,
"dmp": DmpScheme,
"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