hybrid_jp.config module#

class hybrid_jp.config.Config(*, shocks: Shocks, use_shock: str)[source]#

Bases: BaseModel

model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'shocks': FieldInfo(annotation=Shocks, required=True), 'use_shock': FieldInfo(annotation=str, required=True)}#

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property shk#
shocks: Shocks#
use_shock: str#
class hybrid_jp.config.ShockParams(*, name: str, test_data_dir: Path, data_dir: Path, n_chunks: int, n_threads: int, start_sdf: int, stop_sdf: int)[source]#

Bases: BaseModel

data_dir: Path#
model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'data_dir': FieldInfo(annotation=Path, required=True), 'n_chunks': FieldInfo(annotation=int, required=True, metadata=[Ge(ge=0)]), 'n_threads': FieldInfo(annotation=int, required=True, metadata=[Ge(ge=0)]), 'name': FieldInfo(annotation=str, required=True), 'start_sdf': FieldInfo(annotation=int, required=True, metadata=[Ge(ge=0)]), 'stop_sdf': FieldInfo(annotation=int, required=True, metadata=[Ge(ge=0)]), 'test_data_dir': FieldInfo(annotation=Path, required=True, metadata=[PathType(path_type='dir')])}#

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

n_chunks: int#
n_threads: int#
name: str#
start_sdf: int#
stop_sdf: int#
test_data_dir: Path#
class hybrid_jp.config.Shocks(root: RootModelRootType = PydanticUndefined)[source]#

Bases: RootModel

model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'root': FieldInfo(annotation=Dict[str, ShockParams], required=True)}#

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

root: Dict[str, ShockParams]#
class hybrid_jp.config.TOMLConfigLoader(config_toml_path: str | pathlib.Path)[source]#

Bases: object

load() dict[str, Any][source]#
hybrid_jp.config.config_from_toml(toml_path: pathlib.Path | str) Config[source]#