Skip to content

Commit

Permalink
Merge pull request #1027 from MetPX/eumetsat_poll_update
Browse files Browse the repository at this point in the history
EUMETSAT poll plugin update
  • Loading branch information
petersilva authored Apr 25, 2024
2 parents 6839407 + b55067f commit eddcf2f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion sarracenia/flowcb/poll/eumetsat.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
- 2023-12: updated sr3 plugin, split into separate poll and auth plugins, made a lot more universal (old code
would only post NetCDF files, this allows any type, configurable time range, multiple collection IDs
in one config, includes mtime, md5sum, GeoJSON, contentType in messages when available)
- 2024-04: un-URL-encode the posted relPath
"""
import requests
import datetime
Expand Down Expand Up @@ -184,7 +185,13 @@ def msg_from_link_info_json(self, link_info) -> sarracenia.Message:
# The download links in .../entry?name=FILENAME which would download files named entry?name=FILENAME
# Override this by changing relPath (used to name the file) and setting retrievePath (used to download)
m['retrievePath'] = m['relPath']
m['relPath'] = m['relPath'].replace('entry?name=', '')
temp_relPath = requests.utils.unquote(m['relPath'].replace('entry?name=', '')).split('/')
relPath = []
# remove duplicates from the path
for i in range(len(temp_relPath)):
if i == 0 or temp_relPath[i] != temp_relPath[i-1]:
relPath.append(temp_relPath[i])
m['relPath'] = '/'.join(relPath)
except Exception as e:
logger.error(f"Failed to create message from {link_info}")
logger.debug("Exception details", exc_info=True)
Expand Down

1 comment on commit eddcf2f

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage

Coverage Report •
FileStmtsMissCoverMissing
flowcb/poll
   eumetsat.py1181180%3, 76–79, 81, 83–85, 89–90, 92–94, 97–98, 100–101, 103–104, 107–109, 111, 114, 117, 121, 124–125, 127–130, 132–134, 140, 146–153, 155–157, 159–161, 166–174, 176, 178–184, 187–189, 191–198, 200, 204–206, 208–211, 214–218, 220, 222, 224, 226, 228, 230, 233–240, 242–244, 247–254, 259
TOTAL153331249818% 

Test Results

Tests Skipped Failures Errors Time
209 8 💤 0 ❌ 0 🔥 15.353s ⏱️

Please sign in to comment.