This uses the fork from @rtrhd (#8 ) as a template for packaging, but it does not update the internal structure. Hopefully it can be easily audited and pulled -- if moving toward a pypi installation is in the roadmap (issue #38).
ICA_AROMA.py and ICA_AROMA_functions.py were renamed and moved inside the package directory. ICA_AROMA.py is now nested inside a massive function. Most of the changes are just an indent from this. See git diff -w --word-diff=color f1358e0 7e491a7 -- ica_aroma/ica_aroma.py for a clean view of the changes
__init__.py exists with a function to find the module path where *_mask.nii.gz will reside.
ICA_AROMA.py (now ica_aroma/ica_aroma.py) needed two changes to be packaged:
instead of setwd using __file__, we use the module path (__init__.py:get_data_path())
there's a little kludge to deal with passing sys.argv into the new primary function. I think argv.pop needs to be run after initializing the parser to keep the script name argv[0] from being used as a script argument.
tests (with pytest) for the two changes are in tests/tests_run.py. There's a Makefile for setup. (make test), using refin input images from @rtrhd
the branch can be installed with pip like
pip install git+https://github.com/WillForan/ICA-AROMA.git@maartenmennes-setup.py --user -U
ica_aroma # prints usage
This uses the fork from @rtrhd (#8 ) as a template for packaging, but it does not update the internal structure. Hopefully it can be easily audited and pulled -- if moving toward a pypi installation is in the roadmap (issue #38).
ICA_AROMA.py
andICA_AROMA_functions.py
were renamed and moved inside the package directory.ICA_AROMA.py
is now nested inside a massive function. Most of the changes are just an indent from this. Seegit diff -w --word-diff=color f1358e0 7e491a7 -- ica_aroma/ica_aroma.py
for a clean view of the changes__init__.py
exists with a function to find the module path where*_mask.nii.gz
will reside.ICA_AROMA.py
(nowica_aroma/ica_aroma.py
) needed two changes to be packaged:__file__
, we use the module path (__init__.py:get_data_path()
)sys.argv
into the new primary function. I thinkargv.pop
needs to be run after initializing the parser to keep the script nameargv[0]
from being used as a script argument.pytest
) for the two changes are intests/tests_run.py.
There's aMakefile
for setup. (make test
), usingrefin
input images from @rtrhdthe branch can be installed with pip like