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

Add imgr and merge iocmanager into one bash file #101

Merged
merged 8 commits into from
Feb 16, 2022

Conversation

ZryletTC
Copy link
Contributor

@ZryletTC ZryletTC commented Feb 7, 2022

Description

  • Add imgr
  • Change iocmanager to bypass the IocManager bash script in the IocManager package

Motivation and Context

The bash scripts to access imgr and iocmanager should exist in one place only and engineering_tools is a convenient place because it houses many other commonly used scripts and is already on most peoples's PATHs. This is the first step in moving the scripts from the iocmanager package to engineering_tools. After all hutches have adopted a new release of engineering_tools containing these scripts, I will remove the no-longer-useful bash scripts from the iocmanager package.

How Has This Been Tested?

Interactively.
Shellcheck passes with only SC1091 messages.

Where Has This Been Documented?

Commented each section in both scripts.

@ZryletTC ZryletTC linked an issue Feb 7, 2022 that may be closed by this pull request
@ZryletTC ZryletTC marked this pull request as ready for review February 14, 2022 09:32
Copy link
Member

@ZLLentz ZLLentz left a comment

Choose a reason for hiding this comment

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

Added some minor questions/comments that apply to both files. Should be good as-is though.

scripts/imgr Show resolved Hide resolved
scripts/imgr Show resolved Hide resolved
HUTCH=${HUTCH:-$(get_hutch_name)}

# Run if possible
if [[ "$HUTCH" == "unknown_hutch" ]]; then
Copy link
Member

Choose a reason for hiding this comment

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

Stuff like this makes me nervous about knock-on affects of upstream changes to get_hutch_name's output. This also does not catch e.g. --hutch xvs typos, but it probably doesn't need to.

Copy link
Contributor Author

@ZryletTC ZryletTC Feb 16, 2022

Choose a reason for hiding this comment

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

Yeah, a quick function to check valid hutch names would be nice. Good quick issue for intern :)
Created #106

scripts/imgr Outdated Show resolved Hide resolved
if [ `whoami` == "xppopr" ]; then
window_id=`xdotool search --sync --onlyvisible --name 'IocManager'`
# Do some window cleanup for xpp
if [ "$(whoami)" == "xppopr" ]; then
Copy link
Member

Choose a reason for hiding this comment

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

This gave me a laugh. Maybe eventually we should have some uniform way of doing this across the various scripts and hutches.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Created #107

Copy link
Member

@ZLLentz ZLLentz left a comment

Choose a reason for hiding this comment

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

LGTM

@ZryletTC ZryletTC merged commit 6f57ad5 into pcdshub:master Feb 16, 2022
@ZryletTC ZryletTC deleted the imgr branch February 16, 2022 23:02
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.

Add imgr
2 participants