pcdshub / pcdshub/engineering_tools

Revise in-hutch camera check from camViewer script

Open
#205 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
5
Forks
36
Avg merge
2d 17h
Merged PRs (30d)
3

Description

Expected Behavior

The checks in our scripts should be meaningful and correct to give us proper feedback

Current Behavior

There's a place in camViewer where we check if the camera name exists in a hutch via counting and then compare the count to the camera name, which is incorrect. If the line is changed to store the camera name instead of the count we still have some issues because the following checks are a bit wonky.

This gives a confusing printout but doesn't break the script because regardless of the result of the check we proceed anyway.

https://github.com/pcdshub/engineering_tools/blob/953c167e0701756b8ff41da1362e1a2b2cb525e4/scripts/camViewer#L321-L333

Possible Solution

Revise as appropriate

Context

Originally posted by @ZLLentz in https://github.com/pcdshub/engineering_tools/pull/204#discussion_r1781871154

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in scripts/camViewer around lines 321-333 and read the related discussion from pull request #204. Trace how the camera name check counts and compares values, then clarify the following checks so they provide meaningful, non-confusing feedback. Done means the in-hutch camera validation reports the correct result without preventing the script from proceeding.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.