From 27f7b8fc7f8be4f52cd121863f9fe78b8c43b34e Mon Sep 17 00:00:00 2001 From: George Bisbas Date: Wed, 19 Jul 2023 20:17:24 +0300 Subject: [PATCH 1/3] ci: Refresh names in ci, add python3.11 --- .github/workflows/examples.yml | 2 +- .github/workflows/flake8.yml | 4 ++-- .github/workflows/pytest-core-nompi.yml | 12 ++++++------ .github/workflows/tutorials.yml | 18 +++++++++--------- devito/tools/utils.py | 4 ++-- versioneer.py | 2 +- 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index afcdcec615..f3e9ccce36 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -86,7 +86,7 @@ jobs: python examples/cfd/example_diffusion.py - name: Upload coverage to Codecov - if: matrix.name != 'pytest-docker-py37-gcc-omp' + if: matrix.name != 'pytest-docker-py39-gcc-omp' uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/flake8.yml b/.github/workflows/flake8.yml index 56c5a06a3e..0f0eb0d30f 100644 --- a/.github/workflows/flake8.yml +++ b/.github/workflows/flake8.yml @@ -21,10 +21,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up Python 3.7 + - name: Set up Python 3.9 uses: actions/setup-python@v4 with: - python-version: 3.7 + python-version: 3.9 - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/.github/workflows/pytest-core-nompi.yml b/.github/workflows/pytest-core-nompi.yml index 03a2b904a1..75eac997ad 100644 --- a/.github/workflows/pytest-core-nompi.yml +++ b/.github/workflows/pytest-core-nompi.yml @@ -30,9 +30,9 @@ jobs: matrix: name: [ - pytest-ubuntu-py39-gcc11-noomp, + pytest-ubuntu-py311-gcc11-noomp, pytest-ubuntu-py38-gcc12-omp, - pytest-ubuntu-py39-gcc7-omp, + pytest-ubuntu-py37-gcc7-omp, pytest-ubuntu-py310-gcc10-noomp, pytest-ubuntu-py38-gcc8-omp, pytest-ubuntu-py39-gcc9-omp, @@ -42,8 +42,8 @@ jobs: ] set: [base, adjoint] include: - - name: pytest-ubuntu-py39-gcc11-noomp - python-version: '3.9' + - name: pytest-ubuntu-py311-gcc11-noomp + python-version: '3.11' os: ubuntu-22.04 arch: "gcc-11" language: "C" @@ -56,8 +56,8 @@ jobs: language: "openmp" sympy: "1.10" - - name: pytest-ubuntu-py39-gcc7-omp - python-version: '3.9' + - name: pytest-ubuntu-py37-gcc7-omp + python-version: '3.7' os: ubuntu-20.04 arch: "gcc-7" language: "openmp" diff --git a/.github/workflows/tutorials.yml b/.github/workflows/tutorials.yml index b869aea7c8..288be54066 100644 --- a/.github/workflows/tutorials.yml +++ b/.github/workflows/tutorials.yml @@ -22,31 +22,31 @@ jobs: env: DEVITO_ARCH: "${{ matrix.compiler }}" DEVITO_LANGUAGE: ${{ matrix.language }} - PYTHON_VERSION: "3.7" + PYTHON_VERSION: "3.9" strategy: # Prevent all build to stop if a single one fails fail-fast: false matrix: name: [ - tutos-ubuntu-gcc-py37, - tutos-osx-gcc-py37, - tutos-osx-clang-py37, + tutos-ubuntu-gcc-py39, + tutos-osx-gcc-py39, + tutos-osx-clang-py39, tutos-docker-gcc-py39 ] include: - - name: tutos-ubuntu-gcc-py37 + - name: tutos-ubuntu-gcc-py39 os: ubuntu-latest compiler: gcc language: "openmp" - - name: tutos-osx-gcc-py37 + - name: tutos-osx-gcc-py39 os: macos-latest compiler: gcc-11 language: "openmp" - - name: tutos-osx-clang-py37 + - name: tutos-osx-clang-py39 os: macos-latest compiler: clang language: "C" @@ -60,11 +60,11 @@ jobs: - name: Checkout devito uses: actions/checkout@v3 - - name: Set up Python 3.7 + - name: Set up Python 3.9 if: "!contains(matrix.name, 'docker')" uses: actions/setup-python@v4 with: - python-version: 3.7 + python-version: 3.9 - uses: maxim-lobanov/setup-xcode@v1 if: runner.os == 'macOS' diff --git a/devito/tools/utils.py b/devito/tools/utils.py index e1cb82445b..777859feb0 100644 --- a/devito/tools/utils.py +++ b/devito/tools/utils.py @@ -299,6 +299,6 @@ def humanbytes(B): elif MB <= B < GB: return '%d MB' % round(B / MB) elif GB <= B < TB: - return '%d GB' % round(B / GB) + return '%.1f GB' % round(B / GB, 1) elif TB <= B: - return '%d TB' % round(B / TB) + return '%.1f TB' % round(B / TB, 1) diff --git a/versioneer.py b/versioneer.py index f53dc085b2..07792b516e 100644 --- a/versioneer.py +++ b/versioneer.py @@ -10,7 +10,7 @@ * https://github.com/python-versioneer/python-versioneer * Brian Warner * License: Public Domain (CC0-1.0) -* Compatible with: Python 3.7, 3.8, 3.9, 3.10 and pypy3 +* Compatible with: Python 3.7, 3.8, 3.9, 3.10, 3.11 and pypy3 * [![Latest Version][pypi-image]][pypi-url] * [![Build Status][travis-image]][travis-url] From ebe91fea52d469d2e940060c2501543e49785202 Mon Sep 17 00:00:00 2001 From: George Bisbas Date: Wed, 19 Jul 2023 20:20:17 +0300 Subject: [PATCH 2/3] ci: Drop codecov conditional --- .github/workflows/examples.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index f3e9ccce36..deac69f1b0 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -86,7 +86,6 @@ jobs: python examples/cfd/example_diffusion.py - name: Upload coverage to Codecov - if: matrix.name != 'pytest-docker-py39-gcc-omp' uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} From cfc2710414ab8f32aa38554ccba883c94f9556ed Mon Sep 17 00:00:00 2001 From: George Bisbas Date: Thu, 20 Jul 2023 11:51:35 +0300 Subject: [PATCH 3/3] misc: Add decimal point to TB --- devito/tools/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devito/tools/utils.py b/devito/tools/utils.py index 777859feb0..16f0987930 100644 --- a/devito/tools/utils.py +++ b/devito/tools/utils.py @@ -301,4 +301,4 @@ def humanbytes(B): elif GB <= B < TB: return '%.1f GB' % round(B / GB, 1) elif TB <= B: - return '%.1f TB' % round(B / TB, 1) + return '%.2f TB' % round(B / TB, 1)