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

Non-reliance on ~/git #25

Closed rgerkin closed 9 years ago

rgerkin commented 9 years ago

The shell scripts rely on things being checked out to ~/git (which, to be fair, is what the README directs) but for those of us that like to put files where we want, can we instead use something like an OPENWORM_HOME shell variable? I'm thinking something like this:

So instead of:

python ~/git/BlueBrainProjectShowcase/Channelpedia/NML2ChannelAnalyse.py...

each script would have something like:

OPENWORM_HOME=${OPENWORM_HOME:-~/git/}
python $OPENWORM_HOME/BlueBrainProjectShowcase/Channelpedia/NML2ChannelAnalyse.py...

The VAR=${VAR:-DEFAULT} syntax lets you use the environment variable or a default if doesn't exist. It works in most shells. This way no one has to set the OPENWORM_HOME variable, but if they want then they can and then put muscle_model in the corresponding location. In general, having an OPENWORM_HOME that refers to the top-level directory for all repos (for those of us interested in more than one repo) could be useful.

If anyone likes this I can patch all the scripts.

rayner commented 9 years ago

I'm entirely in favour of this. The README only directs people to put things in ~/git because that's what the shell scripts rely on... :-)

pgleeson commented 9 years ago

I plan to move these analysis scripts out of BlueBrainProjectShowcase next week. It's the wrong place for them. Hoping to make a single NML2 python utilities/bells & whistles package here and will hopefully solve a number of these installation issues.

rayner commented 9 years ago

@pgleeson Ah, okay, thanks. I don't think there's anything else with hard-coded paths, is there?

pgleeson commented 9 years ago

There shouldn't be. Those hard coded paths were just there for testing and not really intended as a recommended installation requirement.

slarson commented 9 years ago

Think this is closed now with #27