usnistgov / PyHyperScattering

Tools for hyperspectral x-ray and neutron scattering data loading, reduction, slicing, and visualization.
Other
6 stars 8 forks source link

rename summarize_run to match tiled/bluesky nomenclature #103

Closed EliotGann closed 10 months ago

EliotGann commented 10 months ago

run has a specific meaning the the bluesky tiled environment, which can cause confusion in this context. A more appropriate name might be search_catalog or something similar. @BijalBPatel please comment

EliotGann commented 10 months ago

https://github.com/usnistgov/PyHyperScattering/blob/6e26f4c64a811eb70bd096b7d32eec4c50a847aa/src/PyHyperScattering/SST1RSoXSDB.py#L134

BijalBPatel commented 10 months ago

Totally agree - i was thinking search_catalog is a good name as well. I can take this on.

pbeaucage commented 10 months ago

I like this name too, one request, it should probably be typeset searchCatalog to match the rest of the methods of that class.

Also, if you leave a stub in for summarize_run something like:

def summarize_run(*args,**kwargs):
    warnings.warn(
'summarize_run has been renamed to searchCatalog.  This will stop working in PyHyperScattering 1.0.0 and later.',
DeprecationWarning,
stacklevel=2)
    return searchCatalog(*args,**kwargs)

It would be a kind thing to do.

EliotGann commented 10 months ago

On second thought perhaps search catalog is erring too much on the side of someone knowing the catalog structure. Maybe just search? Or summarize?? I’m not sure. I imaging someone tab completing seeing searchcatalog might be confused but seeing searchforruns might not?

BijalBPatel commented 10 months ago

I think searchCatalog is a good mix of approachable (e.g., library catalog) and consistent with the Bluesky syntax. Feels like we've entered the 'good enough' zone where tutorials and docs can clear up the confusion.

EliotGann commented 10 months ago

yeah, I buy that. personally I like verbose names but "search_catalog_for_experimental_run_summary" is probably a little bulky