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
class-attribute
instance-attribute
¤
docs_path: str = 'protobuf-reference'
The path of the root directory where the documentation files will be generated.
include_paths
class-attribute
instance-attribute
¤
The paths to add to the include path when compiling the protobuf files.
proto_glob
class-attribute
instance-attribute
¤
proto_glob: str = '*.proto'
The glob pattern to use to find the protobuf files.
proto_path
class-attribute
instance-attribute
¤
proto_path: str = 'proto'
The path of the root directory containing the protobuf files.
py_path
class-attribute
instance-attribute
¤
py_path: str = 'py'
The path of the root directory where the Python files will be generated.
Functions¤
from_pyproject_toml
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. |