From be1af7c356c8e41ef6c14257588643c6dc8a8a3c Mon Sep 17 00:00:00 2001 From: Martin Medler Date: Sat, 23 Dec 2023 09:11:42 +0100 Subject: [PATCH 1/4] Remove dead code This was forgotten in a previous change refactoring the pcpp fetching. --- third_party/BUILD | 7 ------- third_party/requirements.in | 1 - third_party/requirements.txt | 10 ---------- 3 files changed, 18 deletions(-) delete mode 100644 third_party/requirements.in delete mode 100644 third_party/requirements.txt diff --git a/third_party/BUILD b/third_party/BUILD index ab4e5723..bef325d4 100644 --- a/third_party/BUILD +++ b/third_party/BUILD @@ -7,13 +7,6 @@ alias( visibility = ["//:__pkg__"], ) -compile_pip_requirements( - name = "requirements", - extra_args = ["--resolver=backtracking"], - requirements_in = "requirements.in", - requirements_txt = "requirements.txt", -) - compile_pip_requirements( name = "mypy_requirements", extra_args = ["--resolver=backtracking"], diff --git a/third_party/requirements.in b/third_party/requirements.in deleted file mode 100644 index 9ef770fd..00000000 --- a/third_party/requirements.in +++ /dev/null @@ -1 +0,0 @@ -pcpp diff --git a/third_party/requirements.txt b/third_party/requirements.txt deleted file mode 100644 index df33303e..00000000 --- a/third_party/requirements.txt +++ /dev/null @@ -1,10 +0,0 @@ -# -# This file is autogenerated by pip-compile with Python 3.10 -# by the following command: -# -# bazel run //third_party:requirements.update -# -pcpp==1.30 \ - --hash=sha256:05fe08292b6da57f385001c891a87f40d6aa7f46787b03e8ba326d20a3297c6e \ - --hash=sha256:5af9fbce55f136d7931ae915fae03c34030a3b36c496e72d9636cedc8e2543a1 - # via -r third_party/requirements.in From 3dea4d717811c94b876723eaa7b28c2becd2d302 Mon Sep 17 00:00:00 2001 From: Martin Medler Date: Sat, 23 Dec 2023 09:14:05 +0100 Subject: [PATCH 2/4] Execute third_party tests --- .github/workflows/ci.yaml | 4 ++-- tests.sh | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b5c4ae8d..c7ee4a17 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -26,9 +26,9 @@ jobs: steps: - uses: actions/checkout@v4 - name: Unit tests - run: bazel test //src/... //test/aspect:all + run: bazel test -- //src/... //test/aspect:all //third_party/... - name: Execute Mypy - run: bazel build --config=mypy //src/... //test/aspect:all + run: bazel build --config=mypy -- //src/... //test/aspect:all integration-tests-aspect: runs-on: ubuntu-20.04 diff --git a/tests.sh b/tests.sh index 06b8f127..59b80aea 100755 --- a/tests.sh +++ b/tests.sh @@ -6,12 +6,12 @@ set -o nounset echo "" echo "Execute unit tests" echo "" -bazel test //src/... //test/aspect:all +bazel test -- //src/... //test/aspect:all //third_party/... echo "" echo "Executing mypy" -echo -bazel build --config=mypy //src/... //test/aspect:all +echo "" +bazel build --config=mypy -- //src/... //test/aspect:all echo "" echo "Execute integration tests - Aspect" From fcd03f2344b77a2414f7b3cf9d92fd6f8f901901 Mon Sep 17 00:00:00 2001 From: Martin Medler Date: Sat, 23 Dec 2023 09:25:23 +0100 Subject: [PATCH 3/4] Update CI config Python 3.10 is the default for the project for some time now. We no longer use Ubuntu 20.04 for development, thus we upgrade to the latest LTS. --- .github/workflows/ci.yaml | 30 +++++------------------------- README.md | 6 +++--- 2 files changed, 8 insertions(+), 28 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c7ee4a17..a390ab4d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -4,7 +4,7 @@ on: [ pull_request ] jobs: pre-commit: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - uses: snok/install-poetry@v1 @@ -14,7 +14,7 @@ jobs: installer-parallel: true - uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: "3.10" cache: 'poetry' - name: Install dependencies run: poetry install --no-interaction --no-root @@ -22,7 +22,7 @@ jobs: - uses: pre-commit/action@v3.0.0 fast-tests: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - name: Unit tests @@ -31,7 +31,7 @@ jobs: run: bazel build --config=mypy -- //src/... //test/aspect:all integration-tests-aspect: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 needs: [ pre-commit, fast-tests ] steps: - uses: actions/checkout@v4 @@ -39,7 +39,7 @@ jobs: run: ./test/aspect/execute_tests.py integration-tests-apply-fixes: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 needs: [ pre-commit, fast-tests ] steps: - run: | @@ -51,23 +51,3 @@ jobs: run: | export PATH=/tmp/bin:$PATH ./test/apply_fixes/execute_tests.py - - # tests: - # runs-on: ubuntu-20.04 - # steps: - # - uses: actions/checkout@v4 - # - uses: snok/install-poetry@v1 - # with: - # virtualenvs-create: true - # virtualenvs-in-project: true - # installer-parallel: true - # - uses: actions/setup-python@v5 - # with: - # python-version: 3.8 - # cache: 'poetry' - # - name: Install dependencies - # run: poetry install --no-interaction --no-root - # - name: Display Python version - # run: python -c "import sys; print(sys.version)" - # - name: Coverage - # run: poetry run pytest --cov --pylint diff --git a/README.md b/README.md index 611d95d5..21324345 100644 --- a/README.md +++ b/README.md @@ -246,9 +246,9 @@ Even if analysing the code works initially, it might break at any time if the or | Platform | Constraints | | ---------------- | ---------------------------------------------------------------------------------------------------------- | -| Operating system | No constraints by design. However, Ubuntu 20.04 is currently the only OS used for development and testing. | -| Python | Minimum version is 3.8. Multiple versions are tested. | -| Bazel | Minimum version is 5.4.0. Multiple versions are tested. | +| Operating system | No constraints by design. However, Ubuntu 22.04 is currently the only OS used for development and testing. | +| Python | Minimum version is 3.8. All newer major versions until 3.12 are tested. | +| Bazel | Minimum version is 5.4.0. Multiple newer versions are tested including rolling releases. | | Buildozer | No known limitations. Tests have been performed with 5.0.1. | # Alternatives to DWYU From 1a641689a1180932cbd01616eeeb3cd7f89f1abb Mon Sep 17 00:00:00 2001 From: Martin Medler Date: Sat, 23 Dec 2023 09:28:16 +0100 Subject: [PATCH 4/4] Update tested buildozer --- .github/workflows/ci.yaml | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a390ab4d..9fefa92e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -44,7 +44,7 @@ jobs: steps: - run: | mkdir --parents /tmp/bin - wget --no-verbose https://github.com/bazelbuild/buildtools/releases/download/v6.1.2/buildozer-linux-amd64 -O /tmp/bin/buildozer + wget --no-verbose https://github.com/bazelbuild/buildtools/releases/download/v6.4.0/buildozer-linux-amd64 -O /tmp/bin/buildozer chmod +x /tmp/bin/buildozer - uses: actions/checkout@v4 - name: Integration tests - Applying fixes diff --git a/README.md b/README.md index 21324345..69350b1f 100644 --- a/README.md +++ b/README.md @@ -249,7 +249,7 @@ Even if analysing the code works initially, it might break at any time if the or | Operating system | No constraints by design. However, Ubuntu 22.04 is currently the only OS used for development and testing. | | Python | Minimum version is 3.8. All newer major versions until 3.12 are tested. | | Bazel | Minimum version is 5.4.0. Multiple newer versions are tested including rolling releases. | -| Buildozer | No known limitations. Tests have been performed with 5.0.1. | +| Buildozer | No known limitations. Tests are performed with 6.4.0. | # Alternatives to DWYU