APS-2BM-MIC / ipython-user2bmb

ipython configurations for the tomography instrument
2 stars 5 forks source link

tagging the scan script #57

Open prjemian opened 5 years ago

prjemian commented 5 years ago

@decarlof writes:

perhaps bluesky already does this ... here is the issue:

how to link each data set with the scanscript that was used to collected it?

Now at 2-BM, I manually git commit before starting an experiment and I send to the user the github link at that specific commit, for example Nik Chawla's group got this (dimax_fly_loop_vertical_scan.py) and I was now considering adding this in the hdf file itself with:

def get_sha(repo_dir):
    sha = subprocess.check_output(['git', 'rev-parse', 'HEAD'], cwd=repo).decode('ascii').strip()
    return sha

but in practice this is not going to work because it still requires the manual commit before each scan to capture any script change.

So I bumped into PyGithub that can easily solve the problem by checking in automatically.

Is this, or a similar functionality, is already part of bluesky?

f

prjemian commented 5 years ago

Not sure about that. Seems like a feature we could add easily even if it is not part of bluesky. There are a couple aspects to consider: