From 417abd4811c146708b058b2f5845f935f2100a57 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Mon, 16 Jan 2023 09:33:20 +0800 Subject: [PATCH 1/6] Update CI config to support recent Python versions. --- .github/workflows/ci.yml | 40 +++++++++++++--------------------------- changes/template.rst | 10 ++++++++-- setup.cfg | 8 +++++--- tox.ini | 6 +++--- 4 files changed, 29 insertions(+), 35 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 87a096e..acbfeb8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,11 +17,11 @@ jobs: - 'towncrier-check' - 'package' steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 - name: Set up Python - uses: actions/setup-python@v1 + uses: actions/setup-python@v4.5.0 with: - python-version: 3.8 + python-version: 3.X - name: Install dependencies run: | python -m pip install --upgrade pip @@ -31,37 +31,23 @@ jobs: run: | tox -e ${{ matrix.task }} - smoke: - name: Smoke test (3.6) - needs: beefore - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: Set up Python 3.6 - uses: actions/setup-python@v1 - with: - python-version: 3.6 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install --upgrade setuptools - python -m pip install tox - - name: Test - run: | - tox -e py - python-versions: name: Python compatibility test - needs: smoke + needs: beefore runs-on: ubuntu-latest strategy: - max-parallel: 4 matrix: - python-version: [3.7, 3.8, 3.9] + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12-dev"] + include: + - experimental: false + + - python-version: "3.12-dev" + experimental: true + steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v4.5.0 with: python-version: ${{ matrix.python-version }} - name: Install dependencies diff --git a/changes/template.rst b/changes/template.rst index 7575210..9c7243e 100644 --- a/changes/template.rst +++ b/changes/template.rst @@ -1,10 +1,11 @@ {% for section, _ in sections.items() %} {% set underline = underlines[0] %}{% if section %}{{section}} {{ underline * section|length }}{% set underline = underlines[1] %} + {% endif %} + {% if sections[section] %} {% for category, val in definitions.items() if category in sections[section]%} - {{ definitions[category]['name'] }} {{ underline * definitions[category]['name']|length }} @@ -12,15 +13,20 @@ {% for text, values in sections[section][category].items() %} * {{ text }} ({{ values|join(', ') }}) {% endfor %} + {% else %} * {{ sections[section][category]['']|join(', ') }} + {% endif %} {% if sections[section][category]|length == 0 %} No significant changes. + +{% else %} {% endif %} + {% endfor %} {% else %} - No significant changes. + {% endif %} {% endfor %} diff --git a/setup.cfg b/setup.cfg index 62ebdce..64da470 100644 --- a/setup.cfg +++ b/setup.cfg @@ -13,10 +13,12 @@ classifiers= License :: OSI Approved :: BSD License Operating System :: OS Independent Programming Language :: Python :: 3 - Programming Language :: Python :: 3.5 - Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.11 + Programming Language :: Python :: 3.12 Programming Language :: Python :: 3 :: Only Topic :: Software Development Topic :: Software Development :: User Interfaces @@ -28,7 +30,7 @@ long_description = file: README.rst long_description_content_type = text/x-rst [options] -python_requires = >= 3.6 +python_requires = >= 3.7 packages = find: package_dir = = src diff --git a/tox.ini b/tox.ini index c551962..bc12d4a 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ # and then run "tox" from this directory. [tox] -envlist = flake8,towncrier-check,package,py{36,37,38,39} +envlist = flake8,towncrier-check,package,py{37,38,39,310,311,312} skip_missing_interpreters = true [testenv] @@ -25,12 +25,12 @@ skip_install = True deps = {[testenv:towncrier]deps} commands = - python -m towncrier.check + python -m towncrier.check --compare-with origin/main [testenv:towncrier] skip_install = True deps = - towncrier >= 18.5.0 + towncrier ~= 22.8 commands = towncrier {posargs} From 879fbf38f80f8eb2474bc52b03dc87c7ca47813b Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Mon, 16 Jan 2023 09:46:15 +0800 Subject: [PATCH 2/6] Add dependabot config. --- .github/dependabot.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..3b302bb --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,18 @@ + +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + # Check for updates on Sunday, 8PM UTC + interval: "weekly" + day: "sunday" + time: "20:00" + + - package-ecosystem: "pip" + directory: "/" + schedule: + # Check for updates on Sunday, 8PM UTC + interval: "weekly" + day: "sunday" + time: "20:00" From 3aeff4e346e18c6e9bd904c7a02737518d89e224 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Mon, 16 Jan 2023 09:47:23 +0800 Subject: [PATCH 3/6] Ensure main branch is available. --- .github/workflows/ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index acbfeb8..637e6b9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,14 @@ jobs: - 'towncrier-check' - 'package' steps: + # Fetch main branch for comparison, then check out current branch. - uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: main + - uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Set up Python uses: actions/setup-python@v4.5.0 with: From b1d16211f310a60746529d9c0c425cb8ff90be3a Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Mon, 16 Jan 2023 09:47:39 +0800 Subject: [PATCH 4/6] Add dependabot changenote workflow. --- .github/workflows/dependabot-changenote.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/workflows/dependabot-changenote.yml diff --git a/.github/workflows/dependabot-changenote.yml b/.github/workflows/dependabot-changenote.yml new file mode 100644 index 0000000..17848bc --- /dev/null +++ b/.github/workflows/dependabot-changenote.yml @@ -0,0 +1,12 @@ +name: Dependabot Change Note + +on: + push: + branches: + - 'dependabot/**' + +jobs: + changenote: + name: Dependabot Change Note + uses: beeware/.github/.github/workflows/dependabot-changenote.yml@main + secrets: inherit From 98bc71160b02e90f21842fb4e4abbed4367695bf Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Mon, 16 Jan 2023 09:54:41 +0800 Subject: [PATCH 5/6] Add changenote. --- changes/30.misc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changes/30.misc.rst diff --git a/changes/30.misc.rst b/changes/30.misc.rst new file mode 100644 index 0000000..0f19868 --- /dev/null +++ b/changes/30.misc.rst @@ -0,0 +1 @@ +A range of README and CI configuration changes were made. From 6a6e793b9aee1c9cb7deb1fb7c8d86a89be8ca47 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Mon, 16 Jan 2023 11:10:46 +0800 Subject: [PATCH 6/6] Ensure CI runs on dependabot updates. --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 637e6b9..85fbbd4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,6 +4,7 @@ on: push: branches: - main + workflow_call: jobs: beefore: