rubem.configuration.output_data_directory.OutputDataDirectory
- class OutputDataDirectory(output_path=None, /, **data)[source]
-
Bases:
BaseModelRepresents an output data directory.
Construction only checks that the path does not name a file; the directory is created, and its existing content reported, by
ensure_exists().- Parameters:
-
output_path (Union[str, bytes, os.PathLike]) – Path to the output directory.
- Raises:
-
NotADirectoryError – If the path names an existing file.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
Methods
Create the directory when it is missing and report existing content.
Attributes
path- ensure_exists()[source]
-
Create the directory when it is missing and report existing content.
- Raises:
-
OSError – If the directory cannot be created.
- Return type:
-
Self
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}
-
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].