sudoblockio / tackle

Tackle is a programmable configuration language for building modular utilities, code generators, and CLIs with schema validation baked in.
Apache License 2.0
51 stars 2 forks source link

Support parameters such as `extra` in `model_config` within declarative hooks #219

Open robcxyz opened 8 months ago

robcxyz commented 8 months ago

Currently we support the model_config from pydantic but having issue with the parser which does work on the model before instantiation where the model config is assessed. So for items such as extra, this currently does not work.

Pydantic Docs https://docs.pydantic.dev/latest/api/config/#pydantic.config.ConfigDict

MyHook<-:
  foo: bar

  model_config:
    extra: allow

call->: MyHook --bar baz

But for other items such as

MyHook<-:
  foo: bar

  model_config:
    str_to_upper: true

call->: MyHook --foo baz

This does work (ie BAZ)