Skip to content

Commit c7e7aec

Browse files
Apply migration from 0.13.8 to 0.16.0
=== v0.14.0 ========================================================= Script URL: https://raw.githubusercontent.com/frequenz-floss/frequenz-repo-config-python/v0.14.0/cookiecutter/migrate.py ======================================================================== Creating Dependabot auto-merge workflow... Created/Updated Dependabot auto-merge workflow at .github/workflows/auto-dependabot.yaml ======================================================================== Disabling CODEOWNERS review requirement in GitHub ruleset... Default branch: v1.x.x Found ruleset ID: 4517478 CODEOWNERS review requirement already disabled. ======================================================================== Updating the mkdocs.yml for mkdocstrings-python v2 compatibility... ======================================================================== Migration script finished. Remember to follow any manual instructions. ======================================================================== === 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... >>> Could not find `frequenz-repo-config*` pattern in .github/dependabot.yml. Please replace it with explicit entries for `frequenz-repo-config`, `frequenz-repo-config[actor]`, and `frequenz-repo-config[extra-lint-examples]`. 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... Updated ruleset 'Protect version branches': add 'Migrate Repo Config' status check ======================================================================== ⚠️⚠️⚠️ Remember to check the manual steps: ⚠️⚠️⚠️ ⚠️⚠️⚠️ 1. Could not find `frequenz-repo-config*` pattern in .github/dependabot.yml. Please replace it with explicit entries for `frequenz-repo-config`, `frequenz-repo-config[actor]`, and `frequenz-repo-config[extra-lint-examples]`. ❌ Migration script finished but requires manual intervention ❌ === 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 but requires manual intervention.
1 parent 3e40077 commit c7e7aec

File tree

7 files changed

+48
-28
lines changed

7 files changed

+48
-28
lines changed
Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,40 @@
1-
name: Dependabot Auto Manage
2-
on: pull_request
1+
name: Auto-merge Dependabot PR
2+
3+
on:
4+
# XXX: !!! SECURITY WARNING !!!
5+
# pull_request_target has write access to the repo, and can read secrets. We
6+
# need to audit any external actions executed in this workflow and make sure no
7+
# checked out code is run (not even installing dependencies, as installing
8+
# dependencies usually can execute pre/post-install scripts). We should also
9+
# only use hashes to pick the action to execute (instead of tags or branches).
10+
# For more details read:
11+
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
12+
pull_request_target:
313

414
permissions:
5-
contents: write
15+
contents: read
616
pull-requests: write
717

818
jobs:
9-
dependabot:
10-
runs-on: ubuntu-latest
11-
if: github.actor == 'dependabot[bot]'
19+
auto-merge:
20+
name: Auto-merge Dependabot PR
21+
if: >
22+
github.actor == 'dependabot[bot]' &&
23+
!contains(github.event.pull_request.title, 'the repo-config group')
24+
runs-on: ubuntu-slim
1225
steps:
13-
- uses: frequenz-floss/dependabot-auto-approve@e943399cc9d76fbb6d7faae446cd57301d110165 # v1.5.0
26+
- name: Generate GitHub App token
27+
id: app-token
28+
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
29+
with:
30+
app-id: ${{ secrets.FREQUENZ_AUTO_DEPENDABOT_APP_ID }}
31+
private-key: ${{ secrets.FREQUENZ_AUTO_DEPENDABOT_APP_PRIVATE_KEY }}
32+
33+
- name: Auto-merge Dependabot PR
34+
uses: frequenz-floss/dependabot-auto-approve@e943399cc9d76fbb6d7faae446cd57301d110165 # v1.5.0
1435
with:
36+
github-token: ${{ steps.app-token.outputs.token }}
1537
dependency-type: 'all'
1638
auto-merge: 'true'
17-
add-label: 'auto-merged'
39+
merge-method: 'merge'
40+
add-label: 'tool:auto-merged'

