NSLS-II / eiger-io

I/O tools for the Eiger detector
BSD 3-Clause "New" or "Revised" License
1 stars 9 forks source link

Add filelist #13

Closed jrmlhermitte closed 6 years ago

jrmlhermitte commented 6 years ago

Meant to address: https://github.com/NSLS-II-CHX/eiger-io/issues/12

Works on my machine:

from eiger_io.fs_handler import EigerHandler
db.reg.register_handler('AD_EIGER2', EigerHandler)

In [34]:     res_uids = db.get_resource_uids(header)

In [35]:     for uid in res_uids:
   ....:             datum_gen = db.reg.datum_gen_given_resource(uid)
   ....:             datum_kwarg_gen = (datum['datum_kwargs'] for datum in
   ....:                                datum_gen)
   ....:             filepaths.extend(db.reg.get_file_list(uid, datum_kwarg_gen))
   ....:     

In [36]: filepaths (omited some info deliberatlely)
Out[36]: [...dc74d51b-4463-4e6b-8e8b_3405_master.h5']
jrmlhermitte commented 6 years ago

testing with @yugangzhang later this morning. This PR should be either merged or elaborated by this afternoon.

jrmlhermitte commented 6 years ago

Looks good. Since this is a major change, I tagged at v2.0.1 I think this means you can increase the version to this in the lightsource2recipes and keep the build number zero.