Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
JOSSOUD Olivier
WIM Collect
Commits
951a1524
Commit
951a1524
authored
Jan 29, 2020
by
JOSSOUD Olivier
Browse files
HTTPDDU. Rename class and function name to match default pattern.
parent
fdc94e09
Pipeline
#57843
passed with stages
in 2 minutes and 45 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
wimcollect/httpddu.py
wimcollect/httpddu.py
+2
-2
wimcollect/main.py
wimcollect/main.py
+6
-6
wimcollect/tests/test_httpddu.py
wimcollect/tests/test_httpddu.py
+2
-2
No files found.
wimcollect/httpddu.py
View file @
951a1524
...
...
@@ -7,13 +7,13 @@ import wimcollect.common.utils as utils
import
wimcollect.common.logger
as
logger
class
Collector
(
utils
.
LogConfig
):
class
Picarro
Collector
(
utils
.
LogConfig
):
def
__init__
(
self
,
config_parser
:
configobj
.
ConfigObj
=
None
,
log
:
logger
=
None
):
utils
.
LogConfig
.
__init__
(
self
,
"HTTPDDU"
,
config_parser
,
log
)
self
.
base_url
=
self
.
config
[
self
.
object_id
][
"base_url"
]
def
download
_picarro
(
self
,
picarro_id
:
str
,
day
:
datetime
.
date
)
->
bool
:
def
download
(
self
,
picarro_id
:
str
,
day
:
datetime
.
date
)
->
bool
:
"""Download Picarro data file from IPEV's HTTP server.
Parameters
...
...
wimcollect/main.py
View file @
951a1524
...
...
@@ -34,11 +34,11 @@ def main():
ftpaeris_col
=
ftpaeris
.
MaidoMf1hCollector
()
ftpaeris_col
.
download
(
"201913"
)
httpddu_col
=
httpddu
.
Collector
()
httpddu_col
.
download
_picarro
(
yesterday
)
httpddu_col
=
httpddu
.
Picarro
Collector
()
httpddu_col
.
download
(
yesterday
)
sftpdmc_col
=
sftpdmc
.
Collector
()
sftpdmc_col
.
download
_picarro
(
yesterday
)
sftpdmc_col
.
download
(
yesterday
)
vizual
=
quickviz
.
Visualizator
()
vizual
.
create_data_source_file
(
"DDU"
,
"HIDS2189"
,
yesterday
)
...
...
@@ -111,15 +111,15 @@ def quickviz_antarctica():
help
=
"Day (in ISO format YYYY-MM-DD) which should be processed."
)
args
=
parser
.
parse_args
()
httpddu_col
=
httpddu
.
Collector
(
config_parser
,
log
)
httpddu_col
=
httpddu
.
Picarro
Collector
(
config_parser
,
log
)
try
:
httpddu_col
.
download
_picarro
(
args
.
day
)
httpddu_col
.
download
(
args
.
day
)
except
:
pass
sftpdmc_col
=
sftpdmc
.
Collector
(
config_parser
,
log
)
try
:
sftpdmc_col
.
download
_picarro
(
args
.
day
)
sftpdmc_col
.
download
(
args
.
day
)
except
:
pass
...
...
wimcollect/tests/test_httpddu.py
View file @
951a1524
...
...
@@ -7,5 +7,5 @@ import wimcollect.httpddu as httpddu
class
TestCollector
(
TestCase
):
def
test_download_picarro
(
self
):
collector
=
httpddu
.
Collector
()
self
.
assertTrue
(
collector
.
download
_picarro
(
"HIDS2189"
,
datetime
.
date
(
2020
,
1
,
20
)))
collector
=
httpddu
.
Picarro
Collector
()
self
.
assertTrue
(
collector
.
download
(
"HIDS2189"
,
datetime
.
date
(
2020
,
1
,
20
)))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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