Skip to content

Commit 1dab247

Browse files
Update to repo-config v0.7.1 (#223)
- ci: Add extra debug information. - ci: Add meta-jobs (`nox-all` and `nox-cross-arch-all`) to be able to require them in branch protection rules so we don't have to update the protection rules each time we add or remove a job from the matrix. - ci: Add support for cross-arch testing, including testing in arm64. - ci: Ignore dependabot pushes (they are tested via the PR). - ci: Run `nox` sessions concurrently to speed up tests. - ci: Test installation of the package in different platforms. - dependabot: Update dependencies in groups, so we get only one PR to update multiple dependencies. - dependabot: Update dependencies monthly instead of daily. - docs: Add a few handy `mkdocs`/`markdown` extensions. - docs: Add `mkdocs-macros-plugin` to be able to use macros in the documentation. - docs: Fix formatting of mermaid diagrams. - docs: Move some support files for the documentation website to names starting with `_` to make it more clear they are only support files. - docs: Replace the `mkdocs-section-index` plugin (which has caused problems in the past) with the `mkdocs-material` built-in `navigation.indexes` feature. - docs: Show inherited class members in the documentation. - docs: Use a custom style to show code annotation numbers for better ordering. - docs: Use the new documentation website versioning scheme. This means now multiple development branches are exposed, as well as pre-releases. Also the order of the versions is improved. The `next` version is replaced by the multiple `vX.Y-dev` versions. - nox: Add a `flake8` session, mainly needed to run `pydocstyle` but also use it to run `pycodestyle` and `flake8` regular checks. `flake8` is much faster than `pylint`, so when there are conflicting checks we prefer `flake8`. - nox: Replace `darglint` with `pydoclint`. - Remove unnecessary fields from the cookiecutter replay file. - Unify some `pyproject.toml` options and move other tool options (like `mypy`) to this file. - Remove types from the docs - Remove empty lines between docstrings and code - Remove double comment char (`#`) - Fix arguments documentation - Add missing `Yields` section to the documentation - Add missing `Returns` section to `consume()` - Ignore `Raises` sections without explicit `raise` statements - Remove obsolete `darglint` ignore directives
2 parents 40ab70c + a15edb2 commit 1dab247

30 files changed

+620
-150
lines changed

.cookiecutter-replay.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"python_package": "frequenz.channels",
1414
"pypi_package_name": "frequenz-channels",
1515
"github_repo_name": "frequenz-channels-python",
16-
"default_codeowners": "@frequenz-floss/python-sdk-team",
17-
"_template": "gh:frequenz-floss/frequenz-repo-config-python"
16+
"default_codeowners": "@frequenz-floss/python-sdk-team"
1817
}
1918
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# License: MIT
2+
# Copyright © 2023 Frequenz Energy-as-a-Service GmbH
3+
# This Dockerfile is used to run the tests in architectures not supported by
4+
# GitHub Actions.
5+
6+
FROM docker.io/library/ubuntu:20.04
7+
8+
ENV DEBIAN_FRONTEND=noninteractive
9+
10+
# Install Python 3.11 and curl to install pip later
11+
RUN apt-get update -y && \
12+
apt-get install --no-install-recommends -y \
13+
software-properties-common && \
14+
add-apt-repository ppa:deadsnakes/ppa && \
15+
apt-get install --no-install-recommends -y \
16+
ca-certificates \
17+
curl \
18+
git \
19+
python3.11 \
20+
python3.11-distutils && \
21+
apt-get clean && \
22+
rm -rf /var/lib/apt/lists/*
23+
24+
# Install pip
25+
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.11
26+
27+
RUN update-alternatives --install \
28+
/usr/local/bin/python python /usr/bin/python3.11 1 && \
29+
python -m pip install --upgrade --no-cache-dir pip
30+
31+
COPY entrypoint.bash /usr/bin/entrypoint.bash
32+
33+
ENTRYPOINT ["/usr/bin/entrypoint.bash"]
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
# License: MIT
3+
# Copyright © 2023 Frequenz Energy-as-a-Service GmbH
4+
set -e
5+
6+
echo "System details:" $(uname -a)
7+
echo "Machine:" $(uname -m)
8+
9+
exec "$@"
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# License: MIT
2+
# Copyright © 2023 Frequenz Energy-as-a-Service GmbH
3+
# This Dockerfile is used to test the installation of the python package in
4+
# multiple platforms in the CI. It is not used to build the package itself.
5+
6+
FROM --platform=${TARGETPLATFORM} python:3.11-slim
7+
8+
RUN python -m pip install --upgrade --no-cache-dir pip
9+
10+
COPY dist dist
11+
RUN pip install dist/*.whl && \
12+
rm -rf dist

.github/dependabot.yml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ updates:
33
- package-ecosystem: "pip"
44
directory: "/"
55
schedule:
6-
interval: "daily"
7-
time: "07:00"
6+
interval: "monthly"
7+
day: "thursday"
88
labels:
99
- "part:tooling"
1010
- "type:tech-debt"
@@ -13,12 +13,29 @@ updates:
1313
versioning-strategy: auto
1414
# Allow up to 10 open pull requests for updates to dependency versions
1515
open-pull-requests-limit: 10
16+
# We group production and development ("optional" in the context of
17+
# pyproject.toml) dependency updates when they are patch and minor updates,
18+
# so we end up with less PRs being generated.
19+
# Major updates are still managed, but they'll create one PR per
20+
# dependency, as major updates are expected to be breaking, it is better to
21+
# manage them individually.
22+
groups:
23+
required:
24+
dependency-type: "production"
25+
update-types:
26+
- "minor"
27+
- "patch"
28+
optional:
29+
dependency-type: "development"
30+
update-types:
31+
- "minor"
32+
- "patch"
1633

1734
- package-ecosystem: "github-actions"
1835
directory: "/"
1936
schedule:
20-
interval: "daily"
21-
time: "06:00"
37+
interval: "monthly"
38+
day: "thursday"
2239
labels:
2340
- "part:tooling"
2441
- "type:tech-debt"

0 commit comments

Comments
 (0)