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
fcb51ff2
Commit
fcb51ff2
authored
5 years ago
by
Bert Palm
🎇
Browse files
Options
Downloads
Patches
Plain Diff
fixes
parent
cce37f84
No related branches found
Branches containing commit
No related tags found
Tags containing commit
3 merge requests
!193
Release 1.4
,
!188
Release 1.4
,
!24
Dios integration
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
saqc/core/core.py
+4
-3
4 additions, 3 deletions
saqc/core/core.py
test/core/test_core.py
+6
-6
6 additions, 6 deletions
test/core/test_core.py
with
10 additions
and
9 deletions
saqc/core/core.py
+
4
−
3
View file @
fcb51ff2
...
...
@@ -10,7 +10,6 @@ from saqc.core.reader import readConfig, checkConfig
from
saqc.core.config
import
Fields
from
saqc.core.evaluator
import
evalExpression
from
saqc.lib.plotting
import
plotHook
,
plotAllHook
from
saqc.lib.tools
import
combineDataFrames
from
saqc.lib.types
import
DiosLikeT
from
saqc.flagger
import
BaseFlagger
,
CategoricalFlagger
,
SimpleFlagger
,
DmpFlagger
...
...
@@ -39,7 +38,9 @@ def _convertInput(data, flags):
def
_checkAndConvertInput
(
data
,
flags
,
flagger
):
if
not
isinstance
(
data
,
DiosLikeT
):
dios_like
=
(
dios
.
DictOfSeries
,
pd
.
DataFrame
)
if
not
isinstance
(
data
,
dios_like
):
raise
TypeError
(
"
data must be of type dios.DictOfSeries or pd.DataFrame
"
)
if
isinstance
(
data
,
pd
.
DataFrame
):
...
...
@@ -55,7 +56,7 @@ def _checkAndConvertInput(data, flags, flagger):
if
flags
is
not
None
:
if
not
isinstance
(
flags
,
D
ios
L
ike
T
):
if
not
isinstance
(
flags
,
d
ios
_l
ike
):
raise
TypeError
(
"
flags must be of type dios.DictOfSeries or pd.DataFrame
"
)
if
isinstance
(
flags
,
pd
.
DataFrame
):
...
...
This diff is collapsed.
Click to expand it.
test/core/test_core.py
+
6
−
6
View file @
fcb51ff2
...
...
@@ -9,7 +9,7 @@ import dios.dios as dios
from
saqc.funcs
import
register
,
flagRange
from
saqc.core.core
import
run
from
saqc.core.config
import
Fields
as
F
from
saqc.lib.plotting
import
_
plot
import
saqc.lib.plotting
as
s
plot
from
test.common
import
initData
,
initMetaDict
,
TESTFLAGGER
...
...
@@ -198,8 +198,8 @@ def test_plotting(data, flagger):
field
,
*
_
=
data
.
columns
flagger
=
flagger
.
initFlags
(
data
)
_
,
flagger_range
=
flagRange
(
data
,
field
,
flagger
,
min
=
10
,
max
=
90
,
flag
=
flagger
.
BAD
)
_
,
flagger_range
=
flagRange
(
data
,
field
,
flagger_range
,
min
=
40
,
max
=
60
,
flag
=
flagger
.
GOOD
)
mask
=
flagger
.
getFlags
(
field
)
!=
flagger_range
.
getFlags
(
field
)
_
plot
(
data
,
mask
,
field
,
flagger
,
interactive_backend
=
False
)
data_new
,
flagger_range
=
flagRange
(
data
,
field
,
flagger_range
,
min
=
40
,
max
=
60
,
flag
=
flagger
.
GOOD
)
splot
.
_interactive
=
False
splot
.
_plotSingleVariable
(
data
,
data_new
,
flagger
,
flagger_range
,
sources
=
[],
targets
=
[
data_new
.
columns
[
0
]]
)
splot
.
_plotMultipleVariables
(
data
,
data_new
,
flagger
,
flagger_range
,
targets
=
data_new
.
columns
)
s
plot
.
_interactive
=
True
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