From cdc6b1ca9c8661e2a8015cf8bd6a0f45fb23dc7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Robert?= Date: Fri, 1 Aug 2025 16:51:45 +0200 Subject: [PATCH 1/2] TST: measure and log individual test durations in CI --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f8782d0a..f9939cd9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,7 +46,7 @@ jobs: # pre-commit run --files src/**/*.py - name: Test with pytest run: | - pytest tests/pre_3_10 --cov=src --cov-report=xml --splits 3 --group ${{ matrix.group }} + pytest tests/pre_3_10 --cov=src --cov-report=xml --splits 3 --group ${{ matrix.group }} --durations=50 - name: Upload coverage to Codecov uses: codecov/codecov-action@v3 @@ -81,6 +81,6 @@ jobs: # pre-commit run --files src/vip_hci/objects/*.py - name: Test with pytest run: | - pytest tests/post_3_10 --cov=src/vpi_hci/objects/ --cov-report=xml + pytest tests/post_3_10 --cov=src/vpi_hci/objects/ --cov-report=xml --durations=50 - name: Upload coverage to Codecov uses: codecov/codecov-action@v3 From a60148b3a7622eccc323007ff2f33c72ccbfcfec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Robert?= Date: Fri, 15 Aug 2025 10:41:59 +0200 Subject: [PATCH 2/2] TST: update a conditional in an attempt to reduce duration of a long-running test case --- tests/pre_3_10/test_fm_negfc_3d.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/pre_3_10/test_fm_negfc_3d.py b/tests/pre_3_10/test_fm_negfc_3d.py index 1d457efe..9006a8b0 100644 --- a/tests/pre_3_10/test_fm_negfc_3d.py +++ b/tests/pre_3_10/test_fm_negfc_3d.py @@ -122,7 +122,7 @@ def test_algos( algo_options["radius_int"] = res0[0][0] - 2 * ds.fwhm algo_options["asize"] = 4 * ds.fwhm algo_options["delta_rot"] = 1 - if pca_algo == pca: + if pca_algo == median_sub: # just test it once because very slow sp_unc = speckle_noise_uncertainty( cube_emp,