Skip to content

Commit a62165e

Browse files
Apply migration from 0.14.0 to 0.16.0
=== v0.15.0 ========================================================= Script URL: https://raw.githubusercontent.com/frequenz-floss/frequenz-repo-config-python/v0.15.0/cookiecutter/migrate.py ======================================================================== Migrating workflows to use ubuntu-slim runner for lightweight jobs... Updated .github/workflows/ci.yaml: migrated job nox-all to ubuntu-slim Updated .github/workflows/ci.yaml: migrated job test-installation-all to ubuntu-slim Updated .github/workflows/ci.yaml: migrated job create-github-release to ubuntu-slim Updated .github/workflows/ci.yaml: migrated job publish-to-pypi to ubuntu-slim Updated .github/workflows/release-notes-check.yml: migrated job check-release-notes to ubuntu-slim Updated .github/workflows/dco-merge-queue.yml: migrated job DCO to ubuntu-slim Updated .github/workflows/labeler.yml: migrated job Label to ubuntu-slim ======================================================================== Migrating pyproject license metadata to SPDX format... Updated pyproject.toml: migrated license metadata ======================================================================== Adding flake8-datetimez plugin to dev-flake8 dependencies... Updated pyproject.toml: added flake8-datetimez plugin ======================================================================== Fixing dependabot repo-config and mkdocstrings patterns... Skipped .github/dependabot.yml: repo-config patterns already updated Skipped .github/dependabot.yml: mkdocstrings patterns already updated Skipped .github/dependabot.yml (already up to date) ======================================================================== Migrating auto-dependabot workflow to use GitHub App token... Replacing .github/workflows/auto-dependabot.yaml with updated workflow (overwriting any local changes) ======================================================================== Migrating the CI workflows to use a platform matrix... - .github/workflows/ci.yaml Migrated arch+os matrix to platform ======================================================================== Installing repo-config migration workflow... Replacing .github/workflows/repo-config-migration.yaml with updated workflow (overwriting any local changes) Updated .github/workflows/auto-dependabot.yaml: added repo-config group exclusion ======================================================================== Updating 'Protect version branches' GitHub ruleset... Ruleset 'Protect version branches' is already up to date ======================================================================== ✅ Migration script finished successfully ✅ === v0.16.0 ========================================================= Script URL: https://raw.githubusercontent.com/frequenz-floss/frequenz-repo-config-python/v0.16.0/cookiecutter/migrate.py ======================================================================== Fixing repo-config migration merge queue trigger... Updated .github/workflows/repo-config-migration.yaml: added merge_group trigger ======================================================================== Fixing mkdocstrings-python v2 paths for api repos... Skipping mkdocs.yml (not an api project) ======================================================================== Migrating protolint and publish-to-pypi runners to ubuntu-24.04... Skipping protolint runner migration (not an api project) Updated .github/workflows/ci.yaml: migrated runner for job publish-to-pypi ======================================================================== Updating 'Protect version branches' GitHub ruleset... Ruleset 'Protect version branches' is already up to date ======================================================================== ✅ Migration script finished successfully ✅ The migration completed successfully.
1 parent a1c0438 commit a62165e

7 files changed

Lines changed: 19 additions & 31 deletions

File tree

.github/workflows/auto-dependabot.yaml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,32 +12,23 @@ on:
1212
pull_request_target:
1313

1414
permissions:
15-
# Read repository contents and Dependabot metadata used by the nested action.
1615
contents: read
17-
# The nested action also uses `github.token` internally for PR operations.
1816
pull-requests: write
1917

2018
jobs:
2119
auto-merge:
2220
name: Auto-merge Dependabot PR
2321
if: >
2422
github.actor == 'dependabot[bot]' &&
25-
!contains(github.event.pull_request.title, 'the repo-config group') &&
26-
!contains(github.event.pull_request.title, 'Bump black from ')
23+
!contains(github.event.pull_request.title, 'the repo-config group')
2724
runs-on: ubuntu-slim
2825
steps:
2926
- name: Generate GitHub App token
3027
id: app-token
31-
uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3.0.0
28+
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
3229
with:
3330
app-id: ${{ secrets.FREQUENZ_AUTO_DEPENDABOT_APP_ID }}
3431
private-key: ${{ secrets.FREQUENZ_AUTO_DEPENDABOT_APP_PRIVATE_KEY }}
35-
# Merge Dependabot PRs.
36-
permission-contents: write
37-
# Create the auto-merged label if it does not exist.
38-
permission-issues: write
39-
# Approve PRs, add labels, and enable auto-merge.
40-
permission-pull-requests: write
4132

4233
- name: Auto-merge Dependabot PR
4334
uses: frequenz-floss/dependabot-auto-approve@e943399cc9d76fbb6d7faae446cd57301d110165 # v1.5.0

