Skip to content

Commit

Permalink
Download sample data in tests if necessary instead of in tox
Browse files Browse the repository at this point in the history
  • Loading branch information
SolarDrew committed Feb 10, 2025
1 parent 0765b4e commit 4b455c0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
9 changes: 6 additions & 3 deletions dkist/dataset/tests/test_tiled_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ def test_tiled_dataset_from_components(dataset):
@pytest.mark.remote_data
@pytest.mark.parametrize("share_zscale", [True, False], ids=["share_zscale", "indpendent_zscale"])
def test_tileddataset_plot(share_zscale):
from dkist.data.sample import VBI_AJQWW
from dkist.data.sample import VBI_AJQWW, download_all_sample_data
download_all_sample_data()
ori_ds = load_dataset(VBI_AJQWW)

newtiles = []
Expand All @@ -107,7 +108,8 @@ def test_tileddataset_plot(share_zscale):
def test_tileddataset_plot_limit_swapping(swap_tile_limits):
# Also test that row/column sizes are correct

from dkist.data.sample import VBI_AJQWW
from dkist.data.sample import VBI_AJQWW, download_all_sample_data
download_all_sample_data()
ori_ds = load_dataset(VBI_AJQWW)

# Swap WCS to make the `swap_tile_limits` option more natural
Expand Down Expand Up @@ -150,7 +152,8 @@ def test_tileddataset_plot_limit_swapping(swap_tile_limits):

@pytest.mark.remote_data
def test_tileddataset_plot_non2d_sliceindex():
from dkist.data.sample import VBI_AJQWW
from dkist.data.sample import VBI_AJQWW, download_all_sample_data
download_all_sample_data()
ds = load_dataset(VBI_AJQWW)

newtiles = []
Expand Down
1 change: 0 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ commands_pre =
oldestdeps: minimum_dependencies dkist --filename requirements-min.txt
# We need to pin down the cryptography transitive dependency because of globus
oldestdeps: pip install -r requirements-min.txt cryptography<42
figure: python -c "from dkist.data.sample import download_all_sample_data; download_all_sample_data()"
pip freeze --all --no-input
commands =
figure: /bin/sh -c "mkdir -p ./figure_test_images; python -c 'import matplotlib as mpl; print(mpl.ft2font.__file__, mpl.ft2font.__freetype_version__, mpl.ft2font.__freetype_build_type__)' > ./figure_test_images/figure_version_info.txt"
Expand Down

0 comments on commit 4b455c0

Please sign in to comment.