From a1733beb6220d25024321d728fa8688dcea28350 Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Tue, 14 Nov 2023 08:58:13 +1000 Subject: [PATCH 1/3] [ci] fix install of OS packages in CI workflows We should be using "apt-get update" to update package lists before installing any new packages. This has never mattered before, but recently the installation of various packages started to fail with 404 errors, which are resolved by updating the package lists first. --- .github/workflows/ci.yml | 7 +++++-- .github/workflows/docs.yml | 6 ++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a70653a..0be2d73 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,6 +20,7 @@ jobs: - name: Install dependencies run: | + sudo apt-get -y update sudo apt-get install -y krb5-config libkrb5-dev python -m pip install -U pip pip install tox @@ -36,8 +37,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Install RPM - run: sudo apt-get install -y rpm libkrb5-dev + - name: Install OS packages + run: | + sudo apt-get -y update + sudo apt-get install -y rpm libkrb5-dev - name: Setup Python uses: actions/setup-python@v2 with: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 4b5f3e1..a2a9f7f 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -15,8 +15,10 @@ jobs: uses: actions/setup-python@v2 with: python-version: 3.8 - - name: Install system dependencies - run: sudo apt-get install -y libkrb5-dev + - name: Install OS packages + run: | + sudo apt-get -y update + sudo apt-get install -y libkrb5-dev - name: Install Tox run: pip install tox - name: Run Tox From ff26b8473bfe5836880d8758ea15939286e28a39 Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Tue, 14 Nov 2023 09:09:36 +1000 Subject: [PATCH 2/3] Manual pre-commit update Manually ran "pre-commit autoupdate". The new version of isort in particular is necessary to fix install on some newer Python environments. --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 192b5f4..456695a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,11 +1,11 @@ repos: - repo: https://github.com/ambv/black - rev: 22.3.0 + rev: 23.11.0 hooks: - id: black language_version: python3.8 - repo: https://github.com/pycqa/isort/ - rev: 5.10.1 + rev: 5.12.0 hooks: - id: isort language_version: python3.8 From e01f60725a2640a61be9f589ffb744ef3c3b7027 Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Tue, 14 Nov 2023 09:10:41 +1000 Subject: [PATCH 3/3] Drop mypy from "tox -e static" mypy started to complain with: pubtools/exodus/gateway.py:8: error: Library stubs not installed for "requests.packages.urllib3.util.retry" [import-untyped] pubtools/exodus/gateway.py:8: note: Hint: "python3 -m pip install types-requests" ...despite that types-requests *is* already installed. Other projects have seen similar issues. As we do not seem to detect any genuine issues with mypy in practice, let's drop it from the default CI configuration to reduce the CI maintenance cost. mypy currently remains in the test-requirements.txt file to enable running the tool locally. --- tox.ini | 1 - 1 file changed, 1 deletion(-) diff --git a/tox.ini b/tox.ini index 66c7cf0..55a77db 100644 --- a/tox.ini +++ b/tox.ini @@ -10,7 +10,6 @@ allowlist_externals=sh [testenv:static] commands= - mypy --install-types --non-interactive -p pubtools -p tests sh -c 'pylint pubtools; test $(( $? & (1|2|4|32) )) = 0' black --check . isort --check .