Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding a stable way to define ISISROOT #25

Open
michaelaye opened this issue Aug 12, 2019 · 1 comment
Open

adding a stable way to define ISISROOT #25

michaelaye opened this issue Aug 12, 2019 · 1 comment

Comments

@michaelaye
Copy link
Contributor

michaelaye commented Aug 12, 2019

The line:

ISIS_ROOT = os.environ.setdefault('ISISROOT', '/usgs/pkgs/isis3/isis')

in pysis.env is all what controls where to find ISISROOT.
I have found this very fickle in trying to make things work across several conda environments (which is now the default install for ISIS3), so I propose to add functionality to pysis.env.py to get the paths from a config file in the users' home.
Currently, this file on my side simply looks like this:

$ cat .isisroot.toml                                                                        (isis3)
ISISROOT = '/Users/klay6683/miniconda3/envs/isis3'
ISIS3DATA = '/isis3/data'

and I'm using the toml format (https://github.com/toml-lang/toml).
I'm thinking about a few approaches how this fluently could be combined with an existing os.enviroment variable, but let's discuss these details in my PR I gonna start later this week after my current meeting is over (where, of course, I needed pysis to work and it didn't ;) ).

We could also have this config file to be created after the current ISIS3 install, it's simple enough. But much more stable against environment variable manipulations caused by switching conda envs (admittedly, that's the whole idea of conda, obviously).

@Kelvinrr
Copy link
Contributor

Should be simple enough to prefer a config over an env var (config doesn't exist, back up to use an env var). But what do you mean by "We could also have this config file to be created after the current ISIS3 install"? As in make ISIS generate a pysis config file? That is how I am understanding it which I don't think would be ideal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants