shadho icon indicating copy to clipboard operation
shadho copied to clipboard

Shadho insisting on finding its config file and working directory

Open tphung3 opened this issue 3 years ago • 2 comments

Shadho seems to insist on finding its config file as there's no option for me to tell shadho to use the default configuration. It'd be nice if there's an option to do so, maybe in Shadho() object instantiation. Also shadho looks for its working directory .shadho when it doesn't need one. This is because I installed shadho via pip, and I installed pip via conda, so .shadho already lives in a conda environment, instead of the home directory.

tphung3 avatar Dec 01 '21 18:12 tphung3

Is this causing a crash? If so, could you send the traceback?

In the past, I used the .shadhorc file to point to the Work Queue installation in .shadho so that we could use the binaries regardless of their install location and presence in $PATH. This would persist with a non-Anaconda installation, so I would like to find a solution that accommodates both standard pip installs and conda environments.

jeffkinnison avatar Dec 01 '21 21:12 jeffkinnison

It is causing a crash. You can find the shadho integration test with all the necessary files in https://github.com/cooperative-computing-lab/cctools-packaging-test (.shadhorc, wq_sin.py, run_sin.sh, sin.py, shadho-test.sh). The test (./shadho-test.sh) runs fine now, but if you comment out line 20 and 23, then running shadho raises two exceptions, respectively: ShadhorcDoesNotExistError at line 99 in {shadho_github_repo}/shadho/configuration.py and ShadhoInstallNotfoundError at line 130 in {shadho_github_repo}/shadho/configuration.py. The .shadhorc is simply a copy of the default configuration as defined in {shadho_github_repo}/shadho/configuration.py. Also an empty .shadho dir solves the exception raised at line 130, so I guess shadho doesn't need to find it when installed via conda. Hope this helps!

tphung3 avatar Dec 02 '21 16:12 tphung3