Skip to content

Commit aaaba54

Browse files
authored
Extend documentation of duration (#200)
2 parents ab65375 + bf92a47 commit aaaba54

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

proto/frequenz/api/dispatch/v1/dispatch.proto

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ message DispatchData {
133133
google.protobuf.Timestamp start_time = 2;
134134

135135
// Duration in seconds
136+
// The duration of the dispatch in seconds. If the duration is not set, the dispatch
137+
// will be considered to have an infinite duration.
138+
// A duration of 0 seconds is also valid, indicating a dispatch that
139+
// immediately starts and ends, e.g. switching a component on and off.
136140
optional uint32 duration = 3;
137141

138142
// Dispatch microgrid component selector

pyproject.toml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ requires = [
66
"setuptools == 68.1.0",
77
"setuptools_scm[toml] == 7.1.0",
88
"frequenz-repo-config[api] == 0.10.0",
9+
# We need to pin the protobuf, grpcio and grpcio-tools dependencies to make
10+
# sure the code is generated using the minimum supported versions, as older
11+
# versions can't work with code that was generated with newer versions.
12+
# https://protobuf.dev/support/cross-version-runtime-guarantee/#backwards
13+
"protobuf == 5.28.0",
14+
"grpcio-tools == 1.66.1",
15+
"grpcio == 1.66.1",
916
]
1017
build-backend = "setuptools.build_meta"
1118

@@ -27,8 +34,15 @@ classifiers = [
2734
requires-python = ">= 3.11, < 4"
2835
dependencies = [
2936
"frequenz-api-common >= 0.5.4, < 0.7",
30-
"googleapis-common-protos >= 1.56.4, < 2",
31-
"grpcio >= 1.54.2, < 2",
37+
"googleapis-common-protos >= 1.65.0, < 2",
38+
# We can't widen beyond the current value unless we bump the minimum
39+
# requirements too because of protobuf cross-version runtime guarantees:
40+
# https://protobuf.dev/support/cross-version-runtime-guarantee/#major
41+
"protobuf >= 5.28.0, < 7", # Do not widen beyond 7!
42+
# We couldn't find any document with a spec about the cross-version runtime
43+
# guarantee for grpcio, so unless we find one in the future, we'll assume
44+
# major version jumps are not compatible
45+
"grpcio >= 1.66.1, < 2", # Do not widen beyond 2!
3246
]
3347
dynamic = ["version"]
3448

@@ -54,7 +68,7 @@ dev-mkdocs = [
5468
"mkdocs-macros-plugin == 1.0.5",
5569
"mkdocs-material == 9.5.30",
5670
"mkdocstrings[python] == 0.25.2",
57-
"mkdocstrings-python == 1.9.2",
71+
"mkdocstrings-python == 1.10.8",
5872
"frequenz-repo-config[api] == 0.10.0",
5973
]
6074
dev-mypy = [

0 commit comments

Comments
 (0)