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

Consider alternatives to PersistentDict #14

Open
prjemian opened this issue Nov 2, 2024 · 2 comments · May be fixed by #30
Open

Consider alternatives to PersistentDict #14

prjemian opened this issue Nov 2, 2024 · 2 comments · May be fixed by #30
Assignees
Labels
bug Something isn't working

Comments

@prjemian
Copy link
Collaborator

prjemian commented Nov 2, 2024

Use of bluesky's PersistentDict has been problematic at times, as described in these GitHub issues:

Consider alternatives to this file-backed Python dictionary, which responsibility is to remember certain metadata keys (in RE.md) between sessions, such as scan_id.

@prjemian prjemian added the bug Something isn't working label Nov 2, 2024
@prjemian
Copy link
Collaborator Author

prjemian commented Nov 2, 2024

One possible alternative:
The GemViz (and MdaViz) projects have used Qt's QSettings to save application settings (window geometry, user-configurable choices, ...)

@prjemian
Copy link
Collaborator Author

Requirements to replace bluesky.utils.PersistentDict.

  • Contents must be JSON serializable.
  • Contents stored in a single human-readable file.
  • Sync to file shortly after dictionary is updated.
  • File format should support comments.
  • Do not use zict. It uses a directory with one file per dictionary key. Zict creates an unnecessary problem (recurrent incidents at APS) with how it names these files. The problem is exacerbated when concurrent sessions are updating via PersistentDict.

@prjemian prjemian self-assigned this Nov 27, 2024
prjemian added a commit that referenced this issue Nov 28, 2024
prjemian added a commit that referenced this issue Nov 28, 2024
prjemian added a commit that referenced this issue Nov 28, 2024
prjemian added a commit that referenced this issue Nov 28, 2024
prjemian added a commit that referenced this issue Nov 28, 2024
@prjemian prjemian linked a pull request Nov 28, 2024 that will close this issue
prjemian added a commit that referenced this issue Nov 28, 2024
prjemian added a commit that referenced this issue Nov 28, 2024
prjemian added a commit that referenced this issue Nov 29, 2024
prjemian added a commit that referenced this issue Nov 29, 2024
prjemian added a commit that referenced this issue Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant