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

Update FablibManager.list_sites() #255

Closed
wants to merge 8 commits into from
Closed

Conversation

sajith
Copy link
Member

@sajith sajith commented Oct 16, 2023

Resolves #238.

@sajith sajith added the no changelog Causes to skip changelog checks in "checks" workflow label Oct 16, 2023
@sajith
Copy link
Member Author

sajith commented Oct 18, 2023

When calling fablib.list_sites(), with fields and/or filter_function arguments, we have some inconsistency in using pretty names like "PTP Capable" and non-pretty names like "ptp_capable":

  • Docstrings have examples with pretty names, which do not work.
  • The data that comes to fablib from FABRIC services are in non-pretty form.
  • The data that is presented to users (in table headers) is in pretty form.
  • Jupyter notebook examples use a mix of both forms. Some of them are broken.

Examples from Jupyter notebooks:

This PR will likely break one set of notebooks. We can probably make both of them work with what would be an ugly workaround hack, but it would be much better if we consistently pick one form and stick with it. That would entail some changes in example notebooks. I don't know if we will be breaking experimenters' notebooks.

@paul-ruth
Copy link
Contributor

I'm not really sure what the problem is here. I don't see any notebooks that use pretty names for searching. I think everything should be non-pretty except when the table is printed.

I think maybe that notebook called "filter.ipynb" is just leftover from development. If it is not linked in the start_here notebook, we can probably just delete it.

@kthare10
Copy link
Collaborator

Agree with Paul, we should use non_pretty_names for filtering. That's how I have seen it use. We can add more documentation to list_sites() function to make it more clear and also share the calls using which user can know the non-pretty names.

@sajith
Copy link
Member Author

sajith commented Oct 19, 2023

Isn't pretty names the better/simpler UX? With pretty names, fablib users can use the names that appear on table headers. With non-pretty names, they are left to figure it out themselves, or look for more documentation. We should remove that friction.

@kthare10
Copy link
Collaborator

kthare10 commented Apr 9, 2024

@sajith - can this be closed?
I thought the consensus was to not use Pretty Names for filtering.

@sajith
Copy link
Member Author

sajith commented Apr 9, 2024

@kthare10 It can be closed, but I also want to be clear that I do not agree with the consensus. :-)

We should be making things easier for users. Being able to filter by the column titles would be easier for users. Having to figure out the special names corresponding to column titles is an extra unnecessary step.

@sajith sajith closed this Apr 12, 2024
@sajith sajith deleted the 238.list-sites-fields branch April 12, 2024 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no changelog Causes to skip changelog checks in "checks" workflow
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FablibManager.list_sites(filter=..) may be broken
3 participants