Closed andre-merzky closed 8 years ago
Looks like my moving of the tests broke all your tests. All I did was move the file and remove the lines for test.append since py.test just does that detection for us.
Yeah, seems like I did not sync the tests with a method name change... Yay CI ! :)
The docs in README.rst should be updated for search to include your new pos argument
The docs in README.rst should be updated for search to include your new pos argument
Yep, will do.
Ok, I like the API. only thing left is the docs in the RST. I am not trying to be too nitpicky :). The previous repo was just kept so clean!
No worries, picky is fine wrt. code :)
Perfect. I see no other issues. Merging.
Hi guys! Thank you for taking over the project so that we can merge some much needed fixes! Two comments:
@eltoder I noticed the information was still in the README, and was going to replace it with the py.test steps. But frustratingly enough, the 'modern' way of testing has trouble running unless you install into the same directory with
pip install -e .
Very frustrating.
There were a few reasons I changed it in the first place:
Currently I am unsatisfied with the need to install the package with -e for the tests to work, and am frustrated with the number of PRs break because of the test file being moved.
For now maybe I should move the test file back so we can more easily merge the PRs, and ten discuss what to do after that.
Also @eltoder I created a github issue for these types of problems. https://github.com/diamondman/bitarray/issues/1
@diamondman I'm not a fan of including the tests in the installation either, but it is not uncommon in Python. Numpy and Scipy do this, and I've noticed other packages following the trend. Whatever you decide, it would be nice to have updated instructions in README.
I will work on cleaning this up. At least to make it easier to merge tests in. Then I can see if there is a more sane way to run C tests without the -e. install. And I agree I need to update README no matter what I do.
This change is backward compatible. It adds an additional
int
(or ratherssize_t
typed) pos parameter toba.search()
, and the search is started from that position on. That significantly improves runtime for consecutive searches in large bitarrays. In my specific use case of searching 1k long, distinct patterns 1M times in a 16MBit array, the time reduced from 80 seconds to 0.5 seconds.This PR was moved over from https://ilanschnell/bitarray/pull/35 .