jina-ai / annlite

⚡ A fast embedded library for approximate nearest neighbor search
Apache License 2.0
216 stars 22 forks source link

fix(bindings): build on windows #183

Closed OrangeSodahub closed 2 years ago

OrangeSodahub commented 2 years ago
codecov[bot] commented 2 years ago

Codecov Report

Merging #183 (c270f93) into main (02857ec) will decrease coverage by 0.08%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #183      +/-   ##
==========================================
- Coverage   81.74%   81.65%   -0.09%     
==========================================
  Files          20       20              
  Lines        1172     1172              
==========================================
- Hits          958      957       -1     
- Misses        214      215       +1     
Flag Coverage Δ
annlite 81.65% <100.00%> (-0.09%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
annlite/storage/table.py 96.01% <100.00%> (-0.45%) :arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

numb3r3 commented 2 years ago

@OrangeSodahub Please also enable window runner in .github/workflows/ci.yml and .github/workflows/cd.yml. And for more details, please refer to https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners

OrangeSodahub commented 2 years ago

Four problems:

numb3r3 commented 2 years ago

@OrangeSodahub About the UnicodeError, please refer to https://docs.jina.ai/get-started/install/windows/#unicodeencodeerror-on-jina-cli

OrangeSodahub commented 2 years ago

On Windows, two adjacent calls of datetime.datetime.utcnow() could generate the two same time.

time_since = datetime.datetime.utcnow()
table.add_address('0', 1, 2)
addr = table.get_latest_commit()
print(time_since)
print(addr[-1])

Then output:

2022-10-11 08:44:25.068751
2022-10-11 08:44:25.068751

So I change some > to >= to make it passed.