DiamondLightSource / DiamondLightSource/ispyb-api

Add better enum support for "experimenttype"

Open
#171 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
7
Forks
11
PR merge metrics
No merged PRs in 30d

Description

As a user of the API I would like to avoid having accidentally sent invalid data to ispyb. One place in particular where this is easy to go wrong is with enums as I may have an accidental typo in the string representation of it. e.g. it would be nicer to be able to do something like:
```python
from ispyb import open, ExperimentTypes

with open(config_file) as conn:
params = conn.mx_acquisition.get_data_collection_params()
params["experimenttype"] = ExperimentTypes.MESH
```

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.