WSL/SLF GitLab Repository
Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
EnviDat
monitoring-backend
Commits
d178c93a
Commit
d178c93a
authored
Jun 21, 2022
by
Rebecca Kurup Buchholz
Browse files
Update comments
parent
e5b263c3
Changes
2
Hide whitespace changes
Inline
Side-by-side
gcnet/management/commands/importers/helpers/cleaners.py
View file @
d178c93a
...
...
@@ -7,7 +7,7 @@ from gcnet.util.constants import Columns
# Returns dictionary for timestamped record in GC-Net data parent class: Station in gcnet/models.py
# Keys are Station model names, values are from NEAD database_fields key in FIELDS section
# If database_field does not exist then assign to None
# If database_field does not exist
in NEAD input file
then assign
s value
to None
for that key
# Values matching null_value are replaced with None
def
get_gcnet_record_clean
(
row
,
date_format
,
null_value
):
...
...
@@ -23,8 +23,8 @@ def get_gcnet_record_clean(row, date_format, null_value):
Columns
.
WEEK
.
value
:
year_week
(
row
[
'timestamp_iso'
],
date_format
),
}
#
Field
s directly from input file
# If
field
does not exist then assign
parameters[col]
to None
#
Value
s directly from input file
# If
value
does not exist then assign to None
columns
=
Columns
.
get_parameters
()
parameters
=
{}
for
col
in
columns
:
...
...
@@ -185,3 +185,6 @@ def year_week(date_string, date_format):
year
=
get_year
(
date_string
)
week
=
get_week
(
date_string
,
date_format
)
return
f
'
{
year
}
-
{
week
}
'
generic/management/commands/nead_import.py
View file @
d178c93a
...
...
@@ -209,7 +209,7 @@ class Command(BaseCommand):
if
not
line
:
break
#
TEST
used during testing
#
Only
used during testing
, otherwise comment out
# if line_number > 26:
# break
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment