pytroll / pytroll-collectors

Collector modules for Pytroll
GNU General Public License v3.0
3 stars 18 forks source link

Use tolerance also when using start_time in message_keys #124

Closed ninahakansson closed 1 year ago

ninahakansson commented 1 year ago

When using start_time in the message_keys the time tolerance is ignored. Matching files within time tolerance are ignored in the is_relevant function and not included in any slot.

codecov[bot] commented 1 year ago

Codecov Report

Merging #124 (c27c6be) into main (9035f17) will increase coverage by 0.06%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #124      +/-   ##
==========================================
+ Coverage   90.46%   90.52%   +0.06%     
==========================================
  Files          25       25              
  Lines        3848     3874      +26     
==========================================
+ Hits         3481     3507      +26     
  Misses        367      367              
Impacted Files Coverage Δ
pytroll_collectors/segments.py 92.40% <100.00%> (+0.18%) :arrow_up:
pytroll_collectors/tests/test_segments.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

adybbroe commented 1 year ago

@ninahakansson Are we ready to finish this one?

ninahakansson commented 1 year ago

My last commit was an update to a test that makes the test fail. On purpose. The code should be fixed so that the test does not fail.

pnuu commented 1 year ago

I fixed the merge conflict.

pnuu commented 1 year ago

Hmm, there are now 48 failing tests. Must be something that came from main. I'll have a look.

pnuu commented 1 year ago

For some reason the change done to Message.__init__() when flooring the time wasn't taken from main. Now the tests pass.

@adybbroe @mraspaud do you have still something that is needed in the unresolved comments?

ninahakansson commented 1 year ago

I think this was maybe not a good idea from the beginning. Already from start I think only files within time-tolerance are found. And if we do not want times to be checked for exact matches in start_time we could just avoid using the start_time as message_key.