DiamondLightSource / DiamondLightSource/blueapi

Allow BlueAPI to intepret classmethods/staticmethods and/or . in plan name

Open
#1,168 7 comments 0 reactions 0 assignees View on GitHub
decision pending enhancement
Dominant language
Python
Stars
13
Forks
13
Avg merge
2d 11h
Merged PRs (30d)
25

Description

I would like the BlueAPI to handle dots when parsing bluesky plans. So that I can access plans that are contained within classes ie:

```python

class Johnny5():

robot: NOVARobot = inject("Johnny5")

@classmethod
def self_destruct(self) -> MsgGenerator:

yield from abs_set(self.robot.primed, True)
yield from trigger(self.robot.detonate)

@classmethod
def wave_arm(self) -> MsgGenerator:

yield from abs_set(self.robot.arm, 0)
yield from abs_set(self.robot.arm, 10)

```

such that in the jython terminal I can do something like

```python

run_plan("Johnny5.self_destruct")

```

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.