Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make plans that will allow GDA to write sample status #604

Open
DominicOram opened this issue Oct 30, 2024 · 0 comments
Open

Make plans that will allow GDA to write sample status #604

DominicOram opened this issue Oct 30, 2024 · 0 comments
Labels
good first issue Good for newcomers

Comments

@DominicOram
Copy link
Contributor

Following #595 we would like the same behaviour in GDA (see https://jira.diamond.ac.uk/browse/MXGDA-4148). The easiest way to do this will be to leverage the code written in bluesky so that we can call it via BlueAPI.

As we do this using callbacks we will have to make some "dummy" plans for this that trigger the callbacks e.g. something like:

@run_decorator
def deposit_load_sample():
    @run_decorator()
    def _inner():
        yield from bps.null()
    yield from bps.subscribe(SampleIspybCallback())
    yield from _inner()

@run_decorator
def deposit_sample_error(error_type: Literal["Sample", "Beamline"]):
    @run_decorator()
    def _inner():
        if error_type == "Sample":
             raise WarningException()
        elif error_type == "Beamline":
             raise Exception()
        yield from bps.null()
    yield from bps.subscribe(SampleIspybCallback())
    yield from _inner()

Acceptance Criteria

@olliesilvester olliesilvester added the good first issue Good for newcomers label Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants