From b827ca212b29ab30298e0efc8622497f8a8f9dce Mon Sep 17 00:00:00 2001 From: Paul Natsuo Kishimoto Date: Mon, 29 Jan 2024 16:12:50 +0100 Subject: [PATCH 1/5] Bump first-party actions used in CI workflows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Suppress warnings about Node.js 16 deprecation. - actions/checkout v3 → v4 - actions/setup-python v4 → v5 --- .github/workflows/pytest.yaml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 5937790ba..7629b1a10 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -51,14 +51,12 @@ jobs: # name: ${{ matrix.os }}-py${{ matrix.python-version }}-pandas${{ matrix.pandas-version }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: ${{ env.depth }} + fetch-tags: true - - name: Fetch tags (for setuptools-scm) - run: git fetch --tags --depth=${{ env.depth }} - - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} cache: pip @@ -135,8 +133,8 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: "3.x" From 51117c984f1fc7f58af04b2c92062612a8f8235d Mon Sep 17 00:00:00 2001 From: Paul Natsuo Kishimoto Date: Mon, 29 Jan 2024 16:13:52 +0100 Subject: [PATCH 2/5] Delete push/main trigger from "publish" CI workflow Analogous to #515 --- .github/workflows/publish.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index f771d9581..ab51912a3 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -2,7 +2,6 @@ name: Build package / publish on: push: - branches: [ main ] tags: [ "v*" ] release: types: [ published ] From 3d49fdbae2caf0f9af571037336da3f304ed4a46 Mon Sep 17 00:00:00 2001 From: Paul Natsuo Kishimoto Date: Mon, 29 Jan 2024 16:15:19 +0100 Subject: [PATCH 3/5] Add concurrency setting to "publish" CI workflow Avoid duplicate jobs on release. --- .github/workflows/publish.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index ab51912a3..fb7d78149 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -9,6 +9,9 @@ on: pull_request: branches: [ main ] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: publish: From b47c224879321c376cf6425919a26abe74f49a30 Mon Sep 17 00:00:00 2001 From: Paul Natsuo Kishimoto Date: Mon, 29 Jan 2024 16:16:44 +0100 Subject: [PATCH 4/5] Replace black with ruff format (iiasa/message_ix#772) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Bump mypy version to 1.8.0. - Bump ruff version 0.0.287 → 0.1.14. --- .pre-commit-config.yaml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ccc97562f..b15535660 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,7 +10,7 @@ repos: language: python entry: bash -c ". ${PRE_COMMIT_MYPY_VENV:-/dev/null}/bin/activate 2>/dev/null; mypy $0 $@" additional_dependencies: - - mypy + - mypy >= 1.8.0 - genno - GitPython - nbclient @@ -18,11 +18,9 @@ repos: - sphinx - xarray args: ["."] -- repo: https://github.com/psf/black - rev: 23.7.0 - hooks: - - id: black - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.0.287 + rev: v0.1.14 hooks: - id: ruff + - id: ruff-format + args: [ --check ] From 8679d008ba8b7bf83ef230b3a2b45241b2c7c162 Mon Sep 17 00:00:00 2001 From: Paul Natsuo Kishimoto Date: Mon, 29 Jan 2024 16:25:36 +0100 Subject: [PATCH 5/5] Apply `ruff format` to 1 file --- ixmp/tests/test_model.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ixmp/tests/test_model.py b/ixmp/tests/test_model.py index 58751f1f6..d9fd14ba2 100644 --- a/ixmp/tests/test_model.py +++ b/ixmp/tests/test_model.py @@ -155,8 +155,6 @@ def test_error_message(self, test_data_path, test_mp): For details, see the terminal output above, plus: Listing : {} Log file : {} -Input data: {}""".format( - *paths - ), +Input data: {}""".format(*paths), ): s.solve(model_file=test_data_path / "_abort.gms", use_temp_dir=False)