Skip to content

Commit

Permalink
Merge pull request #401 from unum-cloud/main-dev
Browse files Browse the repository at this point in the history
Improve Test Coverage & Fix Minor Bugs
  • Loading branch information
ashvardanian authored Apr 29, 2024
2 parents 32bb96f + 62f9b61 commit f7535f9
Show file tree
Hide file tree
Showing 20 changed files with 630 additions and 73 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ jobs:
push: false

build_wheels:
name: Build Python ${{ matrix.python-version }} for ${{ matrix.os }}
name: Build Python Wheels
runs-on: ${{ matrix.os }}
needs: [test_ubuntu_gcc, test_ubuntu_clang, test_macos, test_windows]
strategy:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
force: True

create_linux_deb_package:
name: Create Debian Package for ${{ matrix.arch }}
name: Create Debian Package
runs-on: ubuntu-22.04
needs: versioning
env:
Expand Down Expand Up @@ -137,7 +137,7 @@ jobs:
update_latest_release: true

create_windows_dll_library:
name: Create Dll Library for Windows ${{ matrix.arch }}
name: Create Dll Library for Windows
runs-on: windows-2022
needs: versioning
strategy:
Expand Down Expand Up @@ -188,7 +188,7 @@ jobs:
update_latest_release: true

create_macos_dylib_library:
name: Create Library for MacOS ${{ matrix.arch }}
name: Create Library for MacOS
runs-on: macos-12
needs: versioning
strategy:
Expand Down Expand Up @@ -244,7 +244,7 @@ jobs:
update_latest_release: true

create_wasm_library:
name: WASM builds for C libraries on ${{ matrix.os }}
name: WASM builds for C libraries
runs-on: ${{ matrix.os }}
needs: versioning
strategy:
Expand Down Expand Up @@ -396,7 +396,7 @@ jobs:
* ${{ steps.hashes.outputs.asset_name_15 }} : `${{ steps.hashes.outputs.asset_hash_15 }}`
build_wheels:
name: Build Python ${{ matrix.python-version }} for ${{ matrix.os }}
name: Build Python Wheels
runs-on: ${{ matrix.os }}
needs: versioning
strategy:
Expand Down
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@
"cSpell.words": [
"allclose",
"arange",
"ashvardanian",
"astype",
"Availible",
"bidict",
Expand All @@ -142,6 +143,8 @@
"equidimensional",
"FAISS",
"fbin",
"furo",
"googleanalytics",
"groundtruth",
"hashable",
"HNSW",
Expand All @@ -158,6 +161,7 @@
"ndim",
"Numba",
"numpy",
"objc",
"OPENMP",
"preprocess",
"Println",
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ If there build mode is not specified, the default is `Release`.

```sh
cmake -DUSEARCH_BUILD_TEST_CPP=1 -B ./build_release
cmake --build ./build_release --config Debug
cmake --build ./build_release --config Release
./build_release/test_cpp
```

Expand Down Expand Up @@ -108,6 +108,7 @@ I'd recommend putting the following breakpoints when debugging the code in GDB:
- `__ubsan::ScopedReport::~ScopedReport` - to catch undefined behavior.
- `__GI_exit` - to stop at exit points - the end of running any executable.
- `__builtin_unreachable` - to catch all the places where the code is expected to be unreachable.
- `__usearch_raise_runtime_error` - for USearch-specific assertions.

### Cross Compilation

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ USearch is compact and broadly compatible without sacrificing performance, prima
Base functionality is identical to FAISS, and the interface must be familiar if you have ever investigated Approximate Nearest Neighbors search:

```py
$ pip install numpy usearch
# pip install numpy usearch

import numpy as np
from usearch.index import Index
Expand Down Expand Up @@ -448,10 +448,10 @@ That method was used to build the ["USearch Molecules"](https://github.com/ashva

### USearch + POI Coordinates = GIS Applications... on iOS?

[![USearch Maps with SwiftUI](https://github.com/ashvardanian/SwiftVectorSearch/raw/main/USearch+SwiftUI.gif)](https://github.com/ashvardanian/SwiftVectorSearch)
[![USearch Maps with SwiftUI](https://github.com/ashvardanian/SwiftSemanticSearch/raw/main/USearch+SwiftUI.gif)](https://github.com/ashvardanian/SwiftSemanticSearch)

With Objective-C and Swift iOS bindings, USearch can be easily used in mobile applications.
The [SwiftVectorSearch](https://github.com/ashvardanian/SwiftVectorSearch) project illustrates how to build a dynamic, real-time search system on iOS.
The [SwiftSemanticSearch](https://github.com/ashvardanian/SwiftSemanticSearch) project illustrates how to build a dynamic, real-time search system on iOS.
In this example, we use 2-dimensional vectors—encoded as latitude and longitude—to find the closest Points of Interest (POIs) on a map.
The search is based on the Haversine distance metric but can easily be extended to support high-dimensional vectors.

Expand All @@ -465,7 +465,7 @@ The search is based on the Haversine distance metric but can easily be extended

## Citations

```txt
```bibtex
@software{Vardanian_USearch_2023,
doi = {10.5281/zenodo.7949416},
author = {Vardanian, Ash},
Expand Down
6 changes: 6 additions & 0 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ if (USEARCH_BUILD_TEST_CPP)
include(CTest)
enable_testing()
add_test(NAME test_cpp COMMAND test_cpp)

target_include_directories(test_cpp PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../stringzilla/include)

if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(test_cpp PRIVATE -Wno-vla -Wno-unused-function -Wno-cast-function-type)
endif ()
endif ()

if (USEARCH_BUILD_BENCH_CPP)
Expand Down
Loading

0 comments on commit f7535f9

Please sign in to comment.