-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor and improve tests concerning the TLE file handling #118
base: main
Are you sure you want to change the base?
Conversation
…txt file Signed-off-by: Adam.Dybbroe <[email protected]>
…e automated bots for checking code quality and tests Signed-off-by: Adam.Dybbroe <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #118 +/- ##
==========================================
+ Coverage 87.51% 88.36% +0.85%
==========================================
Files 15 16 +1
Lines 2211 2373 +162
==========================================
+ Hits 1935 2097 +162
Misses 276 276
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
While working with this PR and upgrading our systems for NOAA-21 at SMHI we realized that there seem to be a bug here, standing in the way of updating support for NOAA-21, see #119 |
Signed-off-by: Adam.Dybbroe <[email protected]>
# Conflicts: # pyorbital/tests/test_tlefile.py # pyorbital/tlefile.py
I have come to the conclusion that there is really no serious issue easily solved as otherwise suggested in #119
The use must use either WMO-Oscar satellite name The only thing this PR does now is to add a debug message indicating that there might be a match in the TLE file for the the satellite the user is wanting the TLEs for. So, like:
And:
It means that in case the user gives a name like "NOAA" or "Metop" or even "N" or something far from a real satellite name, there might be several debug messages with more or less useful suggestions. But I think that can be accepted. Okay? |
Signed-off-by: Adam.Dybbroe <[email protected]>
Signed-off-by: Adam.Dybbroe <[email protected]>
Signed-off-by: Adam.Dybbroe <[email protected]>
Signed-off-by: Adam.Dybbroe <[email protected]>
elif l_0.startswith(platform) and platform not in SATELLITES: | ||
LOGGER.debug("Found a possible match: %s?", str(l_0.strip())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering should there be something other than just the log message here? The tests pass, but 🤷♂️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering should there be something other than just the log message here? The tests pass, but 🤷♂️
Did you read my discussion above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, just wanted to solve the pre-commit complaint and afterwards got confused about the former title and description of the issue 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the message say that the possible match isn't used? Something like
elif l_0.startswith(platform) and platform not in SATELLITES: | |
LOGGER.debug("Found a possible match: %s?", str(l_0.strip())) | |
elif l_0.startswith(platform) and platform not in SATELLITES: | |
LOGGER.debug("Found a partial match: %s. TLE not used.", str(l_0.strip())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Umm, this PR currently actually does only do refactoring and not add the mentioned NOAA-21 to the platforms.txt. So git commit
missing @adybbroe ?
Yeah right, after a long discussion (mainly with myself) it ended up differently from what I anticipated when I started. Should we rename it then? I am okay with that! |
Much better! Now the title and description match what's being changed 👍 |
This PR was originally started to introduce support for NOAA-21.
The PR started out attempting to address an issue found when the user requests TLEs for a name not matching what is in the
platforms.txt
file and only partially matching what name is written in the TLE files. In particular this was a bit confusing when NOAA-21 was newly introduced and the name wasNOAA 21 (JPSS-2)
in the TLE files from Space_Track/Celetrak, while for NOAA-20 the name wasNOAA 20
in the same files.Support for NOAA-21 was actually already included in #113 but that PR is about environment variables.