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
ab00eab8
Commit
ab00eab8
authored
Jan 24, 2020
by
JOSSOUD Olivier
Browse files
QuickViz. Use LogConfig as parent class.
parent
3292a4c6
Pipeline
#57243
passed with stages
in 1 minute and 32 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
16 deletions
+11
-16
wimcollect/ftp.py
wimcollect/ftp.py
+2
-2
wimcollect/ftpopar.py
wimcollect/ftpopar.py
+2
-2
wimcollect/httpddu.py
wimcollect/httpddu.py
+2
-2
wimcollect/quickviz.py
wimcollect/quickviz.py
+2
-7
wimcollect/sshdmc.py
wimcollect/sshdmc.py
+2
-2
wimcollect/utils.py
wimcollect/utils.py
+1
-1
No files found.
wimcollect/ftp.py
View file @
ab00eab8
...
...
@@ -7,10 +7,10 @@ import wimcollect.logger as logger
import
wimcollect.utils
as
utils
class
FtpCollector
(
utils
.
Collector
):
class
FtpCollector
(
utils
.
LogConfig
):
def
__init__
(
self
,
object_id
:
str
,
config_parser
:
configobj
.
ConfigObj
=
None
,
log
:
logger
=
None
):
utils
.
Collector
.
__init__
(
self
,
object_id
,
config_parser
,
log
)
utils
.
LogConfig
.
__init__
(
self
,
object_id
,
config_parser
,
log
)
self
.
base_dir
=
self
.
config
[
self
.
object_id
][
"root_dir"
]
def
_ftp_connect_
(
self
)
->
ftplib
.
FTP
:
...
...
wimcollect/ftpopar.py
View file @
ab00eab8
...
...
@@ -21,8 +21,8 @@ class Collector(ftp.FtpCollector):
Parameters
----------
site_id: str
Site's trigram
day: datetime.date
Date of the data which should be downloaded.
"""
self
.
logger
.
write
(
self
.
object_id
,
"Download Maido's FTIR meteo data."
)
...
...
wimcollect/httpddu.py
View file @
ab00eab8
...
...
@@ -7,10 +7,10 @@ import wimcollect.utils as utils
import
wimcollect.logger
as
logger
class
Collector
(
utils
.
Collector
):
class
Collector
(
utils
.
LogConfig
):
def
__init__
(
self
,
config_parser
:
configobj
.
ConfigObj
=
None
,
log
:
logger
=
None
):
utils
.
Collector
.
__init__
(
self
,
"HTTPDDU"
,
config_parser
,
log
)
utils
.
LogConfig
.
__init__
(
self
,
"HTTPDDU"
,
config_parser
,
log
)
self
.
base_url
=
self
.
config
[
self
.
object_id
][
"base_url"
]
def
download_picarro
(
self
,
day
:
datetime
.
date
):
...
...
wimcollect/quickviz.py
View file @
ab00eab8
...
...
@@ -9,15 +9,10 @@ import wimcollect.logger as logger
import
wimcollect.utils
as
utils
class
Visualizator
:
class
Visualizator
(
utils
.
LogConfig
)
:
def
__init__
(
self
,
config_parser
:
configobj
.
ConfigObj
,
log
:
logger
):
# Logger
self
.
logger
=
log
self
.
object_id
=
"VIZU"
# Config
self
.
config
=
config_parser
utils
.
LogConfig
.
__init__
(
self
,
"VIZU"
,
config_parser
,
log
)
self
.
base_dir
=
self
.
config
[
self
.
object_id
][
"root_dir"
]
def
create_data_source_file
(
self
,
site_id
:
str
,
picarro_id
:
str
,
day
:
datetime
.
date
):
...
...
wimcollect/sshdmc.py
View file @
ab00eab8
...
...
@@ -8,10 +8,10 @@ import wimcollect.utils as utils
import
wimcollect.logger
as
logger
class
Collector
(
utils
.
Collector
):
class
Collector
(
utils
.
LogConfig
):
def
__init__
(
self
,
config_parser
:
configobj
.
ConfigObj
=
None
,
log
:
logger
=
None
):
utils
.
Collector
.
__init__
(
self
,
"SSHDMC"
,
config_parser
,
log
)
utils
.
LogConfig
.
__init__
(
self
,
"SSHDMC"
,
config_parser
,
log
)
self
.
base_dir
=
self
.
config
[
self
.
object_id
][
"root_dir"
]
def
download_picarro
(
self
,
day
:
datetime
.
date
):
...
...
wimcollect/utils.py
View file @
ab00eab8
...
...
@@ -8,7 +8,7 @@ import tempfile
import
wimcollect.logger
as
logger
class
Collector
:
class
LogConfig
:
def
__init__
(
self
,
object_id
:
str
,
config_parser
:
configobj
.
ConfigObj
=
None
,
log
:
logger
=
None
):
# Config
if
config_parser
is
None
:
...
...
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