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

Epicsarch qs #378

Merged
merged 21 commits into from
Apr 4, 2024
Merged

Epicsarch qs #378

merged 21 commits into from
Apr 4, 2024

Conversation

c-tsoi
Copy link
Contributor

@c-tsoi c-tsoi commented Mar 21, 2024

Description

I have added several feature edits and a couple of new features. Changes are listed below:

function edit
update_file: feature that looks at the current hutches epicsArch file and compares it to the questionnaire. It looks for instances of duplicate PVs and if this occurs then it will take the alias from the questionnaire instance and replace it for the one in the local epicsArch file. If there is no existing archfile it will do the existing task of of pulling the questionnaire data into a fresh archfile.

--softlink: this feature gives the users to unlink the symbolic link to epicsArch_experiment_specific.txt. It then replaces that link to point to the archfile to the new experiment.

--level: this feature gives developers the ability to set a debugging level. This shows where the code faults in the case that it does.

--cds-items: this feature interacts with the Python Questionnaire Client, for a given run and experiment. It pulls all of the elements in the cds tab of the questionnaire in the form of a dictionary. From there is parses the dictionary for keys with the string "pcds-setup". It then sorts the keys by type and shows them in a PrettyTable output in the terminal.

--link-path: this allows the user to provide a custom filepath for creating softlinks. Defaults to /cds/group/pcds/dist/pds/{}/misc/.

I have also edited some of the test scripts to match the new method names. I have also skipped one of the test methods because the test is no longer representing the functionality of the method and interactive testing has been done on it.

Motivation and Context

This change helps to prevent duplicating PV entries across the arch files, ensures we have the most current information from the questionnaire, and gives us another option besides overwriting the current file. It also provides helper functions for tasks and provides developer tools for debugging in the case of errors.

How Has This Been Tested?

The majority of the testing has been done with the existing test scripts on the hutch python folder and for the methods that no longer help I have done some interactive testing.

Where Has This Been Documented?

(https://confluence.slac.stanford.edu/display/PCDS/Questionnaire+flight+rules)
This page is a WIP but will have descriptions and examples of how to use the new methods.

Pre-merge checklist

  • Code works interactively (a real hutch config file can be loaded)
  • Code contains descriptive docstrings, including context and API
  • New/changed functions and methods are covered in the test suite where possible
  • Test suite passes locally
  • Test suite passes on GitHub Actions
  • Ran docs/pre-release-notes.sh and created a pre-release documentation page
  • Pre-release docs include context, functional descriptions, and contributors as appropriate

@c-tsoi c-tsoi requested a review from ZLLentz March 21, 2024 16:49
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.

Hi, the core here is good. I pointed out a lot documentation issues (DOC) and typos, and a small number of important issues. I also had a some things that confused me (may or may not be issues) and a bunch of nitpicks.

pyproject.toml Outdated Show resolved Hide resolved
hutch_python/epics_arch.py Show resolved Hide resolved
hutch_python/epics_arch.py Outdated Show resolved Hide resolved
hutch_python/epics_arch.py Outdated Show resolved Hide resolved
hutch_python/epics_arch.py Outdated Show resolved Hide resolved
hutch_python/epics_arch.py Outdated Show resolved Hide resolved
hutch_python/epics_arch.py Outdated Show resolved Hide resolved
hutch_python/epics_arch.py Outdated Show resolved Hide resolved
hutch_python/qs_load.py Outdated Show resolved Hide resolved
hutch_python/qs_load.py Outdated Show resolved Hide resolved
c-tsoi and others added 7 commits March 21, 2024 16:47
Co-authored-by: Zachary Lentz <ZLLentz@users.noreply.github.com>
Co-authored-by: Zachary Lentz <ZLLentz@users.noreply.github.com>
Co-authored-by: Zachary Lentz <ZLLentz@users.noreply.github.com>
Co-authored-by: Zachary Lentz <ZLLentz@users.noreply.github.com>
Co-authored-by: Zachary Lentz <ZLLentz@users.noreply.github.com>
Co-authored-by: Zachary Lentz <ZLLentz@users.noreply.github.com>
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.

This is clean- just one more documentation suggestion and a minor minor nitpick

hutch_python/epics_arch.py Outdated Show resolved Hide resolved
hutch_python/epics_arch.py Outdated Show resolved Hide resolved
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.

Re-running the failed job (looks like an intermittent cloud networking error)
Otherwise this looks great, marking as approved!

@ZLLentz
Copy link
Member

ZLLentz commented Apr 4, 2024

OK I am going to merge this!
Deployment-wise: I can put this in dev_conda, and I can also tag the repo so it makes it into the next pcds_conda. Do you want either or both of these things?

@ZLLentz ZLLentz merged commit 5a1e397 into pcdshub:master Apr 4, 2024
9 checks passed
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.

2 participants