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
1e2bae02
Commit
1e2bae02
authored
Feb 18, 2020
by
JOSSOUD Olivier
Browse files
FTP CEA. Add special case for AMS site.
parent
6c3f6454
Pipeline
#59972
passed with stages
in 3 minutes and 38 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
wimcollect/ftpcea.py
wimcollect/ftpcea.py
+6
-1
wimcollect/tests/test_ftpcea.py
wimcollect/tests/test_ftpcea.py
+1
-0
No files found.
wimcollect/ftpcea.py
View file @
1e2bae02
...
...
@@ -35,7 +35,12 @@ class PicarroCollector(utils.LogConfig):
ftp_session
=
ftp
.
connect
(
self
.
config
[
self
.
object_id
],
self
.
logger
)
# Build source file path
source_filepath
=
self
.
get_source_filepath
(
self
.
distant_base_dir
,
site_id
,
picarro_id
,
date_str
)
if
site_id
==
"AMS"
:
# The file transfer from AMS' Picarro to FTP-CEA server is managed by AMS' IT team ; the FTP-CEA distant
# folder is not the same...
source_filepath
=
"/pub/ramces/AMS/PicarroIso/"
+
site_id
+
"_"
+
picarro_id
+
"_"
+
date_str
+
".lzma"
else
:
source_filepath
=
self
.
get_source_filepath
(
self
.
distant_base_dir
,
site_id
,
picarro_id
,
date_str
)
# Build destination file path
dest_filepath
=
utils
.
get_standard_filepath
(
self
.
local_base_dir
,
site_id
,
"picarro"
,
picarro_id
,
date_str
,
"lzma"
)
...
...
wimcollect/tests/test_ftpcea.py
View file @
1e2bae02
...
...
@@ -8,3 +8,4 @@ class TestPicarroCollector(TestCase):
def
test_download
(
self
):
collector
=
ftpcea
.
PicarroCollector
()
self
.
assertTrue
(
collector
.
download
(
"SRT"
,
"HIDS2108"
,
datetime
.
date
(
2020
,
1
,
20
)))
self
.
assertTrue
(
collector
.
download
(
"AMS"
,
"HIDS2194"
,
datetime
.
date
(
2020
,
2
,
10
)))
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