.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"
@@ -42,7 +40,7 @@ jobs:
4240
# that uses the same venv to run multiple linting sessions
4341
- "ci_checks_max"
4442
- "pytest_min"
45-
runs-on: ${{ matrix.os }}${{ matrix.arch != 'amd64' && format('-{0}', matrix.arch) || '' }}
43+
runs-on: ${{ matrix.platform }}
4644

4745
steps:
4846
- name: Run nox
@@ -61,7 +59,7 @@ jobs:
6159
needs: ["nox"]
6260
# We skip this job only if nox was also skipped
6361
if: always() && needs.nox.result != 'skipped'
64-
runs-on: ubuntu-24.04
62+
runs-on: ubuntu-slim
6563
env:
6664
DEPS_RESULT: ${{ needs.nox.result }}
6765
steps:
@@ -106,16 +104,14 @@ jobs:
106104
strategy:
107105
fail-fast: false
108106
matrix:
109-
arch:
110-
- amd64
111-
- arm
112-
os:
107+
platform:
113108
- ubuntu-24.04
109+
- ubuntu-24.04-arm
114110
python:
115111
- "3.11"
116112
- "3.12"
117113
- "3.13"
118-
runs-on: ${{ matrix.os }}${{ matrix.arch != 'amd64' && format('-{0}', matrix.arch) || '' }}
114+
runs-on: ${{ matrix.platform }}
119115

120116
steps:
121117
- name: Setup Git
@@ -163,7 +159,7 @@ jobs:
163159
needs: ["test-installation"]
164160
# We skip this job only if test-installation was also skipped
165161
if: always() && needs.test-installation.result != 'skipped'
166-
runs-on: ubuntu-24.04
162+
runs-on: ubuntu-slim
167163
env:
168164
DEPS_RESULT: ${{ needs.test-installation.result }}
169165
steps:
@@ -278,7 +274,7 @@ jobs:
278274
# discussions to create the release announcement in the discussion forums
279275
contents: write
280276
discussions: write
281-
runs-on: ubuntu-24.04
277+
runs-on: ubuntu-slim
282278
steps:
283279
- name: Download distribution files
284280
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'

mkdocs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ plugins:
9999
default_handler: python
100100
handlers:
101101
python:
102+
paths: ["src"]
102103
options:
103-
paths: ["src"]
104104
docstring_section_style: spacy
105105
inherited_members: true
106106
merge_init_into_class: false
@@ -112,7 +112,7 @@ plugins:
112112
show_source: true
113113
show_symbol_type_toc: true
114114
signature_crossrefs: true
115-
import:
115+
inventories:
116116
# See https://mkdocstrings.github.io/python/usage/#import for details
117117
- https://docs.python.org/3/objects.inv
118118
- https://frequenz-floss.github.io/frequenz-channels-python/v1.0/objects.inv

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ build-backend = "setuptools.build_meta"
1313
name = "frequenz-dispatch"
1414
description = "A highlevel interface for the dispatch API"
1515
readme = "README.md"
16-
license = { text = "MIT" }
16+
license = "MIT"
17+
license-files = ["LICENSE"]
1718
keywords = [
1819
"frequenz",
1920
"python",
@@ -26,7 +27,6 @@ keywords = [
2627
classifiers = [
2728
"Development Status :: 3 - Alpha",
2829
"Intended Audience :: Developers",
29-
"License :: OSI Approved :: MIT License",
3030
"Programming Language :: Python :: 3",
3131
"Programming Language :: Python :: 3 :: Only",
3232
"Topic :: Software Development :: Libraries",
@@ -52,6 +52,7 @@ email = "floss@frequenz.com"
5252
[project.optional-dependencies]
5353
dev-flake8 = [
5454
"flake8 == 7.3.0",
55+
"flake8-datetimez == 20.10.0",
5556
"flake8-docstrings == 1.7.0",
5657
"flake8-pyproject == 1.2.4", # For reading the flake8 config from pyproject.toml
5758
"pydoclint == 0.8.3",

0 commit comments

Comments
 (0)