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

ocs-client-cli command-line tool #218

Merged
merged 11 commits into from
Aug 30, 2021
Merged

ocs-client-cli command-line tool #218

merged 11 commits into from
Aug 30, 2021

Conversation

mhasself
Copy link
Member

Description

Creates script ocs-client-cli, to help quickly start an interactive python/ipython session with an open MatchedClient. Also you can "scan" for Agents (and list their op's statuses). Added to docs.

Motivation and Context

This helps people avoid the boilerplate needed when all you want is a MatchedClient to debug / inspect a system. When controlling special devices folks probably have Jupyter notebooks or longer client scripts they can run. But there is a place for a general tool that can quickly connect to any Agent. It's frankly pretty useful to be able to list active Agents from the command line.

Going forward we might want to add additional debugging capabilities, such as dumping Operation session.data to the terminal.

How Has This Been Tested?

I've tested this on the miniobs, with both the python and ipython interpreters.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • Unless I am preparing a release, I have opened this PR onto the develop branch.

Copy link
Member

@BrianJKoopman BrianJKoopman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does look useful! I ran into one error that I think would be good to account for. Then I have a question (or maybe found a bug?) related to the --details behavior. Details in comments below.

ocs/client_cli.py Outdated Show resolved Hide resolved
ocs/client_cli.py Show resolved Hide resolved
docs/user/cli_tools.rst Outdated Show resolved Hide resolved
ocs/client_cli.py Outdated Show resolved Hide resolved
@BrianJKoopman BrianJKoopman merged commit 5471905 into develop Aug 30, 2021
@BrianJKoopman BrianJKoopman deleted the ocs-client-cli branch August 30, 2021 14:31
@BrianJKoopman BrianJKoopman mentioned this pull request Nov 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants