diff --git a/README.md b/README.md index 6453775..db18453 100644 --- a/README.md +++ b/README.md @@ -192,6 +192,16 @@ python main.py --train @train_config.yaml **Note:pydantic_config will look at the file extension to determine the file type.** +If you want to use `toml` or `yaml` file you need to install using +``` +pip install .[toml] +``` +or + +``` +pip install .[yaml] +``` + # Development This project use [uv](https://github.com/astral-sh/uv) to manage python. diff --git a/pyproject.toml b/pyproject.toml index be36ef2..f6fd09b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,6 +16,7 @@ requires-python = ">= 3.10" [project.optional-dependencies] yaml = ["pyyaml"] toml = ["tomli"] +all = ["pyyaml", "tomli"] [tool.ruff] line-length = 120 diff --git a/uv.lock b/uv.lock index 151bbf9..5e2c4e4 100644 --- a/uv.lock +++ b/uv.lock @@ -174,6 +174,10 @@ dependencies = [ ] [package.optional-dependencies] +all = [ + { name = "pyyaml" }, + { name = "tomli" }, +] toml = [ { name = "tomli" }, ] @@ -191,8 +195,10 @@ dev = [ [package.metadata] requires-dist = [ { name = "pydantic", specifier = ">=2.0.0" }, + { name = "pyyaml", marker = "extra == 'all'" }, { name = "pyyaml", marker = "extra == 'yaml'" }, { name = "rich" }, + { name = "tomli", marker = "extra == 'all'" }, { name = "tomli", marker = "extra == 'toml'" }, ]