-
Notifications
You must be signed in to change notification settings - Fork 49
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
Allow PyOpenWorm to be used from any directory #400
Comments
The default db/config directory, instead of being contained in |
There are a couple of things going on here. One is that relative paths in the PyOpenWorm config are resolved against the current working directory when they should be resolved against the config file location when there is one. I can fix that in pretty short order. For retrieving contexts from remote resources without cloning a repo first, that's TODO, but largely spec'd out, though not in Github issues yet. I think what you're calling the "default database" is effectively a cache that would be created for that use case. @clbarnes, I think that's appropriate for this use-case. Just to underscore, what's in that cache is not all of what's in a |
It also looks like there's not much of a cross-platform standard when it comes to setting a cache directory, although I suppose so long as it's consistent for POW it's fine. If an OS manufacturer doesn't want to define a standard cache directory, then they can deal with caches in nonstandard places... |
Expected behavior
A Python script should be able to be run from any directory and import PyOpenWorm and get access to the default database/configuration without knowing where PyOpenWorm is installed or requiring a local pow clone...
Actual behavior
Relative path to file .pow/pow.conf needs to be set in P.connect(), e.g.
https://github.com/openworm/c302/blob/907aa9de27ddbb3b3d3c1f80971f581da2db0010/c302/OpenWormReader.py#L31
Steps to reproduce the behavior
Run OpenWormReader.py above without .pow subfolder or without setting configFile
The text was updated successfully, but these errors were encountered: