pcdshub / happi

Heuristic Access to Positions of Photon Instruments
https://pcdshub.github.io/happi/master
Other
13 stars 29 forks source link

MNT: make happi repair not save items that have no changed fields #343

Closed nstelter-slac closed 2 months ago

nstelter-slac commented 3 months ago

Description

Make it so running happi repair only saves an item if it had a field actually changed during the repair process. This stops the last_edit times from being updated on unchanged items.

Also, it wasn't immediately clear to me how to use the cli along with the example db.json (so I could try commands on a small example db). So added an example cfg and some instructions to the README to make this easy.

Motivation and Context

closes #324

How Has This Been Tested?

Manually tested and verified, and test case added.

Where Has This Been Documented?

In function's doc string and comments.

Pre-merge checklist

tangkong commented 3 months ago

Strange that the multi-backend test is only now failing, after being like that for some time. That failure is unrelated to the changes you made here.

nstelter-slac commented 3 months ago

think my github account needs more permissions in this repo, i cant seem to run CI or add reviewers

nstelter-slac commented 3 months ago

also sry im setting my PRs as drafts atm b/c still need to fill out descriptions