brainglobe-atlasapi icon indicating copy to clipboard operation
brainglobe-atlasapi copied to clipboard

Configurable config & atlas location

Open chrisroat opened this issue 2 years ago • 6 comments

It seems like $HOME/.brainglobe is hardcoded as the default location for atlas downloads. I would like to be able to change this, but it seems that <python_location>/site-packages/bg_atlasapi/bg_config.conf is the hardcoded location for configuration that could change the download location.

I would suggest that site-packages not be written to, and that the default location of bg_config.conf be in the home directory (in .config/ or as .bg_config.conf). If it is not present, then the current defaults could be used.

chrisroat avatar Dec 16 '21 18:12 chrisroat

Yep, I think this sounds like a good idea. The current behaviour isn't great, I think it was inherited from another package.

We'd welcome a PR if you have the time @chrisroat!

adamltyson avatar Dec 16 '21 18:12 adamltyson

I can do that. Is it OK to drop support for the current behavior, given its still in alpha?

chrisroat avatar Dec 16 '21 18:12 chrisroat

Yep, I think so, but we may think about how/when we release on PyPI - @vigji, @FedeClaudi?

adamltyson avatar Dec 16 '21 18:12 adamltyson

I don't know about you guys, but I never had the need myself or head about issues from people with the need to change that, so I feel that dropping support for current behavior would not cause any trouble!

Also, I am 100% on board with not having the config in site-packages, I think having it in the home directory would be much better.

vigji avatar Dec 16 '21 22:12 vigji

I've edited the file for multi-user installations, but I think anyone else who has done the same would be fine with a change.

adamltyson avatar Dec 17 '21 07:12 adamltyson

Yeah this all sounds great!

FedeClaudi avatar Dec 17 '21 10:12 FedeClaudi