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
8f87c75c
Commit
8f87c75c
authored
1 year ago
by
David Schäfer
Browse files
Options
Downloads
Patches
Plain Diff
remove incompatable and unmaintaine dependency lazy-fixture
parent
53febc74
No related branches found
No related tags found
1 merge request
!820
Bump pytest from 7.4.4 to 8.0.2
Pipeline
#204055
failed with stages
in 1 minute and 10 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
tests/funcs/test_functions.py
+8
-10
8 additions, 10 deletions
tests/funcs/test_functions.py
tests/funcs/test_outlier_detection.py
+9
-18
9 additions, 18 deletions
tests/funcs/test_outlier_detection.py
tests/requirements.txt
+3
-4
3 additions, 4 deletions
tests/requirements.txt
with
20 additions
and
32 deletions
tests/funcs/test_functions.py
+
8
−
10
View file @
8f87c75c
...
...
@@ -243,11 +243,10 @@ def test_flagManual(data, field):
assert
~
unflagged
.
all
()
@pytest.mark.parametrize
(
"
dat
"
,
[
pytest
.
lazy_fixture
(
"
course_1
"
)])
def
test_flagDriftFromNorm
(
dat
):
data
=
dat
(
periods
=
200
,
peak_level
=
5
,
name
=
"
field1
"
)[
0
]
data
[
"
field2
"
]
=
dat
(
periods
=
200
,
peak_level
=
10
,
name
=
"
field2
"
)[
0
][
"
field2
"
]
data
[
"
field3
"
]
=
dat
(
periods
=
200
,
peak_level
=
100
,
name
=
"
field3
"
)[
0
][
"
field3
"
]
def
test_flagDriftFromNorm
(
course_1
):
data
=
course_1
(
periods
=
200
,
peak_level
=
5
,
name
=
"
field1
"
)[
0
]
data
[
"
field2
"
]
=
course_1
(
periods
=
200
,
peak_level
=
10
,
name
=
"
field2
"
)[
0
][
"
field2
"
]
data
[
"
field3
"
]
=
course_1
(
periods
=
200
,
peak_level
=
100
,
name
=
"
field3
"
)[
0
][
"
field3
"
]
fields
=
[
"
field1
"
,
"
field2
"
,
"
field3
"
]
...
...
@@ -261,11 +260,10 @@ def test_flagDriftFromNorm(dat):
assert
all
(
qc
.
_flags
[
"
field3
"
]
>
UNFLAGGED
)
@pytest.mark.parametrize
(
"
dat
"
,
[
pytest
.
lazy_fixture
(
"
course_1
"
)])
def
test_flagDriftFromReference
(
dat
):
data
=
dat
(
periods
=
200
,
peak_level
=
5
,
name
=
"
field1
"
)[
0
]
data
[
"
field2
"
]
=
dat
(
periods
=
200
,
peak_level
=
10
,
name
=
"
field2
"
)[
0
][
"
field2
"
]
data
[
"
field3
"
]
=
dat
(
periods
=
200
,
peak_level
=
100
,
name
=
"
field3
"
)[
0
][
"
field3
"
]
def
test_flagDriftFromReference
(
course_1
):
data
=
course_1
(
periods
=
200
,
peak_level
=
5
,
name
=
"
field1
"
)[
0
]
data
[
"
field2
"
]
=
course_1
(
periods
=
200
,
peak_level
=
10
,
name
=
"
field2
"
)[
0
][
"
field2
"
]
data
[
"
field3
"
]
=
course_1
(
periods
=
200
,
peak_level
=
100
,
name
=
"
field3
"
)[
0
][
"
field3
"
]
fields
=
[
"
field1
"
,
"
field2
"
,
"
field3
"
]
...
...
This diff is collapsed.
Click to expand it.
tests/funcs/test_outlier_detection.py
+
9
−
18
View file @
8f87c75c
...
...
@@ -54,16 +54,10 @@ def test_flagSpikesBasic(spiky_data):
@pytest.mark.slow
@pytest.mark.parametrize
(
"
dat
"
,
[
# see test/functs/fixtures.py for the 'course_N'
pytest
.
lazy_fixture
(
"
course_1
"
),
pytest
.
lazy_fixture
(
"
course_2
"
),
pytest
.
lazy_fixture
(
"
course_3
"
),
pytest
.
lazy_fixture
(
"
course_4
"
),
],
"
dat
"
,
[
"
course_1
"
,
"
course_2
"
,
"
course_3
"
,
"
course_4
"
]
)
def
test_flagSpikesLimitRaise
(
dat
):
def
test_flagSpikesLimitRaise
(
dat
,
request
):
dat
=
request
.
getfixturevalue
(
dat
)
data
,
characteristics
=
dat
()
field
,
*
_
=
data
.
columns
flags
=
initFlagsLike
(
data
)
...
...
@@ -80,8 +74,7 @@ def test_flagSpikesLimitRaise(dat):
# see test/functs/fixtures.py for the 'course_N'
@pytest.mark.parametrize
(
"
dat
"
,
[
pytest
.
lazy_fixture
(
"
course_3
"
)])
def
test_flagMVScores
(
dat
):
def
test_flagMVScores
(
course_3
):
def
_check
(
fields
,
flags
,
characteristics
):
for
field
in
fields
:
isflagged
=
flags
[
field
]
>
UNFLAGGED
...
...
@@ -89,10 +82,10 @@ def test_flagMVScores(dat):
assert
not
isflagged
[
characteristics
[
"
return
"
]].
any
()
assert
not
isflagged
[
characteristics
[
"
drop
"
]].
any
()
data1
,
characteristics
=
dat
(
data1
,
characteristics
=
course_3
(
periods
=
1000
,
initial_level
=
5
,
final_level
=
15
,
out_val
=
50
)
data2
,
characteristics
=
dat
(
data2
,
characteristics
=
course_3
(
periods
=
1000
,
initial_level
=
20
,
final_level
=
1
,
out_val
=
30
)
fields
=
[
"
field1
"
,
"
field2
"
]
...
...
@@ -111,9 +104,8 @@ def test_flagMVScores(dat):
_check
(
fields
,
qc
.
flags
,
characteristics
)
@pytest.mark.parametrize
(
"
dat
"
,
[
pytest
.
lazy_fixture
(
"
course_3
"
)])
def
test_grubbs
(
dat
):
data
,
char_dict
=
dat
(
def
test_grubbs
(
course_3
):
data
,
char_dict
=
course_3
(
freq
=
"
10min
"
,
periods
=
45
,
initial_level
=
0
,
...
...
@@ -127,12 +119,11 @@ def test_grubbs(dat):
assert
np
.
all
(
qc
.
flags
[
"
data
"
][
char_dict
[
"
drop
"
]]
>
UNFLAGGED
)
@pytest.mark.parametrize
(
"
dat
"
,
[
pytest
.
lazy_fixture
(
"
course_2
"
)])
@pytest.mark.parametrize
(
"
parameters
"
,
[(
"
standard
"
,
1
),
(
"
modified
"
,
1
),
(
"
modified
"
,
3
),
(
"
standard
"
,
"
3h
"
)],
)
def
test_flagCrossStatistics
(
dat
,
parameters
):
def
test_flagCrossStatistics
(
parameters
):
fields
=
[
f
"
data
{
i
}
"
for
i
in
range
(
6
)]
data
=
pd
.
DataFrame
(
0
,
columns
=
fields
,
index
=
pd
.
date_range
(
"
2000
"
,
freq
=
"
1h
"
,
periods
=
10
)
...
...
This diff is collapsed.
Click to expand it.
tests/requirements.txt
+
3
−
4
View file @
8f87c75c
...
...
@@ -2,9 +2,8 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later
beautifulsoup4==4.12.
2
hypothesis==6.9
2.2
Markdown==3.5.
1
beautifulsoup4==4.12.
3
hypothesis==6.9
8.15
Markdown==3.5.
2
pytest==8.0.2
pytest-lazy-fixture==0.6.3
requests==2.31.0
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