From 59178b174fd5f12c8c2f6e210c2379ff181ff904 Mon Sep 17 00:00:00 2001 From: Michal Klein <46717574+michalk8@users.noreply.github.com> Date: Wed, 7 Feb 2024 21:43:42 +0100 Subject: [PATCH 1/5] Enable 3.12 CI --- .github/workflows/ci.yml | 2 +- tox.ini | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9b0f596..925a9f3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,7 +49,7 @@ jobs: fail-fast: false max-parallel: 5 matrix: - python: ['3.8', '3.10', '3.11'] + python: ['3.8', '3.10', '3.11', '3.12'] os: [ubuntu-latest] slepc: ['noslepc'] include: diff --git a/tox.ini b/tox.ini index 7aa6907..0168a8d 100644 --- a/tox.ini +++ b/tox.ini @@ -79,7 +79,7 @@ isolated_build = True envlist = covclean lint - py{3.8,3.9,3.10,3.11}-{slepc,noslepc} + py{3.8,3.9,3.10,3.11,3.12}-{slepc,noslepc} coverage readme check-docs @@ -113,7 +113,7 @@ deps = coverage diff_cover skip_install = true -depends = py{3.8,3.9,3.10,3.11} +depends = py{3.8,3.9,3.10,3.11,3.12} parallel_show_output = True commands = coverage report --omit="tox/*" From 3150de7f9f83016923524487a2d178b305a65f17 Mon Sep 17 00:00:00 2001 From: Michal Klein <46717574+michalk8@users.noreply.github.com> Date: Wed, 7 Feb 2024 21:49:11 +0100 Subject: [PATCH 2/5] Add `lint.yml` --- .github/workflows/ci.yml | 27 +------------------------ .github/workflows/lint.yml | 40 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 26 deletions(-) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 925a9f3..d493cfa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,31 +18,6 @@ concurrency: jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - - uses: actions/cache@v3 - with: - path: ~/.cache/pre-commit - key: precommit-${{ env.pythonLocation }}-${{ hashFiles('**/.pre-commit-config.yaml') }} - - - name: Install dependencies - run: | - sudo apt-get update -y - sudo apt install libenchant-2-dev pandoc - python -m pip install --upgrade pip - python -m pip install tox - - - name: Linting - run: | - tox -e lint,check-docs,readme - test: runs-on: ${{ matrix.os }} strategy: @@ -89,7 +64,7 @@ jobs: verbose: true deploy: - needs: [lint, test] + needs: [test] if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') runs-on: ubuntu-latest steps: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..4d77eff --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,40 @@ +name: Lint + +on: + schedule: + - cron: 00 00 * * 1 # run every Monday at 00:00 + push: + branches: [main] + pull_request: + branches: [main] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.10 + uses: actions/setup-python@v4 + with: + python-version: '3.10' + + - name: Cache pre-commit + uses: actions/cache@v3 + with: + path: ~/.cache/pre-commit + key: pre-commit-${{ env.pythonLocation }}-${{ hashFiles('**/.pre-commit-config.yaml') }} + + - name: Install dependencies + run: | + sudo apt-get update -y + sudo apt install libenchant-2-dev pandoc + python -m pip install --upgrade pip + python -m pip install tox + + - name: Linting + run: |- + tox -e lint,check-docs,readme From 3a2dbc1bebf51df0a35a68738273ff9656b80d2f Mon Sep 17 00:00:00 2001 From: Michal Klein <46717574+michalk8@users.noreply.github.com> Date: Wed, 7 Feb 2024 21:53:59 +0100 Subject: [PATCH 3/5] Switch to `publish.yml` --- .github/workflows/ci.yml | 37 ++--------------------------------- .github/workflows/lint.yml | 2 +- .github/workflows/publish.yml | 33 +++++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 36 deletions(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d493cfa..51674ed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,25 +4,19 @@ on: schedule: - cron: 00 00 * * 1 # run every Monday at 00:00 push: - branches: - - main - tags: - - v[0-9]+.[0-9]+.[0-9]+ + branches: [main] pull_request: - branches: - - main + branches: [main] concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true - jobs: test: runs-on: ${{ matrix.os }} strategy: fail-fast: false - max-parallel: 5 matrix: python: ['3.8', '3.10', '3.11', '3.12'] os: [ubuntu-latest] @@ -62,30 +56,3 @@ jobs: env_vars: OS,PYTHON fail_ci_if_error: false verbose: true - - deploy: - needs: [test] - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - name: Install pypa/build - run: | - python -m pip install --upgrade pip - pip install build - - name: Build a binary wheel and a source tarball - run: | - python -m build --sdist --wheel --outdir dist/ - - - name: Publish package on PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: __token__ - password: ${{ secrets.PYPI_PASSWORD }} - skip_existing: true - verify-metadata: true - verbose: true diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 4d77eff..7cad946 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -36,5 +36,5 @@ jobs: python -m pip install tox - name: Linting - run: |- + run: | tox -e lint,check-docs,readme diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..3ead81d --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,33 @@ +name: Upload package + +on: + release: + types: [created] + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.10' + + - name: Install pip dependencies + run: | + python -m pip install --upgrade pip + pip install build + + - name: Build package + run: | + python -m build --sdist --wheel --outdir dist/ + + - name: Publish package on PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_PASSWORD }} + skip_existing: true + verify-metadata: true + verbose: true From 5eb74853f6d8abe65226a88918ebd6258dd8b5a7 Mon Sep 17 00:00:00 2001 From: Michal Klein <46717574+michalk8@users.noreply.github.com> Date: Wed, 7 Feb 2024 21:56:21 +0100 Subject: [PATCH 4/5] Update RTD config --- .readthedocs.yml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index e359638..a30a4ce 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,21 +1,17 @@ version: 2 +build: + os: ubuntu-22.04 + tools: + python: '3.10' + sphinx: builder: html configuration: docs/source/conf.py fail_on_warning: false -formats: -- htmlzip -- pdf - -build: - image: latest - python: - version: 3.8 install: - method: pip path: . - extra_requirements: - - docs + extra_requirements: [docs] From e56b28a1037aec3aec76094157167ad9222fb3bf Mon Sep 17 00:00:00 2001 From: Bernhard Reuter Date: Mon, 22 Apr 2024 18:15:50 +0200 Subject: [PATCH 5/5] dummy change --- .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 51674ed..f384b14 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,7 @@ name: CI on: schedule: - - cron: 00 00 * * 1 # run every Monday at 00:00 + - cron: 00 00 * * 1 # Run every Monday at 00:00 push: branches: [main] pull_request: