Skip to content

Extra settings in Settings model are unintentionally forbidden? #1039

@andkay

Description

@andkay

Describe the bug
In testing the new recommended UV-based installation of the latest version of ActivitySim, CMAP's model crashes because latest does not allow "extra" settings in the core settings.yaml or settings_mp.yaml file. Their mainline model uses v1.2.1 and runs without error using the same settings, which makes sense as model validation was added in v1.3.0.

Forbidding extra settings is a completely valid way to configure a Pydantic model), but the code context around the traceback strongly suggests that a fatal exception is not the intended behavior.

If others agree, this should be a relatively quick fix.

Expected behavior
Expected to receive a DeprecationWarning along with a log of settings that will be ingnored rather than a fatal ValidationError

Screenshots

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working/bug f

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions