Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SaQC
Manage
Activity
Members
Labels
Plan
Issues
35
Issue boards
Milestones
Wiki
Code
Merge requests
7
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
be1d5a1c
Commit
be1d5a1c
authored
4 years ago
by
David Schäfer
Browse files
Options
Downloads
Patches
Plain Diff
bugfix: cli failed after merge of dios
parent
42f5c947
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!193
Release 1.4
,
!188
Release 1.4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+3
-3
3 additions, 3 deletions
.gitlab-ci.yml
saqc/__main__.py
+14
-14
14 additions, 14 deletions
saqc/__main__.py
saqc/flagger/dmpflagger.py
+1
-5
1 addition, 5 deletions
saqc/flagger/dmpflagger.py
with
18 additions
and
22 deletions
.gitlab-ci.yml
+
3
−
3
View file @
be1d5a1c
...
...
@@ -20,7 +20,7 @@ test:python36:
-
pip install --upgrade pip
-
pip install -r requirements.txt
-
python -m pytest test
-
python -m saqc --config ressources/data/config_ci.csv --data ressources/data/data.csv
-
python -m saqc --config ressources/data/config_ci.csv --data ressources/data/data.csv
--outfile /tmp/test.csv
test:python37
:
...
...
@@ -30,7 +30,7 @@ test:python37:
-
pip install --upgrade pip
-
pip install -r requirements.txt
-
python -m pytest test
-
python -m saqc --config ressources/data/config_ci.csv --data ressources/data/data.csv
-
python -m saqc --config ressources/data/config_ci.csv --data ressources/data/data.csv
--outfile /tmp/test.csv
test:python38
:
...
...
@@ -40,4 +40,4 @@ test:python38:
-
pip install --upgrade pip
-
pip install -r requirements.txt
-
python -m pytest test
-
python -m saqc --config ressources/data/config_ci.csv --data ressources/data/data.csv
-
python -m saqc --config ressources/data/config_ci.csv --data ressources/data/data.csv
--outfile /tmp/test.csv
This diff is collapsed.
Click to expand it.
saqc/__main__.py
+
14
−
14
View file @
be1d5a1c
...
...
@@ -50,22 +50,22 @@ def main(config, data, flagger, outfile, nodata, log_level, fail):
)
if
outfile
:
flags
=
flagger_result
.
getFlags
()
flags_out
=
flags
.
where
((
flags
.
isnull
()
|
flagger_result
.
isFlagged
()),
flagger_result
.
GOOD
)
data_result
=
data_result
.
to_df
()
flags
=
flagger_result
.
getFlags
().
to_df
()
flags_flagged
=
flagger_result
.
isFlagged
().
to_df
()
if
isinstance
(
flagger_result
,
DmpFlagger
):
flags
=
flagger_result
.
_flags
flags
.
loc
[
flags_out
.
index
,
(
slice
(
None
),
FlagFields
.
FLAG
)]
=
flags_out
.
values
flags_out
=
flags
if
not
isinstance
(
flags_out
.
columns
,
pd
.
MultiIndex
):
flags_out
.
columns
=
pd
.
MultiIndex
.
from_product
([
flags
.
columns
,
[
"
flag
"
]])
flags_out
=
flags
.
where
((
flags
.
isnull
()
|
flags_flagged
),
flagger_result
.
GOOD
)
fields
=
{
"
data
"
:
data_result
,
"
flags
"
:
flags_out
}
data_result
.
columns
=
pd
.
MultiIndex
.
from_product
([
data_result
.
columns
,
[
"
data
"
]])
# flags_out.columns = flags_out.columns.map("_".join)
data_out
=
data_result
.
join
(
flags_out
)
data_out
.
sort_index
(
axis
=
"
columns
"
).
to_csv
(
outfile
,
header
=
True
,
index
=
True
,
na_rep
=
nodata
)
if
isinstance
(
flagger_result
,
DmpFlagger
):
fields
[
"
comments
"
]
=
flagger_result
.
comments
.
to_df
()
fields
[
"
causes
"
]
=
flagger_result
.
causes
.
to_df
()
out
=
(
pd
.
concat
(
fields
.
values
(),
axis
=
1
,
keys
=
fields
.
keys
())
.
reorder_levels
(
order
=
[
1
,
0
],
axis
=
1
)
.
sort_index
(
axis
=
1
,
level
=
0
,
sort_remaining
=
False
))
out
.
columns
=
out
.
columns
.
rename
([
""
,
""
])
out
.
to_csv
(
outfile
,
header
=
True
,
index
=
True
,
na_rep
=
nodata
)
if
__name__
==
"
__main__
"
:
...
...
This diff is collapsed.
Click to expand it.
saqc/flagger/dmpflagger.py
+
1
−
5
View file @
be1d5a1c
...
...
@@ -3,15 +3,11 @@
import
subprocess
import
json
from
copy
import
deepcopy
from
collections
import
OrderedDict
from
typing
import
Union
,
Sequence
import
pandas
as
pd
import
dios.dios
as
dios
from
saqc.flagger.categoricalflagger
import
CategoricalFlagger
from
saqc.flagger.baseflagger
import
diosT
from
saqc.lib.tools
import
assertDictOfSeries
,
toSequence
,
assertScalar
from
saqc.lib.tools
import
assertScalar
class
Keywords
:
...
...
This diff is collapsed.
Click to expand it.
David Schäfer
@schaefed
mentioned in issue
#59 (closed)
·
4 years ago
mentioned in issue
#59 (closed)
mentioned in issue #59
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