Skip to content

Commit a70e9d3

Browse files
authored
Bump the optional group with 17 updates (#911)
Updates the requirements on [pydoclint](https://github.com/jsh9/pydoclint), [polars](https://github.com/pola-rs/polars), [black](https://github.com/psf/black), [markdown](https://github.com/Python-Markdown/markdown), [mkdocs-material](https://github.com/squidfunk/mkdocs-material), [mkdocstrings[python]](https://github.com/mkdocstrings/mkdocstrings), [frequenz-repo-config[lib]](https://github.com/frequenz-floss/frequenz-repo-config-python), [mypy](https://github.com/python/mypy), [types-markdown](https://github.com/python/typeshed), [types-setuptools](https://github.com/python/typeshed), [pylint](https://github.com/pylint-dev/pylint), [frequenz-repo-config[extra-lint-examples]](https://github.com/frequenz-floss/frequenz-repo-config-python), [pytest-mock](https://github.com/pytest-dev/pytest-mock), [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio), [async-solipsism](https://github.com/bmerry/async-solipsism), [pytest](https://github.com/pytest-dev/pytest) and [hypothesis](https://github.com/HypothesisWorks/hypothesis) to permit the latest version. Also do some extra upgrades coming from the upgrade of repo-config from v0.7 to v0.9. Updates `pydoclint` from 0.3.8 to 0.4.1 - [Release notes](https://github.com/jsh9/pydoclint/releases) - [Changelog](https://github.com/jsh9/pydoclint/blob/main/CHANGELOG.md) - [Commits](jsh9/pydoclint@0.3.8...0.4.1) Updates `polars` from 0.20.2 to 0.20.18 - [Release notes](https://github.com/pola-rs/polars/releases) - [Commits](pola-rs/polars@py-0.20.2...py-0.20.18) Updates `black` from 24.1.1 to 24.3.0 - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](psf/black@24.1.1...24.3.0) Updates `markdown` from 3.5.1 to 3.6 - [Release notes](https://github.com/Python-Markdown/markdown/releases) - [Changelog](https://github.com/Python-Markdown/markdown/blob/master/docs/changelog.md) - [Commits](Python-Markdown/markdown@3.5.1...3.6) Updates `mkdocs-material` from 9.5.3 to 9.5.16 - [Release notes](https://github.com/squidfunk/mkdocs-material/releases) - [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG) - [Commits](squidfunk/mkdocs-material@9.5.3...9.5.16) Updates `mkdocstrings[python]` from 0.24.0 to 0.24.1 - [Release notes](https://github.com/mkdocstrings/mkdocstrings/releases) - [Changelog](https://github.com/mkdocstrings/mkdocstrings/blob/main/CHANGELOG.md) - [Commits](mkdocstrings/mkdocstrings@0.24.0...0.24.1) Updates `frequenz-repo-config[lib]` from 0.7.4 to 0.9.1 - [Release notes](https://github.com/frequenz-floss/frequenz-repo-config-python/releases) - [Changelog](https://github.com/frequenz-floss/frequenz-repo-config-python/blob/v0.x.x/RELEASE_NOTES.md) - [Commits](frequenz-floss/frequenz-repo-config-python@v0.7.4...v0.9.1) Updates `mypy` from 1.8.0 to 1.9.0 - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](python/mypy@v1.8.0...1.9.0) Updates `types-markdown` from 3.5.0.20240129 to 3.6.0.20240316 - [Commits](https://github.com/python/typeshed/commits) Updates `types-setuptools` from 69.0.0.20240125 to 69.2.0.20240317 - [Commits](https://github.com/python/typeshed/commits) Updates `pylint` from 3.0.3 to 3.1.0 - [Release notes](https://github.com/pylint-dev/pylint/releases) - [Commits](pylint-dev/pylint@v3.0.3...v3.1.0) Updates `frequenz-repo-config[extra-lint-examples]` from 0.7.4 to 0.9.1 - [Release notes](https://github.com/frequenz-floss/frequenz-repo-config-python/releases) - [Changelog](https://github.com/frequenz-floss/frequenz-repo-config-python/blob/v0.x.x/RELEASE_NOTES.md) - [Commits](frequenz-floss/frequenz-repo-config-python@v0.7.4...v0.9.1) Updates `pytest-mock` from 3.12.0 to 3.14.0 - [Release notes](https://github.com/pytest-dev/pytest-mock/releases) - [Changelog](https://github.com/pytest-dev/pytest-mock/blob/main/CHANGELOG.rst) - [Commits](pytest-dev/pytest-mock@v3.12.0...v3.14.0) Updates `pytest-asyncio` from 0.23.3 to 0.23.6 - [Release notes](https://github.com/pytest-dev/pytest-asyncio/releases) - [Commits](pytest-dev/pytest-asyncio@v0.23.3...v0.23.6) Updates `async-solipsism` from 0.5 to 0.6 - [Commits](bmerry/async-solipsism@0.5...0.6) Updates `pytest` from 7.4.4 to 8.1.1 - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Commits](pytest-dev/pytest@7.4.4...8.1.1) Updates `hypothesis` from 6.92.1 to 6.100.0 - [Release notes](https://github.com/HypothesisWorks/hypothesis/releases) - [Commits](HypothesisWorks/hypothesis@hypothesis-python-6.92.1...hypothesis-python-6.100.0)
2 parents be82217 + 174af1f commit a70e9d3

File tree

3 files changed

+30
-25
lines changed

3 files changed

+30
-25
lines changed

.github/containers/test-installation/Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@
55

66
FROM --platform=${TARGETPLATFORM} python:3.11-slim
77

8-
RUN python -m pip install --upgrade --no-cache-dir pip
8+
RUN apt-get update -y && \
9+
apt-get install --no-install-recommends -y \
10+
git && \
11+
apt-get clean && \
12+
rm -rf /var/lib/apt/lists/* && \
13+
python -m pip install --upgrade --no-cache-dir pip
914

1015
COPY dist dist
1116
RUN pip install dist/*.whl && \

pyproject.toml

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
requires = [
66
"setuptools == 69.0.3",
77
"setuptools_scm[toml] == 8.0.4",
8-
"frequenz-repo-config[lib] == 0.7.4",
8+
"frequenz-repo-config[lib] == 0.9.1",
99
]
1010
build-backend = "setuptools.build_meta"
1111

@@ -55,47 +55,47 @@ dev-flake8 = [
5555
"flake8 == 7.0.0",
5656
"flake8-docstrings == 1.7.0",
5757
"flake8-pyproject == 1.2.3", # For reading the flake8 config from pyproject.toml
58-
"pydoclint == 0.3.8",
58+
"pydoclint == 0.4.1",
5959
"pydocstyle == 6.3.0",
6060
]
61-
dev-examples = ["polars == 0.20.2"]
62-
dev-formatting = ["black == 24.1.1", "isort == 5.13.2"]
61+
dev-examples = ["polars == 0.20.18"]
62+
dev-formatting = ["black == 24.3.0", "isort == 5.13.2"]
6363
dev-mkdocs = [
64-
"black == 24.1.1",
65-
"Markdown==3.5.1",
64+
"black == 24.3.0",
65+
"Markdown==3.6",
6666
"mike == 2.0.0",
6767
"mkdocs-gen-files == 0.5.0",
6868
"mkdocs-literate-nav == 0.6.1",
6969
"mkdocs-macros-plugin == 1.0.5",
70-
"mkdocs-material == 9.5.3",
71-
"mkdocstrings[python] == 0.24.0",
72-
"frequenz-repo-config[lib] == 0.7.4",
70+
"mkdocs-material == 9.5.16",
71+
"mkdocstrings[python] == 0.24.1",
72+
"frequenz-repo-config[lib] == 0.9.1",
7373
]
7474
dev-mypy = [
75-
"mypy == 1.8.0",
75+
"mypy == 1.9.0",
7676
"grpc-stubs == 1.24.12", # This dependency introduces breaking changes in patch releases
77-
"types-Markdown == 3.5.0.20240129",
77+
"types-Markdown == 3.6.0.20240316",
7878
"types-protobuf == 4.24.0.20240129",
79-
"types-setuptools == 69.0.0.20240125",
79+
"types-setuptools == 69.2.0.20240317",
8080
# For checking the noxfile, docs/ script, and tests
8181
"frequenz-sdk[dev-mkdocs,dev-noxfile,dev-pytest]",
8282
]
83-
dev-noxfile = ["nox == 2023.4.22", "frequenz-repo-config[lib] == 0.7.4"]
83+
dev-noxfile = ["nox == 2023.4.22", "frequenz-repo-config[lib] == 0.9.1"]
8484
dev-pylint = [
85-
"pylint == 3.0.3",
85+
"pylint == 3.1.0",
8686
# For checking the noxfile, docs/ script, and tests
8787
"frequenz-sdk[dev-mkdocs,dev-noxfile,dev-pytest]",
8888
]
8989
dev-pytest = [
90-
"pytest == 7.4.4",
91-
"frequenz-repo-config[extra-lint-examples] == 0.7.4",
92-
"pytest-mock == 3.12.0",
93-
"pytest-asyncio == 0.23.3",
90+
"pytest == 8.1.1",
91+
"frequenz-repo-config[extra-lint-examples] == 0.9.1",
92+
"pytest-mock == 3.14.0",
93+
"pytest-asyncio == 0.23.6",
9494
"time-machine == 2.12.0",
95-
"async-solipsism == 0.5",
95+
"async-solipsism == 0.6",
9696
# For checking docstring code examples
9797
"frequenz-sdk[dev-examples]",
98-
"hypothesis == 6.92.1",
98+
"hypothesis == 6.100.0",
9999
]
100100
dev = [
101101
"frequenz-sdk[dev-mkdocs,dev-flake8,dev-formatting,dev-mkdocs,dev-mypy,dev-noxfile,dev-pylint,dev-pytest]",
@@ -144,13 +144,16 @@ min-similarity-lines = 40
144144
[tool.pylint.messages_control]
145145
disable = [
146146
"too-few-public-methods",
147+
"too-many-return-statements",
147148
# disabled because it conflicts with isort
148149
"wrong-import-order",
149150
"ungrouped-imports",
150151
# pylint's unsubscriptable check is buggy and is not needed because
151152
# it is a type-check, for which we already have mypy.
152153
"unsubscriptable-object",
153154
# Checked by flake8
155+
"redefined-outer-name",
156+
"unused-import",
154157
"line-too-long",
155158
"redefined-outer-name",
156159
"unnecessary-lambda-assignment",
@@ -191,8 +194,6 @@ module = [
191194
# The available stubs packages are outdated or incomplete (WIP/experimental):
192195
# https://github.com/frequenz-floss/frequenz-sdk-python/issues/430
193196
"networkx",
194-
"sybil",
195-
"sybil.*",
196197
]
197198
ignore_missing_imports = true
198199

src/frequenz/sdk/actor/power_distributing/_component_managers/_ev_charger_manager/_ev_charger_manager.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,7 @@ def _deallocate_unused_power(self, to_deallocate: Power) -> dict[int, Power]:
395395
ev_to_deallocate = evc.last_allocation - evc.power
396396
if ev_to_deallocate <= Power.zero():
397397
continue
398-
if ev_to_deallocate >= to_deallocate - deallocated_power:
399-
ev_to_deallocate = to_deallocate - deallocated_power
398+
ev_to_deallocate = min(ev_to_deallocate, to_deallocate - deallocated_power)
400399
tgt_power = evc.last_allocation - ev_to_deallocate
401400
if tgt_power < min_power:
402401
tgt_power = Power.zero()

0 commit comments

Comments
 (0)