.github/workflows/ci.yaml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,9 @@ jobs:
2828
strategy:
2929
fail-fast: false
3030
matrix:
31-
arch:
32-
- amd64
33-
- arm
34-
os:
31+
platform:
3532
- ubuntu-24.04
33+
- ubuntu-24.04-arm
3634
python:
3735
- "3.11"
3836
- "3.12"
@@ -41,7 +39,7 @@ jobs:
4139
# that uses the same venv to run multiple linting sessions
4240
- "ci_checks_max"
4341
- "pytest_min"
44-
runs-on: ${{ matrix.os }}${{ matrix.arch != 'amd64' && format('-{0}', matrix.arch) || '' }}
42+
runs-on: ${{ matrix.platform }}
4543

4644
steps:
4745
- name: Run nox
@@ -60,7 +58,7 @@ jobs:
6058
needs: ["nox"]
6159
# We skip this job only if nox was also skipped
6260
if: always() && needs.nox.result != 'skipped'
63-
runs-on: ubuntu-24.04
61+
runs-on: ubuntu-slim
6462
env:
6563
DEPS_RESULT: ${{ needs.nox.result }}
6664
steps:
@@ -105,15 +103,13 @@ jobs:
105103
strategy:
106104
fail-fast: false
107105
matrix:
108-
arch:
109-
- amd64
110-
- arm
111-
os:
106+
platform:
112107
- ubuntu-24.04
108+
- ubuntu-24.04-arm
113109
python:
114110
- "3.11"
115111
- "3.12"
116-
runs-on: ${{ matrix.os }}${{ matrix.arch != 'amd64' && format('-{0}', matrix.arch) || '' }}
112+
runs-on: ${{ matrix.platform }}
117113

118114
steps:
119115
- name: Setup Git
@@ -161,7 +157,7 @@ jobs:
161157
needs: ["test-installation"]
162158
# We skip this job only if test-installation was also skipped
163159
if: always() && needs.test-installation.result != 'skipped'
164-
runs-on: ubuntu-24.04
160+
runs-on: ubuntu-slim
165161
env:
166162
DEPS_RESULT: ${{ needs.test-installation.result }}
167163
steps:
@@ -276,7 +272,7 @@ jobs:
276272
# discussions to create the release announcement in the discussion forums
277273
contents: write
278274
discussions: write
279-
runs-on: ubuntu-24.04
275+
runs-on: ubuntu-slim
280276
steps:
281277
- name: Download distribution files
282278
uses: actions/download-artifact@v8

.github/workflows/dco-merge-queue.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55

66
jobs:
77
DCO:
8-
runs-on: ubuntu-latest
8+
runs-on: ubuntu-slim
99
if: ${{ github.actor != 'dependabot[bot]' }}
1010
steps:
1111
- run: echo "This DCO job runs on merge_queue event and doesn't check PR contents"

.github/workflows/labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
permissions:
88
contents: read
99
pull-requests: write
10-
runs-on: ubuntu-latest
10+
runs-on: ubuntu-slim
1111
steps:
1212
- name: Labeler
1313
# XXX: !!! SECURITY WARNING !!!

.github/workflows/release-notes-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616
jobs:
1717
check-release-notes:
1818
name: Check release notes are updated
19-
runs-on: ubuntu-latest
19+
runs-on: ubuntu-slim
2020
steps:
2121
- name: Check for a release notes update
2222
if: github.event_name == 'pull_request'

.github/workflows/repo-config-migration.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ jobs:
4242
steps:
4343
- name: Generate token
4444
id: create-app-token
45-
uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3.0.0
45+
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
4646
with:
4747
app-id: ${{ secrets.FREQUENZ_AUTO_DEPENDABOT_APP_ID }}
4848
private-key: ${{ secrets.FREQUENZ_AUTO_DEPENDABOT_APP_PRIVATE_KEY }}
4949
- name: Migrate
50-
uses: frequenz-floss/gh-action-dependabot-migrate@b389f72f9282346920150a67495efbae450ac07b # v1.1.0
50+
uses: frequenz-floss/gh-action-dependabot-migrate@07dc7e74726498c50726a80cc2167a04d896508f # v1.0.0
5151
with:
5252
script-url-template: >-
5353
https://raw.githubusercontent.com/frequenz-floss/frequenz-repo-config-python/{version}/cookiecutter/migrate.py

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ build-backend = "setuptools.build_meta"
1313
name = "frequenz-client-common"
1414
description = "Common code and utilities for Frequenz API clients"
1515
readme = "README.md"
16-
license = { text = "MIT" }
16+
license = "MIT"
17+
license-files = ["LICENSE"]
1718
keywords = ["frequenz", "python", "lib", "library", "client-common"]
1819
classifiers = [
1920
"Development Status :: 3 - Alpha",
2021
"Intended Audience :: Developers",
21-
"License :: OSI Approved :: MIT License",
2222
"Programming Language :: Python :: 3",
2323
"Programming Language :: Python :: 3 :: Only",
2424
"Topic :: Software Development :: Libraries",
@@ -40,6 +40,7 @@ email = "floss@frequenz.com"
4040
[project.optional-dependencies]
4141
dev-flake8 = [
4242
"flake8 == 7.3.0",
43+
"flake8-datetimez == 20.10.0",
4344
"flake8-docstrings == 1.7.0",
4445
"flake8-pyproject == 1.2.4", # For reading the flake8 config from pyproject.toml
4546
"pydoclint == 0.8.3",

0 commit comments

Comments
 (0)