Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SaQC
Manage
Activity
Members
Labels
Plan
Issues
36
Issue boards
Milestones
Wiki
Code
Merge requests
8
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
rdm-software
SaQC
Commits
d4da3112
Commit
d4da3112
authored
4 years ago
by
David Schäfer
Browse files
Options
Downloads
Patches
Plain Diff
fixed per instance log level settings
parent
9d395140
No related branches found
No related tags found
2 merge requests
!193
Release 1.4
,
!188
Release 1.4
Pipeline
#5379
passed with stage
in 6 minutes and 48 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
saqc/__main__.py
+3
-2
3 additions, 2 deletions
saqc/__main__.py
saqc/core/__init__.py
+1
-1
1 addition, 1 deletion
saqc/core/__init__.py
saqc/core/core.py
+4
-5
4 additions, 5 deletions
saqc/core/core.py
with
8 additions
and
8 deletions
saqc/__main__.py
+
3
−
2
View file @
d4da3112
...
...
@@ -6,7 +6,7 @@ import click
import
numpy
as
np
import
pandas
as
pd
from
saqc.core
import
SaQC
from
saqc.core
import
SaQC
,
logger
from
saqc.flagger
import
CategoricalFlagger
from
saqc.flagger.dmpflagger
import
DmpFlagger
import
dios
...
...
@@ -37,13 +37,14 @@ FLAGGERS = {
@click.option
(
"
--fail/--no-fail
"
,
default
=
True
,
help
=
"
whether to stop the program run on errors
"
)
def
main
(
config
,
data
,
flagger
,
outfile
,
nodata
,
log_level
,
fail
):
logger
.
setLevel
(
log_level
)
data
=
pd
.
read_csv
(
data
,
index_col
=
0
,
parse_dates
=
True
,)
data
=
dios
.
DictOfSeries
(
data
)
saqc
=
SaQC
(
flagger
=
FLAGGERS
[
flagger
],
data
=
data
,
log_level
=
log_level
,
nodata
=
nodata
,
error_policy
=
"
raise
"
if
fail
else
"
warn
"
,
)
...
...
This diff is collapsed.
Click to expand it.
saqc/core/__init__.py
+
1
−
1
View file @
d4da3112
#! /usr/bin/env python
# -*- coding: utf-8 -*-
from
saqc.core.core
import
SaQC
from
saqc.core.core
import
SaQC
,
logger
from
saqc.core.register
import
register
This diff is collapsed.
Click to expand it.
saqc/core/core.py
+
4
−
5
View file @
d4da3112
...
...
@@ -9,7 +9,6 @@ TODOS:
import
logging
from
copy
import
deepcopy
from
operator
import
attrgetter
from
typing
import
List
,
Tuple
import
pandas
as
pd
...
...
@@ -86,7 +85,7 @@ def _prepInput(flagger, data, flags):
return
data
,
flags
def
_setup
(
log_level
):
def
_setup
():
# NOTE:
# the import is needed to trigger the registration
# of the built-in (test-)functions
...
...
@@ -97,16 +96,16 @@ def _setup(log_level):
np
.
seterr
(
invalid
=
"
ignore
"
)
# logging
logger
.
setLevel
(
log
_level
)
logger
.
setLevel
(
log
ging
.
INFO
)
handler
=
logging
.
StreamHandler
()
formatter
=
logging
.
Formatter
(
"
[%(asctime)s][%(name)s][%(levelname)s]: %(message)s
"
)
handler
.
setFormatter
(
formatter
)
logger
.
addHandler
(
handler
)
_setup
()
class
SaQC
:
def
__init__
(
self
,
flagger
,
data
,
flags
=
None
,
nodata
=
np
.
nan
,
log_level
=
logging
.
INFO
,
error_policy
=
"
raise
"
):
_setup
(
log_level
)
def
__init__
(
self
,
flagger
,
data
,
flags
=
None
,
nodata
=
np
.
nan
,
error_policy
=
"
raise
"
):
data
,
flags
=
_prepInput
(
flagger
,
data
,
flags
)
self
.
_data
=
data
self
.
_nodata
=
nodata
...
...
This diff is collapsed.
Click to expand it.
David Schäfer
@schaefed
mentioned in issue
#74 (closed)
·
4 years ago
mentioned in issue
#74 (closed)
mentioned in issue #74
Toggle commit list
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