bbfrederick / rapidtide

rapidtide - a suite of programs for doing time lag correlation analysis on fMRI data
Apache License 2.0
75 stars 14 forks source link

--version command doesn't work #92

Closed dmd closed 2 years ago

dmd commented 2 years ago

Expected: rapidtide --version would return the version number.

Got:

$ docker run fredericklab/rapidtide:latest rapidtide --version
usage: rapidtide [-h] [--denoising | --delaymapping] [--venousrefine | --nirs]
                 [--datatstep TSTEP | --datafreq FREQ] [--noantialias]
                 [--invert] [--interptype {univariate,cubic,quadratic}]
                 [--offsettime OFFSETTIME] [--autosync]
                 [--filterband {None,vlf,lfo,resp,cardiac,lfo_legacy}]
                 [--filterfreqs LOWERPASS UPPERPASS]
                 [--filterstopfreqs LOWERSTOP UPPERSTOP]
                 [--filtertype {trapezoidal,brickwall,butterworth}]
                 [--butterorder ORDER] [--padseconds SECONDS]
.
.
.
dmd commented 2 years ago

The problem is you've selected action="store_true".

You should instead be using the version action action="version", which overrides any required arguments.

You will need to prepopulate a formatted string from tide_util.version() and use it as the value for version=.

Unfortunately, you can't have a multi-line version. (You can if you set RawDescriptionHelpFormatter, but that messes up the formatting of the rest of your help, so don't.)