From 1f7346b36d4f2c61e9cb52eb75ccbcd35138a1a4 Mon Sep 17 00:00:00 2001 From: Noah Biederbeck Date: Thu, 19 Jan 2023 13:16:26 +0100 Subject: [PATCH 01/30] run test only if labels don't contain 'documentation' --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2bdf51cf3ac..a86806dd9df 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,6 +16,7 @@ env: jobs: tests: + if: ${{ ! contains(github.event.pull_request.labels.*.name, 'documentation') }} runs-on: ${{ matrix.os }} strategy: matrix: From ceac8972c24c2bb6ba8c0f1dbca75b1f7a461de1 Mon Sep 17 00:00:00 2001 From: Tomas Bylund Date: Wed, 27 Sep 2023 11:22:16 +0200 Subject: [PATCH 02/30] Trying variation of the conditional --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a86806dd9df..9fa4a382f15 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ env: jobs: tests: - if: ${{ ! contains(github.event.pull_request.labels.*.name, 'documentation') }} + if: ${{ contains(github.event.pull_request.labels.*.name, 'documentation') == 'false' }} runs-on: ${{ matrix.os }} strategy: matrix: From ea6ca33c008bfef68f31ba836cf1910e8d66efec Mon Sep 17 00:00:00 2001 From: Tomas Bylund Date: Thu, 5 Oct 2023 13:25:13 +0200 Subject: [PATCH 03/30] Trying new magic conditional, see if this works as intended. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9fa4a382f15..f0c6244ba26 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ env: jobs: tests: - if: ${{ contains(github.event.pull_request.labels.*.name, 'documentation') == 'false' }} + if: !contains(github.event.pull_request.labels.*.name, 'documentation') runs-on: ${{ matrix.os }} strategy: matrix: From c304b890e64096f5e17fd7594fda319ecf4d96f9 Mon Sep 17 00:00:00 2001 From: Tomas Bylund Date: Thu, 5 Oct 2023 13:30:16 +0200 Subject: [PATCH 04/30] Trying new magic conditional, see if this works as intended. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f0c6244ba26..4259b78540a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ env: jobs: tests: - if: !contains(github.event.pull_request.labels.*.name, 'documentation') + if: ! contains(github.event.pull_request.labels.*.name, 'documentation') runs-on: ${{ matrix.os }} strategy: matrix: From f346ea6f3d93ecfd41b7c8812bc0a33e66aff78f Mon Sep 17 00:00:00 2001 From: Tomas Bylund Date: Thu, 5 Oct 2023 13:35:27 +0200 Subject: [PATCH 05/30] Trying new magic conditional, see if this works as intended. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4259b78540a..cca0f0ad0b6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ env: jobs: tests: - if: ! contains(github.event.pull_request.labels.*.name, 'documentation') + if: contains(github.event.pull_request.labels.*.name, 'documentation') != true runs-on: ${{ matrix.os }} strategy: matrix: From 1450eb8e1a5602fde5c1bfc79eb133cbed74f84b Mon Sep 17 00:00:00 2001 From: Tomas Bylund Date: Thu, 5 Oct 2023 13:43:34 +0200 Subject: [PATCH 06/30] More tests of how to formulate conditional --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cca0f0ad0b6..1f57eb353c9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ env: jobs: tests: - if: contains(github.event.pull_request.labels.*.name, 'documentation') != true + if: contains(github.event.pull_request.labels.*.name, 'documentation') == false runs-on: ${{ matrix.os }} strategy: matrix: From 22e74d44e61af5bebdde4e8b6bd492e90ae7fa9c Mon Sep 17 00:00:00 2001 From: Tomas Bylund Date: Thu, 5 Oct 2023 14:04:38 +0200 Subject: [PATCH 07/30] Think I understand the problem now --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1f57eb353c9..95971a4cee4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,6 @@ env: jobs: tests: - if: contains(github.event.pull_request.labels.*.name, 'documentation') == false runs-on: ${{ matrix.os }} strategy: matrix: @@ -66,6 +65,7 @@ jobs: if: matrix.install-method == 'mamba' env: PYTHON_VERSION: ${{ matrix.python-version }} + if: contains(github.event.pull_request.labels.*.name, 'documentation') == false run: | # setup correct python version sed -i -e "s/- python=.*/- python=$PYTHON_VERSION/g" environment.yml @@ -88,10 +88,12 @@ jobs: # Login shells on macOS prepend system paths, so we need to # prepend the python path from actions/setup-python. # Micromamba sets up ~/.bash_profile, where we need to set the path now. + if: contains(github.event.pull_request.labels.*.name, 'documentation') == false run: | tee -a ~/.bash_profile <<<'export PATH="$pythonLocation/bin:$PATH"' - name: Install dependencies + if: contains(github.event.pull_request.labels.*.name, 'documentation') == false run: | python --version pip install codecov pytest-cov flake8 restructuredtext-lint pytest-xdist 'coverage!=6.3.0' @@ -105,10 +107,12 @@ jobs: restructuredtext-lint README.rst - name: ctapipe-info + if: contains(github.event.pull_request.labels.*.name, 'documentation') == false run: | ctapipe-info --all - name: Tests + if: contains(github.event.pull_request.labels.*.name, 'documentation') == false run: | cd $(mktemp -d) pytest -n auto --dist loadscope \ From 09e0178c2244e1610ce69b67dd56403adc07d59b Mon Sep 17 00:00:00 2001 From: Tomas Bylund Date: Thu, 5 Oct 2023 14:08:56 +0200 Subject: [PATCH 08/30] Update nitpicking ignores --- docs/conf.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index b848261c4d8..6811563ab5d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -95,6 +95,19 @@ def setup(app): # These links are ignored in the checks, necessary due to broken intersphinx for # these nitpick_ignore = [ + # needed for building the docs with python 3.11 locally. + # we use the lowest supported version on readthedocs, so that is what we use the intersphinx + # link above + ("py:class", "enum.StrEnum"), + # these are coming from traitlets: + ("py:class", "t.Union"), + ("py:class", "t.Any"), + ("py:class", "t.Dict"), + ("py:class", "t.Optional"), + ("py:class", "t.Type"), + ("py:class", "t.List"), + ("py:class", "t.Tuple"), + ("py:class", "Config"), ("py:class", "traitlets.config.configurable.Configurable"), ("py:class", "traitlets.traitlets.HasTraits"), ("py:class", "traitlets.traitlets.HasDescriptors"), @@ -108,6 +121,12 @@ def setup(app): ("py:class", "traitlets.config.application.Application"), ("py:class", "traitlets.utils.sentinel.Sentinel"), ("py:class", "traitlets.traitlets.ObserveHandler"), + ("py:obj", "traitlets.traitlets.G"), + ("py:obj", "traitlets.traitlets.S"), + ("py:class", "traitlets.traitlets.T"), + ("py:class", "re.Pattern[t.Any]"), + ("py:class", "Sentinel"), + ("py:class", "ObserveHandler"), ("py:obj", "traitlets.config.boolean_flag"), ("py:obj", "traitlets.TraitError"), ("py:obj", "-v"), # fix for wrong syntax in a traitlets docstring @@ -119,6 +138,8 @@ def setup(app): ("py:class", "astropy.coordinates.baseframe.BaseCoordinateFrame"), ("py:class", "astropy.table.table.Table"), ("py:class", "eventio.simtel.simtelfile.SimTelFile"), + ("py:class", "ctapipe.compat.StrEnum"), + ("py:class", "ctapipe.compat.StrEnum"), ] # The suffix(es) of source filenames. From 902a69139f8d9f9da31208ef6b182ccf001e6323 Mon Sep 17 00:00:00 2001 From: Tomas Bylund Date: Thu, 5 Oct 2023 14:11:46 +0200 Subject: [PATCH 09/30] Fixing syntax errors --- .github/workflows/ci.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 95971a4cee4..555c243f32d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -62,33 +62,31 @@ jobs: key: ctapipe-test-data - name: Prepare mamba installation - if: matrix.install-method == 'mamba' + if: matrix.install-method == 'mamba' && contains(github.event.pull_request.labels.*.name, 'documentation') == false env: PYTHON_VERSION: ${{ matrix.python-version }} - if: contains(github.event.pull_request.labels.*.name, 'documentation') == false run: | # setup correct python version sed -i -e "s/- python=.*/- python=$PYTHON_VERSION/g" environment.yml - name: mamba setup - if: matrix.install-method == 'mamba' + if: matrix.install-method == 'mamba' && contains(github.event.pull_request.labels.*.name, 'documentation') == false uses: mamba-org/provision-with-micromamba@v14 - name: Python setup - if: matrix.install-method == 'pip' + if: matrix.install-method == 'pip' && contains(github.event.pull_request.labels.*.name, 'documentation') == false uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} check-latest: true - - if: ${{ matrix.install-method == 'pip' && runner.os == 'macOS' }} + - if: ${{ matrix.install-method == 'pip' && runner.os == 'macOS' }} && contains(github.event.pull_request.labels.*.name, 'documentation') == false name: Fix Python PATH on macOS # See https://github.com/actions/setup-python/issues/132 and # https://github.com/actions/setup-python/issues/132#issuecomment-779406058 # Login shells on macOS prepend system paths, so we need to # prepend the python path from actions/setup-python. # Micromamba sets up ~/.bash_profile, where we need to set the path now. - if: contains(github.event.pull_request.labels.*.name, 'documentation') == false run: | tee -a ~/.bash_profile <<<'export PATH="$pythonLocation/bin:$PATH"' From 36c46a6d2e35ec893af4300ac3f90cea98486cce Mon Sep 17 00:00:00 2001 From: Tomas Bylund Date: Thu, 5 Oct 2023 14:18:20 +0200 Subject: [PATCH 10/30] Messing about with syntax --- .github/workflows/ci.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 555c243f32d..b8f68ac0ba0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -62,7 +62,7 @@ jobs: key: ctapipe-test-data - name: Prepare mamba installation - if: matrix.install-method == 'mamba' && contains(github.event.pull_request.labels.*.name, 'documentation') == false + if: matrix.install-method == 'mamba' env: PYTHON_VERSION: ${{ matrix.python-version }} run: | @@ -70,17 +70,20 @@ jobs: sed -i -e "s/- python=.*/- python=$PYTHON_VERSION/g" environment.yml - name: mamba setup - if: matrix.install-method == 'mamba' && contains(github.event.pull_request.labels.*.name, 'documentation') == false + if: matrix.install-method == 'mamba' uses: mamba-org/provision-with-micromamba@v14 + with: + environment-file: environment.yml + cache-downloads: true - name: Python setup - if: matrix.install-method == 'pip' && contains(github.event.pull_request.labels.*.name, 'documentation') == false + if: matrix.install-method == 'pip' uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} check-latest: true - - if: ${{ matrix.install-method == 'pip' && runner.os == 'macOS' }} && contains(github.event.pull_request.labels.*.name, 'documentation') == false + - if: ${{ matrix.install-method == 'pip' && runner.os == 'macOS' }} name: Fix Python PATH on macOS # See https://github.com/actions/setup-python/issues/132 and # https://github.com/actions/setup-python/issues/132#issuecomment-779406058 @@ -91,7 +94,6 @@ jobs: tee -a ~/.bash_profile <<<'export PATH="$pythonLocation/bin:$PATH"' - name: Install dependencies - if: contains(github.event.pull_request.labels.*.name, 'documentation') == false run: | python --version pip install codecov pytest-cov flake8 restructuredtext-lint pytest-xdist 'coverage!=6.3.0' From 3ba8e3e720ec672254ea0f8ac5b3fd61e3966f10 Mon Sep 17 00:00:00 2001 From: Tomas Bylund Date: Thu, 5 Oct 2023 14:20:26 +0200 Subject: [PATCH 11/30] Fix conflict with main --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b8f68ac0ba0..30791280b48 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -71,7 +71,7 @@ jobs: - name: mamba setup if: matrix.install-method == 'mamba' - uses: mamba-org/provision-with-micromamba@v14 + uses: mamba-org/setup-micromamba@v1 with: environment-file: environment.yml cache-downloads: true From 1ab4c43a26db7f2590326de87b88af78478bf928 Mon Sep 17 00:00:00 2001 From: Tomas Bylund Date: Thu, 5 Oct 2023 14:25:55 +0200 Subject: [PATCH 12/30] Adding skip to more stages --- .github/workflows/ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 304a69a0af7..a2c265ac93d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -83,14 +83,14 @@ jobs: sed -i -e "s/- python=.*/- python=$PYTHON_VERSION/g" environment.yml - name: mamba setup - if: matrix.install-method == 'mamba' + if: matrix.install-method == 'mamba' && contains(github.event.pull_request.labels.*.name, 'documentation') == false uses: mamba-org/setup-micromamba@v1 with: environment-file: environment.yml cache-downloads: true - name: Python setup - if: matrix.install-method == 'pip' + if: matrix.install-method == 'pip' && contains(github.event.pull_request.labels.*.name, 'documentation') == false uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} @@ -107,6 +107,7 @@ jobs: tee -a ~/.bash_profile <<<'export PATH="$pythonLocation/bin:$PATH"' - name: Install dependencies + if: contains(github.event.pull_request.labels.*.name, 'documentation') == false run: | python --version pip install pytest-cov restructuredtext-lint pytest-xdist 'coverage!=6.3.0' @@ -115,6 +116,7 @@ jobs: pip freeze - name: Static codechecks + if: contains(github.event.pull_request.labels.*.name, 'documentation') == false run: | restructuredtext-lint README.rst From 8bbd4376bb66ec93aa66112aace6dc151bf15cf6 Mon Sep 17 00:00:00 2001 From: Noah Biederbeck Date: Thu, 19 Jan 2023 13:16:26 +0100 Subject: [PATCH 13/30] run test only if labels don't contain 'documentation' --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a2c265ac93d..03332f59e77 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,6 +28,7 @@ jobs: with: extra_args: --files $(git diff origin/main --name-only) tests: + if: ${{ ! contains(github.event.pull_request.labels.*.name, 'documentation') }} runs-on: ${{ matrix.os }} needs: lint strategy: From abbdac24481cd6ac5851949b51b60e92c4248f68 Mon Sep 17 00:00:00 2001 From: Tomas Bylund Date: Wed, 27 Sep 2023 11:22:16 +0200 Subject: [PATCH 14/30] Trying variation of the conditional --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 03332f59e77..51e2f23de21 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: with: extra_args: --files $(git diff origin/main --name-only) tests: - if: ${{ ! contains(github.event.pull_request.labels.*.name, 'documentation') }} + if: ${{ contains(github.event.pull_request.labels.*.name, 'documentation') == 'false' }} runs-on: ${{ matrix.os }} needs: lint strategy: From dabc4c921906fd930a69d57365b20c7a2087922b Mon Sep 17 00:00:00 2001 From: Tomas Bylund Date: Thu, 5 Oct 2023 13:25:13 +0200 Subject: [PATCH 15/30] Trying new magic conditional, see if this works as intended. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 51e2f23de21..0da55406bcf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: with: extra_args: --files $(git diff origin/main --name-only) tests: - if: ${{ contains(github.event.pull_request.labels.*.name, 'documentation') == 'false' }} + if: !contains(github.event.pull_request.labels.*.name, 'documentation') runs-on: ${{ matrix.os }} needs: lint strategy: From 120908325e140afc51e585d1f13bc5ba24907db0 Mon Sep 17 00:00:00 2001 From: Tomas Bylund Date: Thu, 5 Oct 2023 13:30:16 +0200 Subject: [PATCH 16/30] Trying new magic conditional, see if this works as intended. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0da55406bcf..084d7ee47b3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: with: extra_args: --files $(git diff origin/main --name-only) tests: - if: !contains(github.event.pull_request.labels.*.name, 'documentation') + if: ! contains(github.event.pull_request.labels.*.name, 'documentation') runs-on: ${{ matrix.os }} needs: lint strategy: From 3aac74b738bc002286c083a8f5d5dce77be03e26 Mon Sep 17 00:00:00 2001 From: Tomas Bylund Date: Thu, 5 Oct 2023 13:35:27 +0200 Subject: [PATCH 17/30] Trying new magic conditional, see if this works as intended. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 084d7ee47b3..7be79505893 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: with: extra_args: --files $(git diff origin/main --name-only) tests: - if: ! contains(github.event.pull_request.labels.*.name, 'documentation') + if: contains(github.event.pull_request.labels.*.name, 'documentation') != true runs-on: ${{ matrix.os }} needs: lint strategy: From c8896f1e8e0ce99226a949d0bde090768c673818 Mon Sep 17 00:00:00 2001 From: Tomas Bylund Date: Thu, 5 Oct 2023 13:43:34 +0200 Subject: [PATCH 18/30] More tests of how to formulate conditional --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7be79505893..17e83573f42 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: with: extra_args: --files $(git diff origin/main --name-only) tests: - if: contains(github.event.pull_request.labels.*.name, 'documentation') != true + if: contains(github.event.pull_request.labels.*.name, 'documentation') == false runs-on: ${{ matrix.os }} needs: lint strategy: From 7e1141573c65dce95c49d6e2c3a2c828ec080921 Mon Sep 17 00:00:00 2001 From: Tomas Bylund Date: Thu, 5 Oct 2023 14:04:38 +0200 Subject: [PATCH 19/30] Think I understand the problem now --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 17e83573f42..a77c050c6d1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,6 @@ jobs: with: extra_args: --files $(git diff origin/main --name-only) tests: - if: contains(github.event.pull_request.labels.*.name, 'documentation') == false runs-on: ${{ matrix.os }} needs: lint strategy: @@ -79,6 +78,7 @@ jobs: if: matrix.install-method == 'mamba' env: PYTHON_VERSION: ${{ matrix.python-version }} + if: contains(github.event.pull_request.labels.*.name, 'documentation') == false run: | # setup correct python version sed -i -e "s/- python=.*/- python=$PYTHON_VERSION/g" environment.yml @@ -104,6 +104,7 @@ jobs: # Login shells on macOS prepend system paths, so we need to # prepend the python path from actions/setup-python. # Micromamba sets up ~/.bash_profile, where we need to set the path now. + if: contains(github.event.pull_request.labels.*.name, 'documentation') == false run: | tee -a ~/.bash_profile <<<'export PATH="$pythonLocation/bin:$PATH"' From 8dde9f7d418fdb6da6adc6bb481efcbf4d531c37 Mon Sep 17 00:00:00 2001 From: Tomas Bylund Date: Thu, 5 Oct 2023 14:11:46 +0200 Subject: [PATCH 20/30] Rebasing on main --- .github/workflows/ci.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a77c050c6d1..19798def29e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -75,10 +75,9 @@ jobs: key: ctapipe-test-data - name: Prepare mamba installation - if: matrix.install-method == 'mamba' + if: matrix.install-method == 'mamba' && contains(github.event.pull_request.labels.*.name, 'documentation') == false env: PYTHON_VERSION: ${{ matrix.python-version }} - if: contains(github.event.pull_request.labels.*.name, 'documentation') == false run: | # setup correct python version sed -i -e "s/- python=.*/- python=$PYTHON_VERSION/g" environment.yml @@ -91,20 +90,19 @@ jobs: cache-downloads: true - name: Python setup - if: matrix.install-method == 'pip' && contains(github.event.pull_request.labels.*.name, 'documentation') == false + if: matrix.install-method == 'pip' && contains(github.event.pull_request.labels.*.name, 'documentation') == false uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} check-latest: true - - if: ${{ matrix.install-method == 'pip' && runner.os == 'macOS' }} + - if: ${{ matrix.install-method == 'pip' && runner.os == 'macOS' }} && contains(github.event.pull_request.labels.*.name, 'documentation') == false name: Fix Python PATH on macOS # See https://github.com/actions/setup-python/issues/132 and # https://github.com/actions/setup-python/issues/132#issuecomment-779406058 # Login shells on macOS prepend system paths, so we need to # prepend the python path from actions/setup-python. # Micromamba sets up ~/.bash_profile, where we need to set the path now. - if: contains(github.event.pull_request.labels.*.name, 'documentation') == false run: | tee -a ~/.bash_profile <<<'export PATH="$pythonLocation/bin:$PATH"' From 38471fdb0b5e145f7b9b84906dbee9b1fabda63e Mon Sep 17 00:00:00 2001 From: Tomas Bylund Date: Thu, 5 Oct 2023 14:18:20 +0200 Subject: [PATCH 21/30] Messing about with syntax --- .github/workflows/ci.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 19798def29e..4277f0f911d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -75,7 +75,7 @@ jobs: key: ctapipe-test-data - name: Prepare mamba installation - if: matrix.install-method == 'mamba' && contains(github.event.pull_request.labels.*.name, 'documentation') == false + if: matrix.install-method == 'mamba' env: PYTHON_VERSION: ${{ matrix.python-version }} run: | @@ -84,19 +84,19 @@ jobs: - name: mamba setup if: matrix.install-method == 'mamba' && contains(github.event.pull_request.labels.*.name, 'documentation') == false - uses: mamba-org/setup-micromamba@v1 + uses: mamba-org/provision-with-micromamba@v14 with: environment-file: environment.yml cache-downloads: true - name: Python setup - if: matrix.install-method == 'pip' && contains(github.event.pull_request.labels.*.name, 'documentation') == false + if: matrix.install-method == 'pip' uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} check-latest: true - - if: ${{ matrix.install-method == 'pip' && runner.os == 'macOS' }} && contains(github.event.pull_request.labels.*.name, 'documentation') == false + - if: ${{ matrix.install-method == 'pip' && runner.os == 'macOS' }} name: Fix Python PATH on macOS # See https://github.com/actions/setup-python/issues/132 and # https://github.com/actions/setup-python/issues/132#issuecomment-779406058 @@ -107,7 +107,6 @@ jobs: tee -a ~/.bash_profile <<<'export PATH="$pythonLocation/bin:$PATH"' - name: Install dependencies - if: contains(github.event.pull_request.labels.*.name, 'documentation') == false run: | python --version pip install pytest-cov restructuredtext-lint pytest-xdist 'coverage!=6.3.0' From 0b623aba2e82e60a13f0c642a059ed02f86c59c4 Mon Sep 17 00:00:00 2001 From: Tomas Bylund Date: Thu, 5 Oct 2023 14:20:26 +0200 Subject: [PATCH 22/30] Fix conflict with main --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4277f0f911d..ee951d242ad 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -84,7 +84,7 @@ jobs: - name: mamba setup if: matrix.install-method == 'mamba' && contains(github.event.pull_request.labels.*.name, 'documentation') == false - uses: mamba-org/provision-with-micromamba@v14 + uses: mamba-org/setup-micromamba@v1 with: environment-file: environment.yml cache-downloads: true From c63ffcc1a38ac0a1f7d92d94e0406b0a1b551077 Mon Sep 17 00:00:00 2001 From: Tomas Bylund Date: Thu, 5 Oct 2023 14:25:55 +0200 Subject: [PATCH 23/30] Adding skip to more stages --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ee951d242ad..a2c265ac93d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -90,7 +90,7 @@ jobs: cache-downloads: true - name: Python setup - if: matrix.install-method == 'pip' + if: matrix.install-method == 'pip' && contains(github.event.pull_request.labels.*.name, 'documentation') == false uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} @@ -107,6 +107,7 @@ jobs: tee -a ~/.bash_profile <<<'export PATH="$pythonLocation/bin:$PATH"' - name: Install dependencies + if: contains(github.event.pull_request.labels.*.name, 'documentation') == false run: | python --version pip install pytest-cov restructuredtext-lint pytest-xdist 'coverage!=6.3.0' From 58e1972f1e644dbd2a3c87df6c0e9128eff6a93b Mon Sep 17 00:00:00 2001 From: Tomas Bylund Date: Fri, 6 Oct 2023 13:44:08 +0200 Subject: [PATCH 24/30] Changed the label triggering skipping tests --- .github/workflows/ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a2c265ac93d..d3d5188032d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -83,14 +83,14 @@ jobs: sed -i -e "s/- python=.*/- python=$PYTHON_VERSION/g" environment.yml - name: mamba setup - if: matrix.install-method == 'mamba' && contains(github.event.pull_request.labels.*.name, 'documentation') == false + if: matrix.install-method == 'mamba' && contains(github.event.pull_request.labels.*.name, 'documentation-only') == false uses: mamba-org/setup-micromamba@v1 with: environment-file: environment.yml cache-downloads: true - name: Python setup - if: matrix.install-method == 'pip' && contains(github.event.pull_request.labels.*.name, 'documentation') == false + if: matrix.install-method == 'pip' && contains(github.event.pull_request.labels.*.name, 'documentation-only') == false uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} @@ -107,7 +107,7 @@ jobs: tee -a ~/.bash_profile <<<'export PATH="$pythonLocation/bin:$PATH"' - name: Install dependencies - if: contains(github.event.pull_request.labels.*.name, 'documentation') == false + if: contains(github.event.pull_request.labels.*.name, 'documentation-only') == false run: | python --version pip install pytest-cov restructuredtext-lint pytest-xdist 'coverage!=6.3.0' @@ -116,17 +116,17 @@ jobs: pip freeze - name: Static codechecks - if: contains(github.event.pull_request.labels.*.name, 'documentation') == false + if: contains(github.event.pull_request.labels.*.name, 'documentation-only') == false run: | restructuredtext-lint README.rst - name: ctapipe-info - if: contains(github.event.pull_request.labels.*.name, 'documentation') == false + if: contains(github.event.pull_request.labels.*.name, 'documentation-only') == false run: | ctapipe-info --all - name: Tests - if: contains(github.event.pull_request.labels.*.name, 'documentation') == false + if: contains(github.event.pull_request.labels.*.name, 'documentation-only') == false run: | cd $(mktemp -d) pytest -n auto --dist loadscope \ From 4c9d8d1c4a5bb88496b898ba361a3c37d77e6dfa Mon Sep 17 00:00:00 2001 From: Tomas Bylund Date: Thu, 5 Oct 2023 14:04:38 +0200 Subject: [PATCH 25/30] Think I understand the problem now --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d3d5188032d..2701b1603ab 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -78,6 +78,7 @@ jobs: if: matrix.install-method == 'mamba' env: PYTHON_VERSION: ${{ matrix.python-version }} + if: contains(github.event.pull_request.labels.*.name, 'documentation') == false run: | # setup correct python version sed -i -e "s/- python=.*/- python=$PYTHON_VERSION/g" environment.yml @@ -103,6 +104,7 @@ jobs: # Login shells on macOS prepend system paths, so we need to # prepend the python path from actions/setup-python. # Micromamba sets up ~/.bash_profile, where we need to set the path now. + if: contains(github.event.pull_request.labels.*.name, 'documentation') == false run: | tee -a ~/.bash_profile <<<'export PATH="$pythonLocation/bin:$PATH"' From 60e12036c4f49e0b8361db1b08c4fb3571ea9b29 Mon Sep 17 00:00:00 2001 From: Tomas Bylund Date: Thu, 5 Oct 2023 14:20:26 +0200 Subject: [PATCH 26/30] Fix conflict with main --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2701b1603ab..504fd385252 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -85,7 +85,7 @@ jobs: - name: mamba setup if: matrix.install-method == 'mamba' && contains(github.event.pull_request.labels.*.name, 'documentation-only') == false - uses: mamba-org/setup-micromamba@v1 + uses: mamba-org/provision-with-micromamba@v14 with: environment-file: environment.yml cache-downloads: true From 25574ae066f7a32d18322362005c81cd2de2ab05 Mon Sep 17 00:00:00 2001 From: Tomas Bylund Date: Thu, 5 Oct 2023 14:11:46 +0200 Subject: [PATCH 27/30] Rebasing on main --- .github/workflows/ci.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 504fd385252..0925b21d4c9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -75,10 +75,9 @@ jobs: key: ctapipe-test-data - name: Prepare mamba installation - if: matrix.install-method == 'mamba' + if: matrix.install-method == 'mamba' && contains(github.event.pull_request.labels.*.name, 'documentation') == false env: PYTHON_VERSION: ${{ matrix.python-version }} - if: contains(github.event.pull_request.labels.*.name, 'documentation') == false run: | # setup correct python version sed -i -e "s/- python=.*/- python=$PYTHON_VERSION/g" environment.yml @@ -97,14 +96,13 @@ jobs: python-version: ${{ matrix.python-version }} check-latest: true - - if: ${{ matrix.install-method == 'pip' && runner.os == 'macOS' }} + - if: ${{ matrix.install-method == 'pip' && runner.os == 'macOS' }} && contains(github.event.pull_request.labels.*.name, 'documentation') == false name: Fix Python PATH on macOS # See https://github.com/actions/setup-python/issues/132 and # https://github.com/actions/setup-python/issues/132#issuecomment-779406058 # Login shells on macOS prepend system paths, so we need to # prepend the python path from actions/setup-python. # Micromamba sets up ~/.bash_profile, where we need to set the path now. - if: contains(github.event.pull_request.labels.*.name, 'documentation') == false run: | tee -a ~/.bash_profile <<<'export PATH="$pythonLocation/bin:$PATH"' From 198d05dca95f9d08a8cb5148b64ca1a9a1534778 Mon Sep 17 00:00:00 2001 From: Tomas Bylund Date: Tue, 31 Oct 2023 14:31:11 +0100 Subject: [PATCH 28/30] Change label --- .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 0925b21d4c9..2c3e565cb1f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -75,7 +75,7 @@ jobs: key: ctapipe-test-data - name: Prepare mamba installation - if: matrix.install-method == 'mamba' && contains(github.event.pull_request.labels.*.name, 'documentation') == false + if: matrix.install-method == 'mamba' && contains(github.event.pull_request.labels.*.name, 'documentation-only') == false env: PYTHON_VERSION: ${{ matrix.python-version }} run: | @@ -96,7 +96,7 @@ jobs: python-version: ${{ matrix.python-version }} check-latest: true - - if: ${{ matrix.install-method == 'pip' && runner.os == 'macOS' }} && contains(github.event.pull_request.labels.*.name, 'documentation') == false + - if: ${{ matrix.install-method == 'pip' && runner.os == 'macOS' }} && contains(github.event.pull_request.labels.*.name, 'documentation-only') == false name: Fix Python PATH on macOS # See https://github.com/actions/setup-python/issues/132 and # https://github.com/actions/setup-python/issues/132#issuecomment-779406058 From a306dd951873e9ecce5c06d1768355e7a258dabe Mon Sep 17 00:00:00 2001 From: Tomas Bylund Date: Tue, 31 Oct 2023 15:29:53 +0100 Subject: [PATCH 29/30] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2c3e565cb1f..82d948772f0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -84,7 +84,7 @@ jobs: - name: mamba setup if: matrix.install-method == 'mamba' && contains(github.event.pull_request.labels.*.name, 'documentation-only') == false - uses: mamba-org/provision-with-micromamba@v14 + uses: mamba-org/provision-with-micromamba@v1 with: environment-file: environment.yml cache-downloads: true From 01324c05ceace8fcf3a02f14cb882fd078dbdaac Mon Sep 17 00:00:00 2001 From: Tomas Bylund Date: Tue, 31 Oct 2023 15:30:29 +0100 Subject: [PATCH 30/30] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 82d948772f0..2e235d95e8d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -84,7 +84,7 @@ jobs: - name: mamba setup if: matrix.install-method == 'mamba' && contains(github.event.pull_request.labels.*.name, 'documentation-only') == false - uses: mamba-org/provision-with-micromamba@v1 + uses: mamba-org/setup-micromamba@v1 with: environment-file: environment.yml cache-downloads: true