Skip to content
This repository has been archived by the owner on May 18, 2021. It is now read-only.

Add MATLAB function to return current toolbox software version #130

Open
rtopfer opened this issue Jun 17, 2020 · 2 comments
Open

Add MATLAB function to return current toolbox software version #130

rtopfer opened this issue Jun 17, 2020 · 2 comments

Comments

@rtopfer
Copy link
Contributor

rtopfer commented Jun 17, 2020

To enable legacy support etc. there should be version tags included in saved files such as

  • system hardware config.json files
  • shim reference maps
  • processed images and experimental results

Presumably .json should work in all cases?
This would be analogous to version tag saved in the .json sidecar output by dcm2niix.

@kousu @jcohenadad perhaps you already know how to do this? Presumably git tags would be involved.

@jcohenadad
Copy link
Member

So, there are various levels that needs to be considered here:

  • log file output by shimming-toolbox functions: should we go with a single log file that would be appended after each process?
  • output of nifti files: should we add a custom field in the json that indicates "processed by shimming-toolbox, version XXX"? This is common BIDS convention. BTW: the processed files would go under a derivatives/ folder.
  • .mat files, plots, etc.: we should indeed add version information

now, regarding how we fetch the version info:

  • in Python, there is a __version__ property of the package. Is there an equivalent in Matlab? something that would enable us to do: shimtb.version.
  • a common thing is: for stable release, have the version variable that reflects the release (e.g. 1.0.2). For development version (git master), we could fetch the git commit. This is what we do in SCT, more details here.

@gab-berest
Copy link

So, for a one time use I think that logging in a single file should be a good idea since it will be less troublesome to find the information on the specific session (all the information in one place). However, for multiple sessions, it should be in different log files to keep track of the timming of the usage and to not have a single file with 10 000+ lines.

In the end, it all depends if there is a lot of log or not. Longer logs are more difficult to get through and understand, even if all the information is there.

For the version property, I don't think there is one in matlab. It could be a simple function that checks the config file for the version and outputs it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants