Pydantic 2 refuses to deserialise PosixPath as Path object
Opened this issue · 1 comments
DiamondJoseph commented
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
DominicOram commented
This will involve changes to the mx-bluesky
side too. Currently it assumes that the path is a string with a trailing /
we must have the trailing /
when we put the path into ispyb