Skip to content

Commit 6f63ebd

Browse files
authored
Merge pull request #74 from bsipocz/CI_test_only_diff
CI: test only diffed notebooks
2 parents bbbd28b + d45349a commit 6f63ebd

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

tox.ini

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ setenv =
1212
FIREFLY_URL = https://irsa.ipac.caltech.edu/irsaviewer # fallback url for firefly notebooks if not defined in code
1313
devdeps: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/scientific-python-nightly-wheels/simple https://pypi.anaconda.org/astropy/simple
1414

15-
passenv = CI, CIRCLECI
15+
passenv = CI, CIRCLECI, GITHUB_EVENT_NAME
1616

1717
deps =
1818
# We use these files to specify all the dependencies, and below we override
@@ -49,8 +49,11 @@ commands =
4949
!buildhtml: bash -c 'if python -c "import platform; print(platform.platform())" | grep -i win; then cat ignore_windows_testing >> ignore_testing; fi'
5050
# ray is not yet python 3.13 compatible
5151
!buildhtml: bash -c 'if python -c "import sys; print(sys.version)" | grep 3.13; then echo Parallelize_Convolution.md >> ignore_testing; fi'
52+
5253
!buildhtml: bash -c 'if [[ $CI == true ]]; then cat ignore_gha_testing >> ignore_testing; fi'
53-
!buildhtml: bash -c 'find tutorials -name "*.md" | grep -vf ignore_testing | xargs jupytext --to notebook '
54+
55+
# We only want to run CI in PRs for the notebooks we touched
56+
!buildhtml: bash -c 'if [[ $GITHUB_EVENT_NAME == pull_request ]]; then git fetch origin main --depth=1; git diff origin/main --name-only tutorials | grep .md; else find tutorials -name "*.md"; fi | grep -vf ignore_testing | xargs jupytext --to notebook '
5457

5558
!buildhtml: pytest --nbval-lax -vv --durations=10 tutorials
5659
buildhtml: sphinx-build -b html . _build/html -D nb_execution_mode=auto -nWT --keep-going

tutorials/euclid_access/3_Euclid_intro_1D_spectra.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ By the end of this tutorial, you will:
2929

3030
## Introduction
3131

32-
++
33-
3432
Euclid is a European Space Agency (ESA) space mission with NASA participation, to study the geometry and nature of the dark Universe.
3533
The Quick Data Release 1 (Q1) are the first data release from the Euclid mission after the Early Release Observations (ERO).
3634
On March 19, 2025 the data will be available on the [ESA archive](https://easidr.esac.esa.int/sas/) and on the [IRSA archive](https://irsa.ipac.caltech.edu).

0 commit comments

Comments
 (0)