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

DM-41764: Improve filter name parsing #45

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

jmeyers314
Copy link

No description provided.

]

EMPTY_FILTERNAMES = [
"blank", "empty", "unknown"
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we can/should assume that unknown means empty - that's usually a sign that something is wrong in the header service. I think we need to treat that as genuinely not knowing.


Returns
-------
`dict`
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this line needs to read something like

wheelConfiguration : `dict`

so that it has a variable name, not just a type.

"""
out = parseFilterName(filterName)
if len(out['filter']) > 1 or len(out['disperser']) > 1:
raise ValueError(f"Got more than one filter or disperser in {filterName}")
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe include the whole {out} in the message for easier debug.

filter, disperser : `tuple` of `str`
The filter and the disperser names.
"""
out = parseFilterName(filterName)
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't love out as a variable name here (it's fine internal to the parsing function though, of course, as that's the return value there) but that's not what you're returning here, it's what you're catching and using, so maybe wheelConfig or something?

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