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

TST: Fix tests downloading data into source dir, MNT: Remove unnecessary astropy check #3122

Merged
merged 1 commit into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import pytest
import warnings

pytest.importorskip("astropy", minversion="5.3.2")

import numpy as np
from astropy import units as u
from astropy.io import fits
Expand Down Expand Up @@ -572,6 +570,7 @@ def test_default_spectral_extraction(cubeviz_helper, spectrum1d_cube_fluxunit_jy
)


@pytest.mark.usefixtures('_jail')
@pytest.mark.remote_data
@pytest.mark.parametrize(
"start_slice, aperture, expected_rtol, uri, calspec_url",
Expand Down
6 changes: 5 additions & 1 deletion jdaviz/core/launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ def open(filename, show=True, **kwargs):
The autoidentified ConfigHelper for the given data
'''
# first catch URIs and download them, or return filename unchanged:
filename = download_uri_to_path(filename, cache=True)
if "local_path" in kwargs:
fn_dl_kw = {"local_path": kwargs["local_path"]}
else:
fn_dl_kw = {}
filename = download_uri_to_path(filename, cache=True, **fn_dl_kw)

# Identify the correct config
compatible_helpers, hdul = identify_helper(filename)
Expand Down