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
6a34bebb
Commit
6a34bebb
authored
5 years ago
by
lukas leufen
Browse files
Options
Downloads
Patches
Plain Diff
more print statements
parent
19f0d017
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!17
update to v0.4.0
,
!16
handle station type
Pipeline
#26597
passed
5 years ago
Stage: test
Stage: pages
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/data_preparation.py
+3
-0
3 additions, 0 deletions
src/data_preparation.py
test/test_data_generator.py
+2
-1
2 additions, 1 deletion
test/test_data_generator.py
with
5 additions
and
1 deletion
src/data_preparation.py
+
3
−
0
View file @
6a34bebb
...
...
@@ -77,16 +77,19 @@ class DataPrep(object):
file_name
=
self
.
_set_file_name
()
meta_file
=
self
.
_set_meta_file_name
()
try
:
logging
.
debug
(
f
"
try to load local data from:
{
file_name
}
"
)
data
=
self
.
_slice_prep
(
xr
.
open_dataarray
(
file_name
))
self
.
data
=
self
.
check_for_negative_concentrations
(
data
)
self
.
meta
=
pd
.
read_csv
(
meta_file
,
index_col
=
0
)
if
self
.
station_type
is
not
None
:
self
.
check_station_type
()
logging
.
debug
(
"
loading finished
"
)
except
FileNotFoundError
as
e
:
logging
.
warning
(
e
)
data
,
self
.
meta
=
self
.
download_data_from_join
(
file_name
,
meta_file
)
data
=
self
.
_slice_prep
(
data
)
self
.
data
=
self
.
check_for_negative_concentrations
(
data
)
logging
.
debug
(
"
loaded new data from JOIN
"
)
def
check_station_type
(
self
):
"""
...
...
This diff is collapsed.
Click to expand it.
test/test_data_generator.py
+
2
−
1
View file @
6a34bebb
...
...
@@ -54,7 +54,8 @@ class TestDataGenerator:
for
i
,
d
in
enumerate
(
gen
,
start
=
1
):
assert
i
==
gen
.
_iterator
def
test_getitem
(
self
,
gen
):
def
test_getitem
(
self
,
caplog
,
gen
):
caplog
.
set_level
(
logging
.
DEBUG
)
print
(
gen
)
gen
.
kwargs
=
{
'
statistics_per_var
'
:
{
'
o3
'
:
'
dma8eu
'
,
'
temp
'
:
'
maximum
'
}}
print
(
gen
)
...
...
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