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
ee8ab48a
Commit
ee8ab48a
authored
5 years ago
by
David Schäfer
Browse files
Options
Downloads
Patches
Plain Diff
cleanups and comments
parent
bfa5ba7a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
saqc/core/core.py
+6
-7
6 additions, 7 deletions
saqc/core/core.py
with
6 additions
and
7 deletions
saqc/core/core.py
+
6
−
7
View file @
ee8ab48a
...
...
@@ -73,19 +73,18 @@ def runner(config_file, flagger, data, flags=None, nodata=np.nan, error_policy="
tests
=
config
.
filter
(
regex
=
Fields
.
TESTS
)
meta
=
config
[
config
.
columns
.
difference
(
tests
.
columns
)]
# # prepapre the flags
# varnames = _collectVariables(meta, data)
# fresh = flagger.initFlags(pd.DataFrame(index=data.index, columns=varnames))
# flagger = fresh if flags is None else flags.join(fresh._flags)
# prepapre the flags
flag_cols
=
_collectVariables
(
meta
,
data
)
flagger
=
flagger
.
initFlags
(
data
=
pd
.
DataFrame
(
index
=
data
.
index
,
columns
=
flag_cols
))
if
flags
is
not
None
:
flagger
=
flagger
.
setFlagger
(
flagger
.
initFlags
(
flags
=
flags
))
# this checks comes late, but the compiling of the user-test need fully prepared flags
# NOTE:
# this checks comes late, but the compilation of
# user-test needs fully prepared flags
checkConfig
(
config
,
data
,
flagger
,
nodata
)
# NOTE:
# the outer loop runs over the flag tests, the inner one over the
# variables. Switching the loop order would complicate the
# reference to flags from other variables within the dataset
...
...
@@ -106,7 +105,7 @@ def runner(config_file, flagger, data, flags=None, nodata=np.nan, error_policy="
if
pd
.
isnull
(
flag_test
):
continue
if
varname
not
in
data
and
varname
not
in
flagger
.
getFlags
()
.
columns
:
if
varname
not
in
data
and
varname
not
in
flagger
.
getFlags
():
continue
# prepare the data for the tests
...
...
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