Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MLAir
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
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
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
esde
machine-learning
MLAir
Commits
6d7f0b01
Commit
6d7f0b01
authored
3 years ago
by
leufen1
Browse files
Options
Downloads
Patches
Plain Diff
also move kz data handler tests to comments
parent
5d7bcd34
No related branches found
No related tags found
3 merge requests
!413
update release branch
,
!412
Resolve "release v2.0.0"
,
!358
Resolve "filter with future mix"
Pipeline
#84816
failed
3 years ago
Stage: test
Stage: docs
Stage: pages
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/test_data_handler/test_data_handler_mixed_sampling.py
+81
-79
81 additions, 79 deletions
test/test_data_handler/test_data_handler_mixed_sampling.py
with
81 additions
and
79 deletions
test/test_data_handler/test_data_handler_mixed_sampling.py
+
81
−
79
View file @
6d7f0b01
...
@@ -2,14 +2,16 @@ __author__ = 'Lukas Leufen'
...
@@ -2,14 +2,16 @@ __author__ = 'Lukas Leufen'
__date__
=
'
2020-12-10
'
__date__
=
'
2020-12-10
'
from
mlair.data_handler.data_handler_mixed_sampling
import
DataHandlerMixedSampling
,
\
from
mlair.data_handler.data_handler_mixed_sampling
import
DataHandlerMixedSampling
,
\
DataHandlerMixedSamplingSingleStation
,
DataHandlerMixedSamplingWithKzFilter
,
\
DataHandlerMixedSamplingSingleStation
,
DataHandlerMixedSamplingWithFilterSingleStation
,
\
DataHandlerMixedSamplingWithKzFilterSingleStation
,
DataHandlerSeparationOfScales
,
\
DataHandlerSeparationOfScalesSingleStation
,
DataHandlerMixedSamplingWithFilterSingleStation
,
\
DataHandlerMixedSamplingWithFirFilterSingleStation
,
DataHandlerMixedSamplingWithFirFilter
,
\
DataHandlerMixedSamplingWithFirFilterSingleStation
,
DataHandlerMixedSamplingWithFirFilter
,
\
DataHandlerFirFilterSingleStation
,
DataHandlerMixedSamplingWithClimateFirFilterSingleStation
,
\
DataHandlerFirFilterSingleStation
,
DataHandlerMixedSamplingWithClimateFirFilterSingleStation
,
\
DataHandlerMixedSamplingWithClimateFirFilter
DataHandlerMixedSamplingWithClimateFirFilter
from
mlair.data_handler.data_handler_with_filter
import
DataHandlerKzFilter
,
DataHandlerFilter
,
\
# from mlair.data_handler.data_handler_mixed_sampling import DataHandlerMixedSamplingWithKzFilter, \
DataHandlerKzFilterSingleStation
,
DataHandlerFilterSingleStation
,
DataHandlerClimateFirFilterSingleStation
# DataHandlerMixedSamplingWithKzFilterSingleStation, DataHandlerSeparationOfScales, \
# DataHandlerSeparationOfScalesSingleStation
from
mlair.data_handler.data_handler_with_filter
import
DataHandlerFilter
,
DataHandlerFilterSingleStation
,
\
DataHandlerClimateFirFilterSingleStation
# from mlair.data_handler.data_handler_with_filter import DataHandlerKzFilter, DataHandlerKzFilterSingleStation
from
mlair.data_handler.data_handler_single_station
import
DataHandlerSingleStation
from
mlair.data_handler.data_handler_single_station
import
DataHandlerSingleStation
from
mlair.data_handler.default_data_handler
import
DefaultDataHandler
from
mlair.data_handler.default_data_handler
import
DefaultDataHandler
from
mlair.helpers
import
remove_items
from
mlair.helpers
import
remove_items
...
@@ -99,53 +101,53 @@ class TestDataHandlerMixedSamplingSingleStation:
...
@@ -99,53 +101,53 @@ class TestDataHandlerMixedSamplingSingleStation:
def
test_setup_data_path
(
self
):
def
test_setup_data_path
(
self
):
pass
pass
#
class
TestDataHandlerMixedSamplingWithKzFilter
:
#
class TestDataHandlerMixedSamplingWithKzFilter:
#
def
test_data_handler
(
self
):
#
def test_data_handler(self):
obj
=
object
.
__new__
(
DataHandlerMixedSamplingWithKzFilter
)
#
obj = object.__new__(DataHandlerMixedSamplingWithKzFilter)
assert
obj
.
data_handler
.
__qualname__
==
DataHandlerMixedSamplingWithKzFilterSingleStation
.
__qualname__
#
assert obj.data_handler.__qualname__ == DataHandlerMixedSamplingWithKzFilterSingleStation.__qualname__
#
def
test_data_handler_transformation
(
self
):
#
def test_data_handler_transformation(self):
obj
=
object
.
__new__
(
DataHandlerMixedSamplingWithKzFilter
)
#
obj = object.__new__(DataHandlerMixedSamplingWithKzFilter)
assert
obj
.
data_handler_transformation
.
__qualname__
==
DataHandlerMixedSamplingWithKzFilterSingleStation
.
__qualname__
#
assert obj.data_handler_transformation.__qualname__ == DataHandlerMixedSamplingWithKzFilterSingleStation.__qualname__
#
def
test_requirements
(
self
):
#
def test_requirements(self):
#
reqs
=
get_all_args
(
DataHandlerFilter
)
#
reqs = get_all_args(DataHandlerFilter)
obj
=
object
.
__new__
(
DataHandlerMixedSamplingWithKzFilter
)
#
obj = object.__new__(DataHandlerMixedSamplingWithKzFilter)
assert
sorted
(
obj
.
own_args
())
==
reqs
#
assert sorted(obj.own_args()) == reqs
reqs
=
get_all_args
(
DataHandlerFilter
,
DefaultDataHandler
,
DataHandlerKzFilterSingleStation
,
#
reqs = get_all_args(DataHandlerFilter, DefaultDataHandler, DataHandlerKzFilterSingleStation,
DataHandlerFilterSingleStation
,
DataHandlerSingleStation
,
remove
=
[
"
self
"
,
"
id_class
"
])
#
DataHandlerFilterSingleStation, DataHandlerSingleStation, remove=["self", "id_class"])
assert
sorted
(
obj
.
_requirements
)
==
reqs
#
assert sorted(obj._requirements) == reqs
assert
sorted
(
obj
.
requirements
())
==
reqs
#
assert sorted(obj.requirements()) == reqs
#
#
class
TestDataHandlerMixedSamplingWithKzFilterSingleStation
:
#
class TestDataHandlerMixedSamplingWithKzFilterSingleStation:
#
def
test_requirements
(
self
):
#
def test_requirements(self):
#
reqs
=
get_all_args
(
DataHandlerMixedSamplingWithKzFilterSingleStation
)
#
reqs = get_all_args(DataHandlerMixedSamplingWithKzFilterSingleStation)
obj
=
object
.
__new__
(
DataHandlerMixedSamplingWithKzFilterSingleStation
)
#
obj = object.__new__(DataHandlerMixedSamplingWithKzFilterSingleStation)
assert
reqs
==
[
"
self
"
]
#
assert reqs == ["self"]
assert
sorted
(
obj
.
own_args
())
==
reqs
#
assert sorted(obj.own_args()) == reqs
reqs
=
get_all_args
(
DataHandlerKzFilterSingleStation
,
DataHandlerFilterSingleStation
,
DataHandlerSingleStation
,
#
reqs = get_all_args(DataHandlerKzFilterSingleStation, DataHandlerFilterSingleStation, DataHandlerSingleStation,
remove
=
"
self
"
)
#
remove="self")
assert
sorted
(
obj
.
_requirements
)
==
reqs
#
assert sorted(obj._requirements) == reqs
assert
sorted
(
obj
.
requirements
())
==
reqs
#
assert sorted(obj.requirements()) == reqs
#
#
class
TestDataHandlerMixedSamplingWithFilterSingleStation
:
#
class TestDataHandlerMixedSamplingWithFilterSingleStation:
#
def
test_requirements
(
self
):
#
def test_requirements(self):
#
reqs
=
get_all_args
(
DataHandlerMixedSamplingWithKzFilterSingleStation
)
#
reqs = get_all_args(DataHandlerMixedSamplingWithKzFilterSingleStation)
obj
=
object
.
__new__
(
DataHandlerMixedSamplingWithFilterSingleStation
)
#
obj = object.__new__(DataHandlerMixedSamplingWithFilterSingleStation)
assert
reqs
==
[
"
self
"
]
#
assert reqs == ["self"]
assert
sorted
(
obj
.
own_args
())
==
reqs
#
assert sorted(obj.own_args()) == reqs
reqs
=
get_all_args
(
DataHandlerFilterSingleStation
,
DataHandlerSingleStation
,
remove
=
"
self
"
)
#
reqs = get_all_args(DataHandlerFilterSingleStation, DataHandlerSingleStation, remove="self")
assert
sorted
(
obj
.
_requirements
)
==
reqs
#
assert sorted(obj._requirements) == reqs
assert
sorted
(
obj
.
requirements
())
==
reqs
#
assert sorted(obj.requirements()) == reqs
class
TestDataHandlerMixedSamplingWithFirFilter
:
class
TestDataHandlerMixedSamplingWithFirFilter
:
...
@@ -202,31 +204,31 @@ class TestDataHandlerMixedSamplingWithClimateFirFilterSingleStation:
...
@@ -202,31 +204,31 @@ class TestDataHandlerMixedSamplingWithClimateFirFilterSingleStation:
assert
sorted
(
obj
.
requirements
())
==
reqs
assert
sorted
(
obj
.
requirements
())
==
reqs
class
TestDataHandlerSeparationOfScales
:
#
class TestDataHandlerSeparationOfScales:
#
def
test_data_handler
(
self
):
#
def test_data_handler(self):
obj
=
object
.
__new__
(
DataHandlerSeparationOfScales
)
#
obj = object.__new__(DataHandlerSeparationOfScales)
assert
obj
.
data_handler
.
__qualname__
==
DataHandlerSeparationOfScalesSingleStation
.
__qualname__
#
assert obj.data_handler.__qualname__ == DataHandlerSeparationOfScalesSingleStation.__qualname__
#
def
test_data_handler_transformation
(
self
):
#
def test_data_handler_transformation(self):
obj
=
object
.
__new__
(
DataHandlerSeparationOfScales
)
#
obj = object.__new__(DataHandlerSeparationOfScales)
assert
obj
.
data_handler_transformation
.
__qualname__
==
DataHandlerSeparationOfScalesSingleStation
.
__qualname__
#
assert obj.data_handler_transformation.__qualname__ == DataHandlerSeparationOfScalesSingleStation.__qualname__
#
def
test_requirements
(
self
):
#
def test_requirements(self):
reqs
=
get_all_args
(
DefaultDataHandler
)
#
reqs = get_all_args(DefaultDataHandler)
obj
=
object
.
__new__
(
DataHandlerSeparationOfScales
)
#
obj = object.__new__(DataHandlerSeparationOfScales)
assert
sorted
(
obj
.
own_args
())
==
reqs
#
assert sorted(obj.own_args()) == reqs
#
reqs
=
get_all_args
(
DataHandlerSeparationOfScalesSingleStation
,
DataHandlerKzFilterSingleStation
,
#
reqs = get_all_args(DataHandlerSeparationOfScalesSingleStation, DataHandlerKzFilterSingleStation,
DataHandlerMixedSamplingWithKzFilterSingleStation
,
DataHandlerFilterSingleStation
,
#
DataHandlerMixedSamplingWithKzFilterSingleStation,DataHandlerFilterSingleStation,
DataHandlerSingleStation
,
remove
=
[
"
self
"
,
"
id_class
"
])
#
DataHandlerSingleStation, remove=["self", "id_class"])
assert
sorted
(
obj
.
_requirements
)
==
reqs
#
assert sorted(obj._requirements) == reqs
reqs
=
get_all_args
(
DataHandlerSeparationOfScalesSingleStation
,
DataHandlerKzFilterSingleStation
,
#
reqs = get_all_args(DataHandlerSeparationOfScalesSingleStation, DataHandlerKzFilterSingleStation,
DataHandlerMixedSamplingWithKzFilterSingleStation
,
DataHandlerFilterSingleStation
,
#
DataHandlerMixedSamplingWithKzFilterSingleStation,DataHandlerFilterSingleStation,
DataHandlerSingleStation
,
DefaultDataHandler
,
remove
=
[
"
self
"
,
"
id_class
"
])
#
DataHandlerSingleStation, DefaultDataHandler, remove=["self", "id_class"])
assert
sorted
(
obj
.
requirements
())
==
reqs
#
assert sorted(obj.requirements()) == reqs
#
class
TestDataHandlerSeparationOfScalesSingleStation
:
#
class TestDataHandlerSeparationOfScalesSingleStation:
pass
#
pass
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