pytroll / pyorbital

Orbital and astronomy computations in python
http://pyorbital.readthedocs.org/
GNU General Public License v3.0
224 stars 77 forks source link

Add parser to read TLEs from Multi Mission Administrative Messages #78

Closed pnuu closed 2 years ago

pnuu commented 3 years ago

This PR adds a parser that can read TLE data from MMAM XML files.

codecov[bot] commented 3 years ago

Codecov Report

Merging #78 (89d6935) into main (6b7e685) will increase coverage by 1.01%. The diff coverage is 93.82%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #78      +/-   ##
==========================================
+ Coverage   85.31%   86.32%   +1.01%     
==========================================
  Files          13       13              
  Lines        1893     1967      +74     
==========================================
+ Hits         1615     1698      +83     
+ Misses        278      269       -9     
Flag Coverage Δ
unittests 86.32% <93.82%> (+1.01%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pyorbital/tlefile.py 91.03% <89.90%> (+3.61%) :arrow_up:
pyorbital/tests/test_tlefile.py 97.83% <100.00%> (+0.39%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 6b7e685...89d6935. Read the comment docs.

ghost commented 3 years ago

DeepCode's analysis on #89d693 found:

Description Example fixes
The call to next should be guarded with a try/except block Occurrences: :wrench: Example fixes

👉 View analysis in DeepCode’s Dashboard | Configure the bot

pnuu commented 3 years ago

I'll be ignoring the Deepcode warning about using next() without an optional default value.

pnuu commented 3 years ago

I think the tests are missing the case of passing the MMAM to the TLE class instance directly, right?

Like this one? :grin: https://github.com/pytroll/pyorbital/blob/89d693516431011fbc5e6b927b145f5b0629610c/pyorbital/tests/test_tlefile.py#L120-L130

mraspaud commented 3 years ago

Ah, sorry, missed it!