DiamondLightSource / DiamondLightSource/dodal
Pydantic 2 refuses to deserialise PosixPath as Path object
Open
Developer Experience
low priority
- Dominant language
- Python
- Stars
- 5
- Forks
- 13
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 10
Description
As extra validation of a `DetectorParams`, it would be ideal if the `directory` field was of type `Path`. However, when making it a Path and filling it with the tmp_path fixture from unittest, Pydantic refuses to deserialise the DetectorParams.
At the moment it is (str)
## Acceptance Criteria
* DetectorParams.directory is of type Path
Contributor guide
Assessment
This issue has not been assessed yet.