DiamondLightSource / DiamondLightSource/dodal

Pydantic 2 refuses to deserialise PosixPath as Path object

Open
#774 1 comment 0 reactions 0 assignees View on GitHub
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

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.