TCDSolar / stixpy

STIX data analysis in python
https://stixpy.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
17 stars 20 forks source link

Fix client to work with new file naming #84

Closed samaloney closed 7 months ago

samaloney commented 8 months ago

New files can have an extra character after the version e.g. V01U to indicate the completion status of the file is unknown this PR adds support for this.

A load of the test will fail as we are no longer serving the V01 file and I could update the URL to V02U but once (soon) these are delivered to SOAR the will become V02 so would have to change again

samaloney commented 8 months ago

With this PR

from sunpy.net import Fido, attrs as a
from stixpy.net import client

time_range1 = ['2021-09-08T16:43:10', '2021-09-08T18:00:00']
ql_lc_query1 =  Fido.search(a.Time(*time_range1),
                            a.Instrument.stix,
                            a.stix.DataProduct.ql_lightcurve)
ql_lc_query1

<sunpy.net.fido_factory.UnifiedResponse object at 0x13076fa50>
Results from 1 Provider:

1 Results from the STIXClient:

       Start Time               End Time        Instrument Level DataType  DataProduct  Ver  Request ID
----------------------- ----------------------- ---------- ----- -------- ------------- ---- ----------
2021-09-08 00:00:00.000 2021-09-08 23:59:59.999       STIX    L1       QL ql-lightcurve V02U          -
codecov-commenter commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (8ccda08) 71.81% compared to head (bf9ba88) 70.80%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #84 +/- ## ========================================== - Coverage 71.81% 70.80% -1.02% ========================================== Files 19 19 Lines 1185 1185 ========================================== - Hits 851 839 -12 - Misses 334 346 +12 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

samaloney commented 8 months ago

From what I can see all 10 of the 11 test fails are due to the file not being renamed from V02U to V02.