Skip to content

Commit 9ea4506

Browse files
committed
Override the default include path when generating protobuf files
By default `repo-config` will include the `submodules/frequenz-api-common` directory, which is us, and we don't want to include ourselves as a submodule, so we need to explicitly set the `include_paths` to an empty array. We also need to bump the dependency on `frequenz-repo-config` to get a bug fix that allows overriding with an empty array. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 282cb50 commit 9ea4506

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

pyproject.toml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
requires = [
66
"setuptools == 80.9.0",
77
"setuptools_scm[toml] == 8.3.1",
8-
"frequenz-repo-config[api] == 0.13.4",
8+
"frequenz-repo-config[api] @ git+https://github.com/frequenz-floss/frequenz-repo-config-python.git@refs/pull/418/head",
9+
#"frequenz-repo-config[api] == 0.13.4",
910
# We need to pin the protobuf, grpcio and grpcio-tools dependencies to make
1011
# sure the code is generated using the minimum supported versions, as older
1112
# versions can't work with code that was generated with newer versions.
@@ -63,23 +64,29 @@ dev-mkdocs = [
6364
"mkdocs-literate-nav == 0.6.2",
6465
"mkdocs-material == 9.6.14",
6566
"mkdocstrings[python] == 0.29.1",
66-
"frequenz-repo-config[api] == 0.13.4",
67+
"frequenz-repo-config[api] @ git+https://github.com/frequenz-floss/frequenz-repo-config-python.git@refs/pull/418/head",
68+
#"frequenz-repo-config[api] == 0.13.4",
6769
]
6870
dev-mypy = [
6971
"mypy == 1.16.0",
7072
"grpc-stubs == 1.53.0.6",
7173
# For checking the noxfile, docs/ script, and tests
7274
"frequenz-api-common[dev-mkdocs,dev-noxfile,dev-pytest]",
7375
]
74-
dev-noxfile = ["nox == 2025.5.1", "frequenz-repo-config[api] == 0.13.4"]
76+
dev-noxfile = [
77+
"nox == 2025.5.1",
78+
"frequenz-repo-config[api] @ git+https://github.com/frequenz-floss/frequenz-repo-config-python.git@refs/pull/418/head",
79+
#"frequenz-repo-config[api] == 0.13.4",
80+
]
7581
dev-pylint = [
7682
"pylint == 3.3.7",
7783
# For checking the noxfile, docs/ script, and tests
7884
"frequenz-api-common[dev-mkdocs,dev-noxfile,dev-pytest]",
7985
]
8086
dev-pytest = [
8187
"pytest == 8.3.5",
82-
"frequenz-repo-config[extra-lint-examples] == 0.13.4",
88+
"frequenz-repo-config[extra-lint-examples] @ git+https://github.com/frequenz-floss/frequenz-repo-config-python.git@refs/pull/418/head",
89+
#"frequenz-repo-config[extra-lint-examples] == 0.13.4",
8390
]
8491
dev = [
8592
"frequenz-api-common[dev-mkdocs,dev-flake8,dev-formatting,dev-mkdocs,dev-mypy,dev-noxfile,dev-pylint,dev-pytest]",
@@ -91,6 +98,12 @@ Issues = "https://github.com/frequenz-floss/frequenz-api-common/issues"
9198
Repository = "https://github.com/frequenz-floss/frequenz-api-common"
9299
Support = "https://github.com/frequenz-floss/frequenz-api-common/discussions/categories/support"
93100

101+
[tool.frequenz-repo-config.protobuf]
102+
# We need to explicitly set this to an empty array because repo-config will
103+
# automatically add `submodules/frequenz-api-common` as a include, but this is
104+
# us, and we don't include ourselves as a submodule.
105+
include_paths = []
106+
94107
[tool.black]
95108
line-length = 88
96109
target-version = ['py311']

0 commit comments

Comments
 (0)