-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Replaces datasethelpers with pkg_resources. #1902
Conversation
- Added example data location to setup.py as package data. - Added example/prediction/data files to MANIFEST. - Updated tests to use pkg_resources to fetch data files. - Updated example code to fetch data through pkg_resources. - Used pkg_resources to load files in nupic.data code. - Removing datasethelpers and tests. - Updated tests to write data files into examples/prediction/data. - Updated experiment runner to resolve paths better. - The experiment stream source could be an absolute path or a path relative to the "examples.prediction.data" pkg_resource. Updated its logic to identify absolute paths and convert relative paths through pkg_resources. - Updated swarming test configuration. - A bunch of the swarming test configurations were expecting datasethelpers to find the input file on a search path that doesn't exist anymore. I solved this by: - moving test_data.csv from tests/swarming/nupic/swarming/data into the package_data directory in the "swarming" folder - adding __init__.py to the swarming folder mentioned above - updating ModelRunner to call normalizeStreamSources(), which now does the pkg_resoruces lookup - updating all the description files to refer to "swarming/test_data.csv"
@scottpurdy Sorry, the --force push worked, but GitHub wouldn't let me re-open the PR. |
🍏 😄 Finally. |
👍 Looks fine. Thanks for replace support code that is natively provided by python eco-system, @rhyolight ! |
@@ -10,3 +10,5 @@ recursive-include extensions *.hpp *.cpp | |||
recursive-include external/common/share/swig *.* | |||
recursive-include external/darwin64 swig *.a | |||
recursive-include external/linux64 swig *.a | |||
|
|||
recursive-include examples/prediction/data *.csv *.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: newline
lol!!! |
Also cleaned up unecessary __init__.py files. Found a few places where test code was explicitly looking for data in "examples/prediction/data" and updated them to also use pkg_resources.
@scottpurdy Ready for your re-review. |
Unexpected build error in Travis:
I usually see this when I haven't cleaned up leftover files from builds on other branches, so this doesn't make sense to me. It is not happening on my local build. |
Hoping that getting the new |
This same error is suddenly happening on the |
@rhyolight u sure about the broken master? My local build is just fine, and so seems #1907 PR |
@breznak Yeah it's broken for me locally, too... I'm looking into it. |
👍 |
Waiting for #1909 then I'll merge it in. |
Replaces datasethelpers with pkg_resources.
as implemented in numenta#1902.
Reflect using pkg_resources to locate resource files as implemented in #1902.
Replaces datasethelpers with pkg_resources.
as implemented in numenta#1902.
Reflect using pkg_resources to locate resource files as implemented in numenta#1902.
Fixes #1899
path relative to the "examples.prediction.data" pkg_resource. Updated its logic to identify absolute paths and convert relative paths through pkg_resources.