Skip to content

Commit 3ee6610

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/ci.yaml: migrated job protolint 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 Updated .github/workflows/ci-pr.yaml: migrated job protolint 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... Updated mkdocs.yml: moved mkdocstrings api paths out of options ======================================================================== Migrating protolint and publish-to-pypi runners to ubuntu-24.04... Updated .github/workflows/ci-pr.yaml: migrated runner for job protolint Updated .github/workflows/ci.yaml: migrated runner for job protolint 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 0d4dbe5 commit 3ee6610

7 files changed

Lines changed: 40 additions & 25 deletions

File tree

.github/workflows/auto-dependabot.yaml

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,39 @@
11
name: Auto-merge Dependabot PR
22

33
on:
4-
pull_request:
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:
513

614
permissions:
7-
contents: write
15+
contents: read
816
pull-requests: write
917

1018
jobs:
1119
auto-merge:
12-
if: github.actor == 'dependabot[bot]'
13-
runs-on: ubuntu-latest
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
1425
steps:
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+
1533
- name: Auto-merge Dependabot PR
16-
uses: frequenz-floss/dependabot-auto-approve@3cad5f42e79296505473325ac6636be897c8b8a1 # v1.3.2
34+
uses: frequenz-floss/dependabot-auto-approve@e943399cc9d76fbb6d7faae446cd57301d110165 # v1.5.0
1735
with:
18-
github-token: ${{ secrets.GITHUB_TOKEN }}
36+
github-token: ${{ steps.app-token.outputs.token }}
1937
dependency-type: 'all'
2038
auto-merge: 'true'
2139
merge-method: 'merge'

.github/workflows/ci.yaml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,9 @@ jobs:
5454
strategy:
5555
fail-fast: false
5656
matrix:
57-
arch:
58-
- amd64
59-
- arm
60-
os:
57+
platform:
6158
- ubuntu-24.04
59+
- ubuntu-24.04-arm
6260
python:
6361
- "3.11"
6462
- "3.12"
@@ -67,7 +65,7 @@ jobs:
6765
# that uses the same venv to run multiple linting sessions
6866
- "ci_checks_max"
6967
- "pytest_min"
70-
runs-on: ${{ matrix.os }}${{ matrix.arch != 'amd64' && format('-{0}', matrix.arch) || '' }}
68+
runs-on: ${{ matrix.platform }}
7169

7270
steps:
7371
- name: Run nox
@@ -86,7 +84,7 @@ jobs:
8684
needs: ["nox"]
8785
# We skip this job only if nox was also skipped
8886
if: always() && needs.nox.result != 'skipped'
89-
runs-on: ubuntu-24.04
87+
runs-on: ubuntu-slim
9088
env:
9189
DEPS_RESULT: ${{ needs.nox.result }}
9290
steps:
@@ -131,15 +129,13 @@ jobs:
131129
strategy:
132130
fail-fast: false
133131
matrix:
134-
arch:
135-
- amd64
136-
- arm
137-
os:
132+
platform:
138133
- ubuntu-24.04
134+
- ubuntu-24.04-arm
139135
python:
140136
- "3.11"
141137
- "3.12"
142-
runs-on: ${{ matrix.os }}${{ matrix.arch != 'amd64' && format('-{0}', matrix.arch) || '' }}
138+
runs-on: ${{ matrix.platform }}
143139

144140
steps:
145141
- name: Setup Git
@@ -187,7 +183,7 @@ jobs:
187183
needs: ["test-installation"]
188184
# We skip this job only if test-installation was also skipped
189185
if: always() && needs.test-installation.result != 'skipped'
190-
runs-on: ubuntu-24.04
186+
runs-on: ubuntu-slim
191187
env:
192188
DEPS_RESULT: ${{ needs.test-installation.result }}
193189
steps:
@@ -302,7 +298,7 @@ jobs:
302298
# discussions to create the release announcement in the discussion forums
303299
contents: write
304300
discussions: write
305-
runs-on: ubuntu-24.04
301+
runs-on: ubuntu-slim
306302
steps:
307303
- name: Download distribution files
308304
uses: actions/download-artifact@v7

.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
permissions:
2121
pull-requests: read
2222
steps:

mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ plugins:
9999
default_handler: python
100100
handlers:
101101
python:
102+
paths: ["py"]
102103
options:
103-
paths: ["py"]
104104
docstring_section_style: spacy
105105
inherited_members: true
106106
merge_init_into_class: false

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ build-backend = "setuptools.build_meta"
2121
name = "frequenz-api-reporting"
2222
description = "Frequenz gRPC API to aggregate component data from microgrids"
2323
readme = "README.md"
24-
license = { text = "MIT" }
24+
license = "MIT"
25+
license-files = ["LICENSE"]
2526
keywords = [
2627
"frequenz",
2728
"python",
@@ -36,7 +37,6 @@ keywords = [
3637
classifiers = [
3738
"Development Status :: 3 - Alpha",
3839
"Intended Audience :: Developers",
39-
"License :: OSI Approved :: MIT License",
4040
"Programming Language :: Python :: 3",
4141
"Programming Language :: Python :: 3 :: Only",
4242
"Topic :: Software Development :: Libraries",
@@ -63,6 +63,7 @@ email = "floss@frequenz.com"
6363
[project.optional-dependencies]
6464
dev-flake8 = [
6565
"flake8 == 7.3.0",
66+
"flake8-datetimez == 20.10.0",
6667
"flake8-docstrings == 1.7.0",
6768
"flake8-pyproject == 1.2.4", # For reading the flake8 config from pyproject.toml
6869
"pydoclint == 0.8.3",

0 commit comments

Comments
 (0)