Skip to content

Conversation

@aburrell
Copy link
Member

@aburrell aburrell commented Aug 5, 2024

Description

Addresses #239 by adding file handing for the change in file format across a specific date.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

import datetime as dt
import pysat
import pysatNASA

ssusi = pysat.Instrument(inst_module=pysatNASA.instruments.dmsp_ssusi, tag='sdr-disk', inst_id='f18')

stime = dt.datetime(2023, 3, 20)
etime = dt.datetime(2023, 3, 25)

ssusi.download(start=stime, stop=etime)
ssusi.files.files

Yields:

2023-03-20 00:53:14    dmspf18_ssusi_sdr-disk_2023079T005314-2023079T...
2023-03-20 12:06:22    dmspf18_ssusi_sdr-disk_2023079T120622-2023079T...
2023-03-20 12:46:42    dmspf18_ssusi_sdr-disk_2023079T124642-2023079T...
2023-03-20 14:28:38    dmspf18_ssusi_sdr-disk_2023079T142838-2023079T...
2023-03-20 16:10:34    dmspf18_ssusi_sdr-disk_2023079T161034-2023079T...
                                             ...                        
2023-03-25 16:46:45    dmspf18_ssusi_sdr-disk_2023084T164645-2023084T...
2023-03-25 18:35:39    dmspf18_ssusi_sdr-disk_2023084T183539-2023084T...
2023-03-25 20:10:37    dmspf18_ssusi_sdr-disk_2023084T201037-2023084T...
2023-03-25 21:52:33    dmspf18_ssusi_sdr-disk_2023084T215233-2023084T...
2023-03-25 23:34:29    dmspf18_ssusi_sdr-disk_2023084T233429-2023085T...
Length: 73, dtype: object

Checked SPDF and the other SSUSI instruments also have the change in format at this time.

Test Configuration:

  • Operating system: OS X Big Sur
  • Version number: Python 3.10
  • Any details about your local setup that are relevant: develop branch of pysat

Checklist:

  • x] Make sure you are merging into the develop (not main) branch
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • Add a note to CHANGELOG.md, summarizing the changes
  • Update zenodo.json file for new code contributors

If this is a release PR, replace the first item of the above checklist with the release
checklist on the wiki: https://github.com/pysat/pysat/wiki/Checklist-for-Release

aburrell and others added 7 commits August 5, 2024 15:05
Updated the format in a GOLD docstring.
Added a function to provide the correct filename format for DMSP SSUSI data based on the date.
Added custom `download`, `list_files`, and `list_remote_files` methods that account for the changes in the file format.
Update the changelog to include a line describing the addition to the DMSP instrument methods.
Update the instrument tests.  If `supported_tags` is not present, do not require it.  It is only required if the Instrument has 'cdf' files.
Fix PEP8 compliance for blank lines after functions.
@aburrell aburrell requested a review from jklenzing August 5, 2024 19:38
@aburrell aburrell added this to the 0.0.6 Release milestone Aug 5, 2024
@aburrell aburrell added the bug Something isn't working label Aug 5, 2024
@aburrell aburrell linked an issue Aug 5, 2024 that may be closed by this pull request
@jklenzing
Copy link
Member

Broken doc tests have been fixed in the main rc branch. Thanks!

@aburrell aburrell merged commit 5d54dd9 into rc_0_0_6 Aug 9, 2024
@aburrell aburrell deleted the no_remote_files branch August 9, 2024 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: DMSP SSUSI SDR-Disk change in name format

3 participants