From 1baacf510d94d8eeb43d7152a8053c1567d62c52 Mon Sep 17 00:00:00 2001 From: Daniel Morcuende Date: Thu, 2 Nov 2023 12:06:03 +0100 Subject: [PATCH 1/4] Bump setuptools and setuptools scm versions Versions in current build settings seem not compatible --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 73a42e69d99..1c196d0946c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools >= 40.6.0", "setuptools_scm[toml]>=3.4"] +requires = ["setuptools>=64", "setuptools_scm[toml]>=8"] build-backend = "setuptools.build_meta" [tool.setuptools_scm] From d35e4c4626d4f837983c860c3885a1ad8e98e71d Mon Sep 17 00:00:00 2001 From: Maximilian Linhoff Date: Thu, 2 Nov 2023 12:43:05 +0100 Subject: [PATCH 2/4] Fix logic condition in CI config --- .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 2e235d95e8d..68bc0fec85d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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-only') == 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 329d6b842531cc8a9dcf63b83832bb5d487ba63a Mon Sep 17 00:00:00 2001 From: Maximilian Linhoff Date: Thu, 2 Nov 2023 12:45:37 +0100 Subject: [PATCH 3/4] Make sure CI uses correct python version --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 68bc0fec85d..fee4fbdb0db 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -108,8 +108,10 @@ jobs: - name: Install dependencies if: contains(github.event.pull_request.labels.*.name, 'documentation-only') == false + env: + PYTHON_VERSION: ${{ matrix.python-version }} run: | - python --version + python --version | grep "Python ${PYTHON_VERSION}" pip install pytest-cov restructuredtext-lint pytest-xdist 'coverage!=6.3.0' pip install .[all] pip install ./test_plugin From 40d3f05d562005739bb31600bebc7c89b1d7774b Mon Sep 17 00:00:00 2001 From: Maximilian Linhoff Date: Thu, 2 Nov 2023 12:48:32 +0100 Subject: [PATCH 4/4] Move rst check of README into lint job --- .github/workflows/ci.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fee4fbdb0db..eba29b903d1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,6 +24,10 @@ jobs: - uses: actions/setup-python@v4 with: python-version: "3.9" + - name: Check README syntax + run: | + pip install restructuredtext-lint + restructuredtext-lint README.rst - uses: pre-commit/action@v3.0.0 with: extra_args: --files $(git diff origin/main --name-only) @@ -112,16 +116,11 @@ jobs: PYTHON_VERSION: ${{ matrix.python-version }} run: | python --version | grep "Python ${PYTHON_VERSION}" - pip install pytest-cov restructuredtext-lint pytest-xdist 'coverage!=6.3.0' + pip install pytest-cov pytest-xdist 'coverage!=6.3.0' pip install .[all] pip install ./test_plugin pip freeze - - name: Static codechecks - 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-only') == false run: |