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

Added DOWNLOAD_CLOUD functionality, reworked the parameter file, smaller fixes #13

Merged
merged 3 commits into from
Jul 11, 2024

Conversation

tylerapritchard
Copy link
Collaborator

Two Major Features:

  1. Reworked the configuration parameter to be fully astropy configuration namespace compatible. Added a convenience function to write a default config file. Updated the sample notebook with configuration file and cache directory examples.
  2. Added functionality related to the DOWNLOAD_CLOUD configuration parameter. If False, this will return the location of MAST cloud bucket location for the file instead of downloading it directly. The intended use case for this is cloud-based compute platforms like TIKE where we would rather remote-read a file that is on the cloud than download it directly. Added tests for this as well.

This also includes a number of smaller fixes and updates, including:

  • documentation changes - added citation and community contribution guidelines (just linking to the relevant Lightkurve documentation pages).
  • fixed an issue in the getitem where trying to mask via a pandas series returned a datafram and not a lksearch object
  • the MASTSearch.cloud_uris parameter was breaking for TESSSearch, since pandas.concat adds nans to missing columns when the TESScut results are added in. I've fixed the immediate case and added a regression test, but am concerned that these nans may show up again elsewhere. Is this brittle? Should we redo something? This is a separate issue.
  • A bunch of the configuration parameters were being treated a little inconsistently, I streamlined these

@@ -153,6 +151,10 @@ def __getitem__(self, key):
if all(isinstance(n, str) for n in key):
strlist = True

if hasattr(key, "__iter__") or isinstance(key, pd.Series):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Minor: I believe this is redundant, as pd.Series has the attribute __iter__

@@ -981,17 +1006,19 @@ def download(
download only products availaible in the cloud, by default False
download_dir : str, optional
directory where the products should be downloaded to,
by default default_download_dir
by default default_download_dir
Copy link
Collaborator

Choose a reason for hiding this comment

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

Variable changed to config.get_cache_dir()

@tylerapritchard tylerapritchard merged commit 983a20a into main Jul 11, 2024
4 checks passed
@tylerapritchard tylerapritchard deleted the configandcloud branch July 11, 2024 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants