Skip to content
This repository has been archived by the owner on Sep 1, 2023. It is now read-only.

Configuration base class must use pkg_resources to find config file(s) #1593

Closed
rhyolight opened this issue Dec 4, 2014 · 7 comments · Fixed by #1596
Closed

Configuration base class must use pkg_resources to find config file(s) #1593

rhyolight opened this issue Dec 4, 2014 · 7 comments · Fixed by #1596
Assignees
Milestone

Comments

@rhyolight
Copy link
Member

Currently, this class searches several places for configuration files, but does not take advantage of pkg_resources to get them. In order to properly distribute nupic as a python package, it must be updated to use pkg_resources to find these files.

The existing path logic can stay in place, and users should still be able to override with NTA_CONF_PATH. But when these methods find nothing, pkg_resources should be used to attempt to access them.

cc @scottpurdy

@scottpurdy
Copy link
Contributor

@rhyolight - are you planning on doing this now or would it be helpful for me to send a PR for it?

@rhyolight
Copy link
Member Author

PR welcome!

Sent from my MegaPhone

On Dec 3, 2014, at 4:58 PM, Scott Purdy notifications@github.com wrote:

@rhyolight - are you planning on doing this now or would it be helpful for me to send a PR for it?


Reply to this email directly or view it on GitHub.

@rhyolight
Copy link
Member Author

@scottpurdy I started working on it, but got neck-deep in distutils and setuptools docs. The only line of code I wrote was import pkg_resources. :P

@rhyolight
Copy link
Member Author

Hey @scottpurdy, do you want to pair on this? It would be helpful to me, cause I have to work on this right away for a release and I need to learn this stuff anyway. How about I create a remote branch with some initial changes and comment on it with questions when I have something you can look at. Then you can lambaste me for doing it wrong. ;)

@rhyolight
Copy link
Member Author

I think I found the right place to start: http://peak.telecommunity.com/DevCenter/setuptools#including-data-files

@scottpurdy
Copy link
Contributor

Yeah Matt, just let me know how I can help. I actually wasn't familiar with the process for making sure the files are included with setup.py but that link looks good. The only thing odd in that link is that they are using Requirement.parse to find where the data files are where you can probably just use pkg_resources with a Python module instead.

@rhyolight
Copy link
Member Author

Gotcha, thanks. Will ping you later when I have some code pushed.

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

Successfully merging a pull request may close this issue.

2 participants