openworm / muscle_model

Model of C elegans body wall muscle based on Boyle & Cohen 2008
http://www.opensourcebrain.org/projects/muscle_model
Other
47 stars 24 forks source link

Create setup.py to install dependencies to run NeuroML2 model #29

Closed slarson closed 8 years ago

slarson commented 9 years ago

Translate the instructions to install the packages for the NeuroML2 model into a setup.py that can be run once. This should be placed in the NeuroML2 directory

INSTALLDIR=~/git
mkdir $INSTALLDIR
cd $INSTALLDIR
git clone https://github.com/openworm/muscle_model
pip install git+https://github.com/OpenSourceBrain/osb-model-validation
pip install lxml
git clone https://github.com/NeuralEnsemble/libNeuroML.git
cd libNeuroML
git checkout development
python setup.py install
cd ..
git clone https://github.com/LEMS/pylems.git
cd pylems
git checkout development
python setup.py install
cd ..
git clone https://github.com/OpenSourceBrain/OSB_API.git
cd OSB_API/python
python setup.py install
pip install git+https://github.com/purcell/airspeed.git
cd ../..
git clone https://github.com/openworm/BlueBrainProjectShowcase
slarson commented 9 years ago

From @net239:

I tried to create a setup.py for this directory ( Attached), but I am facing following issues - may be because I am new to Python. If you can give a few hints to address this, I can probably finish this next week.

To force download of dependencies - I listed following packages and directories :

dependency_links = ['https://github.com/LEMS/pylems.git' ,
                    'https://github.com/NeuralEnsemble/libNeuroML.git' ,
                    'https://github.com/OpenSourceBrain/OSB_API.git' ,
                    'https://github.com/purcell/airspeed.git' ,
                    'https://github.com/openworm/BlueBrainProjectShowcase.git'],
install_requires=['lxml','pylems','libNeuroML' , 'PyOSB' , 'airspeed' ],

issue 1 : Its able to download all modules except PyOSB issue 2 : I think its downloading from standard Perl package website instead of the links I specify above - I could be wrong …but I am not sure how can force setup.py to only look at above dirs issue 3 : its not downloading and placing the corresponding source code from git repositories locally - for person to browse all source code of dependent modules.

so basically I don’t think setup.py is right approach if you want to replicate all git code of all modules locally …

let me know if you have a few hints to point me to right direction for better packaging of all your code …

slarson commented 9 years ago

@net239 check out the setup.py for PyOpenWorm here:

https://github.com/openworm/PyOpenWorm/blob/alpha0.5/setup.py

It does some pulling from GitHub in some cases that may serve as a template or pattern for what you are trying to do here.

net239 commented 9 years ago

Thanks. I have managed to create setup.py which downloads dependencies from git.
Refer : https://github.com/net239/working/blob/master/setup.py

A. It downloads everything mentioned in shell script pasted in this issues except : BlueBrainProjectShowcase

B. I also see that to run the analyze_*.sh scripts you need jnml from https://github.com/NeuroML/jNeuroML this is a JAVA project so I could not specify in depdenency_links

C. take a look at https://github.com/net239/working/blob/master/setup.py and let me know if its good to commit

slarson commented 9 years ago

That's great @net239 -- please join us over in the gitter chat room on this: https://gitter.im/openworm/muscle_model

travs commented 9 years ago

The script is working except for pyNeuroML, which I can't get to install directly from the script. Created a branch to try this out.

Worst case, we may be able to write a very small shell script that installs pyNeuroML and then runs setup.py

rgerkin commented 9 years ago

@travs What's the specific error you're getting trying to install pyNeuroML?

travs commented 9 years ago

@rgerkin https://github.com/NeuroML/pyNeuroML/issues/9. And then, after installing mock with pip, https://github.com/NeuroML/pyNeuroML/issues/11.