Skip to content
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

Empty return without remote files #238

Merged
merged 2 commits into from
Aug 1, 2024
Merged

Empty return without remote files #238

merged 2 commits into from
Aug 1, 2024

Conversation

aburrell
Copy link
Member

@aburrell aburrell commented Jul 31, 2024

Description

Addresses the presence of an error being raised when no remote files are found, instead of an empty list.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

import datetime as dt
import pysat
import pysatNASA

stime = dt.datetime(2024, 1, 1)
etime = dt.datetime(2024, 2, 1)
out_list = pysatNASA.instruments.methods.cdaweb.cdas_list_remote_files(tag='sdr-disk', inst_id='f18', start=stime, stop=etime, supported_tags=pysatNASA.instruments.dmsp_ssusi.download_tags, series_out=False)
out_series = pysatNASA.instruments.methods.cdaweb.cdas_list_remote_files(tag='sdr-disk', inst_id='f18', start=stime, stop=etime, supported_tags=pysatNASA.instruments.dmsp_ssusi.download_tags, series_out=True)

Note, there is data for this instrument and time, but CDAWeb cannot find it 😿

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:

  • 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 added 2 commits July 31, 2024 14:14
Test returned output to provide an empty list if no remote files were found.
Added a line to the changelog.
@aburrell aburrell added the bug Something isn't working label Aug 1, 2024
@jklenzing
Copy link
Member

Note, there is data for this instrument and time, but CDAWeb cannot find it 😿

The cdasws software sadly does not support ssusi, only ssj and ssm. Just double-checked with the latest version. As test code, this should do what is needed for this bug.

Copy link
Member

@jklenzing jklenzing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. The docs workflow on GA is a broken link, has been fixed in #237. Other failures are expected, working on those in a separate branch.

@aburrell aburrell merged commit 2f29a88 into rc_0_0_6 Aug 1, 2024
13 of 23 checks passed
@aburrell aburrell deleted the no_remote_files branch August 1, 2024 16:16
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.

2 participants