diff --git a/.github/workflows/codspeed.yml b/.github/workflows/codspeed.yml index 068f779f..ea87f95c 100644 --- a/.github/workflows/codspeed.yml +++ b/.github/workflows/codspeed.yml @@ -16,7 +16,6 @@ jobs: with: python-version: '3.12' - run: python -m pip install .[tests] pytest-codspeed 'numpy<2' - - run: python -c "from dkist.data.sample import download_all_sample_data; download_all_sample_data()" - name: Run benchmarks uses: CodspeedHQ/action@v3 with: diff --git a/dkist/tests/test_benchmarks.py b/dkist/tests/test_benchmarks.py index f5f530e6..c1ca78bb 100644 --- a/dkist/tests/test_benchmarks.py +++ b/dkist/tests/test_benchmarks.py @@ -41,6 +41,7 @@ def plot_and_save_fig(ds=visp_dataset_no_headers, axes=axes): @pytest.mark.benchmark +@pytest.mark.remote_data def test_dataset_compute_data_full_files(benchmark): """ Note that although this will load all the files to compute the data, the @@ -48,7 +49,8 @@ def test_dataset_compute_data_full_files(benchmark): because it doesn't support that. This test therefore only assesses the performance of the compute step. """ - from dkist.data.sample import VISP_BKPLX + from dkist.data.sample import VISP_BKPLX, download_all_sample_data + download_all_sample_data() ds = load_dataset(VISP_BKPLX)[0, :15] benchmark(ds.data.compute) @@ -56,8 +58,10 @@ def test_dataset_compute_data_full_files(benchmark): @pytest.mark.benchmark +@pytest.mark.remote_data def test_dataset_compute_data_partial_files(benchmark): - from dkist.data.sample import VISP_BKPLX + from dkist.data.sample import VISP_BKPLX, download_all_sample_data + download_all_sample_data() ds = load_dataset(VISP_BKPLX)[0, :15, :100, :100] benchmark(ds.data.compute)