Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 11 additions & 22 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,38 +1,27 @@
# EditorConfig is awesome: https://EditorConfig.org
# https://EditorConfig.org

# Top-most EditorConfig file
root = true

# Global settings (applicable to all files unless overridden)
[*]
charset = utf-8 # Default character encoding
end_of_line = lf # Use LF for line endings (Unix-style)
indent_style = space # Use spaces for indentation
indent_size = 4 # Default indentation size
insert_final_newline = true # Make sure files end with a newline
trim_trailing_whitespace = true # Remove trailing whitespace
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true

# Go files
[*.go]
max_line_length = 100

# Markdown files
[*.md]
max_line_length = 120
trim_trailing_whitespace = false # Don't remove trailing whitespace in Markdown files
max_line_length = 150
trim_trailing_whitespace = false

# Bash scripts
[*.sh]
[*.{yml,yaml,json}]
indent_size = 2

# YAML files
[*.{yml,yaml}]
[*.{c,h,sh}]
indent_size = 2

# C files
[*.{c,h}]
indent_size = 2

# Python files
[*.py]
max_line_length = 100
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1.

**Expected behavior**
A clear and concise description of what you expected to happen.

**Logs**
If applicable, add logs to help explain your problem.

**Additional context**
Add any other context about the problem here.
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Discussions
url: https://github.com/habedi/hann/discussions
about: Please ask and answer general questions here
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
2 changes: 2 additions & 0 deletions .github/workflows/lints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
branches:
- main
push:
branches:
- develop
tags:
- 'v*'

Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
branches:
- main
push:
branches:
- develop
tags:
- 'v*'

Expand All @@ -19,7 +21,7 @@ jobs:
strategy:
matrix:
# Define the Go versions to test against
go-version: [ "1.21", "1.22", "1.23", "1.24" ]
go-version: [ "1.21", "1.22", "1.23", "1.24", "1.25", "1.26" ]

steps:
- name: Checkout Repository
Expand Down
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,14 @@ template-go-project
*.gob
*.bin
*.index
*.pb\.gz
*.pb.gz
*_prof
*_prof.go

# Ignore the directories where the data for the examples is stored
example/data/nearest-neighbors-datasets
example/data/nearest-neighbors-datasets-large
*_output.txt
.codex
.claude/
.agents/
.antigravitycli/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ It can be used to add fast in-memory similarity search capabilities to your Go a

- Unified interface for different indexes (see [core/index.go](core/index.go))
- Support for indexing and searching vectors of arbitrary dimension
- Fast distance computation using SIMD (AVX) instructions (see [core/simd_distance.c](core/simd_distance.c))
- Fast distance computation using SIMD (AVX/AVX2) instructions (see [core/simd_distance.c](core/simd_distance.c))
- Support for bulk insertion, deletion, and updates
- Support for saving indexes to disk and loading them back

Expand Down
2 changes: 1 addition & 1 deletion example/cmd/bench_pqivf.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func BenchPQIVFIndexFashionMNIST() {
coarseK := 16
numSubquantizers := 8
pqK := 256
kMeansIters := 25
kMeansIters := 10
return pqivf.NewPQIVFIndex(dimension, coarseK, numSubquantizers, pqK, kMeansIters)
}

Expand Down
2 changes: 1 addition & 1 deletion example/cmd/pqivf.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func PQIVFIndexFashionMNIST() {
coarseK := 16
numSubquantizers := 8
pqK := 256
kMeansIters := 25
kMeansIters := 10
return pqivf.NewPQIVFIndex(dimension, coarseK, numSubquantizers, pqK, kMeansIters)
}

Expand Down
2 changes: 1 addition & 1 deletion example/cmd/pqivf_large.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func PQIVFIndexGIST() {
coarseK := 16
numSubquantizers := 8
pqK := 256
kMeansIters := 25
kMeansIters := 10
return pqivf.NewPQIVFIndex(dimension, coarseK, numSubquantizers, pqK, kMeansIters)
}

Expand Down
7 changes: 1 addition & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
[project]
name = "hann"
version = "0.1.0"
description = "Python environment for Hann"
readme = "README.md"
license = { text = "MIT" }
authors = [
{ name = "Hassan Abedi", email = "hassan.abedi.t@gmail.com" }
]
description = "The Python environment for the Hann project"

requires-python = ">=3.10,<4.0"
dependencies = [
Expand Down
Loading