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
Add function to find closest bytestring/string in list #9
Comments
I can write such function. Do you ok with this? Also, have you any plans to build binary wheels for different OS?(Centos,Debian,Ubuntu)(manylinux1-..-manylinux_x_y) ? |
Definitely happy to support as many platforms as possible! Also very happy to have you add that function! That signature looks good to me. |
Done it locally on my mac, need only understand how to add tests and benchmarks. |
At the moment I'm testing it via the Python extension (i.e., I don't have C++ unit tests specifically for the C++ functions). To add a test, you can simply add a couple test functions to test/test_hexhamming.py. Don't worry about parametrizing the tests at first, something like the following would suffice: from hexhamming import check_bytes_arrays_within_dist
def test_check_bytes_arrays_within_dist():
array_of_elems = ["...", "...", ...]
elem_to_compare = ...
max_dist = ...
expected = ...
assert check_bytes_arrays_within_dist(...) == expected For benchmarking, you can do from hexhamming import check_bytes_arrays_within_dist
def test_check_bytes_arrays_within_dist_bench(benchmark):
array_of_elems = ["...", "...", ...]
elem_to_compare = ...
max_dist = ...
expected = ...
assert check_bytes_arrays_within_dist(...) == expected Let me know if you have any questions about this. |
Is there any problems with my pull request? |
Ah sorry! I didn’t get notified that there was a PR. I’ll review it this morning. |
I will rewrite maybe code for non SSE, need look deeper at it, it seems not so optimised for my func when it takes array with multiply 16.(i just copied your code) |
Sounds good. I'd like to tie the wheel-building and pushing to PyPI with GitHub Actions (probably using this action https://github.com/RalfG/python-wheels-manylinux-build). I can try to add that today. |
Looks very promising, if I can help with this - just say. |
Say if there is anything else that I can put for that pull request. |
I'll need to spend a little more time on the wheel building for i686 and ARM, but manylinux wheels are now being built in CI as of 4fc4fb8. For some reason, I'm getting a Docker compatibility error with ARM: https://github.com/mrecachinas/hexhamming/runs/3526835994?check_suite_focus=true. Error copied below:
|
Closing this since #10 has been pulled in and passed CI. For further optimizations, just go ahead and submit a PR! 😄 |
In #7, @bigcat88 wrote:
The text was updated successfully, but these errors were encountered: