timothydmorton / isochrones

Pythonic stellar model grid access; easy MCMC fitting of stellar properties
http://isochrones.readthedocs.org
MIT License
123 stars 63 forks source link

Home directory has no space for .isochrones #170

Open awallace142857 opened 2 years ago

awallace142857 commented 2 years ago

Hi,

I have successfully installed isochrones (I think) on a remote server and have tried running nosetests. This fails because it attempts to save data to ~/.isochrones but my home directory has very limited space. Is there a way of changing the default directory for .isochrones?

mgwalkergit commented 2 years ago

I have exactly the same problem.

I may have just worked around it by editing the 'isochrones/config.py' file (installed by pip per the installation instructions). I changed

os.path.expanduser(os.path.join("~", ".isochrones"))

to

"my_path/.isochrones"

where my_path is the directory, other than /home, where I want .isochrones to be written.

So far so good, but hopefully that didn't break something else...

timothydmorton commented 2 years ago

Rather than changing the source code (which will work for you, but isn't an ideal solution), you can also define an ISOCHRONES environment variable; e.g.

export ISOCHRONES=/path/to/dir/with/more/space/.isochrones
warrickball commented 2 years ago

Another solution that I've used is to create a symbolic link from ~/.isochrones to wherever you want the data to go. I've used the same trick for other packages that create local caches.