DiamondLightSource / DiamondLightSource/mx-bluesky

Forbird extra fields in parameter model

Open
#747 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
4
Forks
5
Avg merge
1d 30m
Merged PRs (30d)
2

Description

Our top level parameter `BaseModel`, called `MxBlueskyParameters`, currently allows extra fields via

```
model_config = ConfigDict(
arbitrary_types_allowed=True,
extra="allow",
)
```
This means parameter-related issues can be very hard to spot - eg things like https://github.com/DiamondLightSource/mx-bluesky/issues/738. Git blames me for this so I do too! We should change this to `extra=forbid"` and fix tests to work with this

## Acceptance Criteria
- set `extra="allow"` in `MxBlueskyParameters`
- Fix all tests that this breaks
- Add a test to confirm this works as expected

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.