protobuf
frequenz.repo.config.protobuf
¤
Manages the configuration to generate files from the protobuf files.
Classes¤
frequenz.repo.config.protobuf.ProtobufConfig
dataclass
¤
A configuration for the protobuf files.
The configuration can be loaded from the pyproject.toml
file using the class
method from_pyproject_toml()
.
Source code in frequenz/repo/config/protobuf.py
Attributes¤
docs_path: str = 'protobuf-reference'
class-attribute
instance-attribute
¤
The path of the root directory where the documentation files will be generated.
include_paths: Sequence[str] = ('submodules/api-common-protos', 'submodules/frequenz-api-common/proto')
class-attribute
instance-attribute
¤
The paths to add to the include path when compiling the protobuf files.
proto_glob: str = '*.proto'
class-attribute
instance-attribute
¤
The glob pattern to use to find the protobuf files.
proto_path: str = 'proto'
class-attribute
instance-attribute
¤
The path of the root directory containing the protobuf files.
py_path: str = 'py'
class-attribute
instance-attribute
¤
The path of the root directory where the Python files will be generated.
Functions¤
from_pyproject_toml(path='pyproject.toml', /, **defaults)
classmethod
¤
Create a new configuration by loading the options from a pyproject.toml
file.
The options are read from the [tool.frequenz-repo-config.protobuf]
section of the pyproject.toml
file.
PARAMETER | DESCRIPTION |
---|---|
path |
The path to the
TYPE:
|
**defaults |
The default values for the options missing in the file. If a default is missing too, then the default in this class will be used.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Self
|
The configuration. |