-
Notifications
You must be signed in to change notification settings - Fork 6
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 ability to preserve text form (formatting, etc.) of registry data. #84
base: master
Are you sure you want to change the base?
Conversation
Hi Matthew -- I like the idea, but I wonder if the root symptom is that we could better use the hierarchy in the registry to organize the information. |
I think of the registry like a file system, and it's often useful to be able to put hierarchical info in an individual file, not just in small files in a directory tree. There are some other issues such as that we can only make atomic updates to individual keys, not across multiple keys or directories; it's hard to monitor a whole registry tree for changes; and the editor interface that we have only shows one directory at a time, not a tree rooted in the current directory. So I think there are reasons one would want to have a more complicated value in a single key and it would be nice to have it formatted in a reasonable way. I suppose an alternative would be to have a "pretty-printer" that can format large keys in a way that makes them easier to parse visually and to edit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM :) Thanks for taking the time to detail why you have this PR
val pattern = Pattern(pat) | ||
data.convertTo(pattern) | ||
} | ||
|
||
@Setting(id=21, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this setting needs some docs explaining how it works. In our discussion yesterday it took a while before it came out that the string can only be stored if it can be parsed to LabRAD data. This might seem obvious, but it's an important feature. It's probably also worth explicitly noting that the point of this setting is to use the user as a pretty-printer and that really only editors (i.e. scalabrad-web) should use it.
The goal here is to make it possible to preserve text formatting in registry values. This would be particularly nice when editing large keys that have some structure, such as nested clusters. This will require some additional modifications to the web interface, which are in progress.