Skip to content

Improve CLI for Instrument Server Management #300

Description

@Relm-Arrowny

Goals

Acceptance criteria : What journeys should the user be able to complete to consider your feature done
Be as specific as you can, check them off once they work. Add more if you find more requirements during development. Issue should only be considered done after all of them are checked

  • Users can run sm-bluesky start hf2server and pulse geneterator sever.
  • The CLI correctly parses and passes --host, --port, and hardware-specific flags (--device, --hf2-ip) to the server constructor.
  • The CLI handles KeyboardInterrupt (Ctrl+C) by calling server.stop(), ensuring hardware is disconnected and the port is released.
  • Error messges and show list of available servers.

Tasks

base on the goals, deduce the tasks required. check them off once they're done

  • Implement Subparsers: Use argparse.add_subparsers() to create the start command structure.
  • Create Server Registry: Implement a server_map dictionary in cli.py to manage the mapping of strings (e.g., "hf2server") to class objects.
  • Implement Graceful Shutdown: Wrap the server.start() call in a try/except KeyboardInterrupt block.
  • Add Help Documentation: Ensure each argument in the CLI has a clear help string for the --help command.

Related Resources

any images/gifs, mockups/wireframes that would aid the development should be listed here
MockUp : link to mockup
Coda doc: link to coda
Additional context
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

Labels

SMGcommon to all beamlines within the group
No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions