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

ENH Database support for tuples and list #26

Merged
merged 2 commits into from
Aug 5, 2024

Conversation

gadorlhiac
Copy link
Collaborator

Description

This PR adds database support for parameters which are tuples/lists. We assume, for the time being at least, that most parameters are not long tuples/lists. Therefore, they are handled by splitting the values and appending an index to the column keys in the database. A potential use case could be to have a single parameter which is a tuple representing a minimum and a maximum.
E.g. a["b"] in the nested dictionaries below:

outer = {
    "a": {
        "b": (1, 2),
        # ...
    },
    # ...
}

will have column keys of a.b[0] and a.b[1].

Checklist

  • Database support/handling for tuples/lists in a parameter.

PR Type:

  • New feature/Enhancement

Address issues:

  • NA

Testing

In use with cxic0415 and cxic0515 processing.

Screenshots

@gadorlhiac gadorlhiac requested a review from valmar May 31, 2024 15:10
@gadorlhiac gadorlhiac marked this pull request as ready for review May 31, 2024 15:10
Copy link
Contributor

@valmar valmar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@valmar valmar merged commit 8468b2b into slac-lcls:dev Aug 5, 2024
1 check 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