Skip to content

Commit 6acb7ef

Browse files
authored
Run pre-commit on all files (#202)
1 parent 026c2fd commit 6acb7ef

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1378
-789
lines changed

.clang-format

Lines changed: 33 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
2-
Language: Cpp
2+
Language: Cpp
33
# BasedOnStyle: Google
44
AccessModifierOffset: -1
55
AlignAfterOpenBracket: AlwaysBreak
66
AlignConsecutiveAssignments: false
77
AlignConsecutiveDeclarations: false
88
AlignEscapedNewlinesLeft: true
9-
AlignOperands: true
9+
AlignOperands: true
1010
AlignTrailingComments:
1111
Kind: Always
1212
OverEmptyLines: 0
@@ -22,54 +22,54 @@ AlwaysBreakBeforeMultilineStrings: true
2222
AlwaysBreakTemplateDeclarations: true
2323
BinPackArguments: false
2424
BinPackParameters: false
25-
BraceWrapping:
26-
AfterClass: false
25+
BraceWrapping:
26+
AfterClass: false
2727
AfterControlStatement: false
28-
AfterEnum: false
29-
AfterFunction: false
30-
AfterNamespace: false
28+
AfterEnum: false
29+
AfterFunction: false
30+
AfterNamespace: false
3131
AfterObjCDeclaration: false
32-
AfterStruct: false
33-
AfterUnion: false
34-
BeforeCatch: false
35-
BeforeElse: false
36-
IndentBraces: false
32+
AfterStruct: false
33+
AfterUnion: false
34+
BeforeCatch: false
35+
BeforeElse: false
36+
IndentBraces: false
3737
BreakBeforeBinaryOperators: None
3838
BreakBeforeBraces: Attach
3939
BreakBeforeTernaryOperators: false
4040
BreakConstructorInitializersBeforeComma: true
4141
BreakAfterJavaFieldAnnotations: false
4242
BreakStringLiterals: true
43-
ColumnLimit: 80
44-
CommentPragmas: '^ IWYU pragma:'
43+
ColumnLimit: 80
44+
CommentPragmas: "^ IWYU pragma:"
4545
BreakBeforeInheritanceComma: false
4646
ConstructorInitializerAllOnOneLineOrOnePerLine: false
4747
ConstructorInitializerIndentWidth: 4
4848
ContinuationIndentWidth: 4
4949
Cpp11BracedListStyle: true
5050
DerivePointerAlignment: false
51-
DisableFormat: false
51+
DisableFormat: false
5252
ExperimentalAutoDetectBinPacking: false
5353
FixNamespaceComments: true
54-
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
55-
IncludeCategories:
56-
- Regex: '^<.*\.h>'
57-
Priority: 1
58-
- Regex: '^<.*'
59-
Priority: 2
60-
- Regex: '.*'
61-
Priority: 3
62-
IncludeIsMainRegex: '([-_](test|unittest))?$'
54+
ForEachMacros: [foreach, Q_FOREACH, BOOST_FOREACH]
55+
IncludeCategories:
56+
- Regex: '^<.*\.h>'
57+
Priority: 1
58+
- Regex: "^<.*"
59+
Priority: 2
60+
- Regex: ".*"
61+
Priority: 3
62+
IncludeIsMainRegex: "([-_](test|unittest))?$"
6363
IndentCaseLabels: true
6464
IndentRequiresClause: true
65-
IndentWidth: 2
65+
IndentWidth: 2
6666
IndentWrappedFunctionNames: false
6767
InsertNewlineAtEOF: true
6868
JavaScriptQuotes: Leave
6969
JavaScriptWrapImports: true
7070
KeepEmptyLinesAtTheStartOfBlocks: false
71-
MacroBlockBegin: ''
72-
MacroBlockEnd: ''
71+
MacroBlockBegin: ""
72+
MacroBlockEnd: ""
7373
MaxEmptyLinesToKeep: 1
7474
NamespaceIndentation: None
7575
PenaltyBreakBeforeFirstCallParameter: 1
@@ -79,22 +79,21 @@ PenaltyBreakString: 1000
7979
PenaltyExcessCharacter: 1000000
8080
PenaltyReturnTypeOnItsOwnLine: 200
8181
PointerAlignment: Left
82-
ReflowComments: true
82+
ReflowComments: true
8383
RequiresClausePosition: OwnLine
8484
RequiresExpressionIndentation: OuterScope
85-
SortIncludes: true
85+
SortIncludes: true
8686
SpaceAfterCStyleCast: false
8787
SpaceAfterTemplateKeyword: true
8888
SpaceBeforeAssignmentOperators: true
8989
SpaceBeforeParens: ControlStatements
9090
SpaceInEmptyParentheses: false
9191
SpacesBeforeTrailingComments: 2
92-
SpacesInAngles: false
92+
SpacesInAngles: false
9393
SpacesInContainerLiterals: true
9494
SpacesInCStyleCastParentheses: false
9595
SpacesInParentheses: false
9696
SpacesInSquareBrackets: false
97-
Standard: Cpp11
98-
TabWidth: 8
99-
UseTab: Never
100-
...
97+
Standard: Cpp11
98+
TabWidth: 8
99+
UseTab: Never

.github/workflows/build-wheels.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ on:
55
push:
66
branches:
77
- release-*
8-
- '*wheel*' # must quote since "*" is a YAML reserved character; we want a string
8+
- "*wheel*" # must quote since "*" is a YAML reserved character; we want a string
99
tags:
10-
- '*'
10+
- "*"
1111
pull_request:
1212
branches:
13-
- '*wheel*' # must quote since "*" is a YAML reserved character; we want a string
13+
- "*wheel*" # must quote since "*" is a YAML reserved character; we want a string
1414

1515
jobs:
1616
generate_backwards_compatibility_data:
@@ -19,7 +19,7 @@ jobs:
1919
steps:
2020
- name: Checkout code
2121
uses: actions/checkout@v3
22-
22+
2323
# Based on https://github.com/TileDB-Inc/conda-forge-nightly-controller/blob/51519a0f8340b32cf737fcb59b76c6a91c42dc47/.github/workflows/activity.yml#L19C10-L19C10
2424
- name: Setup git
2525
run: |
@@ -74,7 +74,7 @@ jobs:
7474
steps:
7575
- uses: actions/checkout@v3
7676

77-
- name: 'Brew setup on macOS' # x-ref c8e49ba8f8b9ce
77+
- name: "Brew setup on macOS" # x-ref c8e49ba8f8b9ce
7878
if: ${{ startsWith(matrix.os, 'macos-') == true }}
7979
run: |
8080
set -e pipefail
@@ -94,7 +94,6 @@ jobs:
9494
- uses: actions/upload-artifact@v3
9595
with:
9696
path: ./wheelhouse/*.whl
97-
9897
# TODO: Needs support for pulling in the root directory
9998
# build_sdist:
10099
# name: Build source distribution

.github/workflows/check-formatting.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,23 @@ on:
55
branches:
66
- main
77
paths-ignore:
8-
- '_quarto.yml'
9-
- 'quarto-materials/*'
10-
- '**/.md'
8+
- "_quarto.yml"
9+
- "quarto-materials/*"
10+
- "**/.md"
1111
pull_request:
1212
branches:
1313
- main
1414
paths-ignore:
15-
- '_quarto.yml'
16-
- 'quarto-materials/*'
17-
- '**/.md'
15+
- "_quarto.yml"
16+
- "quarto-materials/*"
17+
- "**/.md"
1818

1919
jobs:
2020
check-formatting:
2121
runs-on: ubuntu-latest
2222
steps:
2323
- uses: actions/checkout@v3
24-
- name: 'Check clang-format'
24+
- name: "Check clang-format"
2525
run: |
2626
source $GITHUB_WORKSPACE/scripts/ci/check_clang_format.sh
27-
shell: bash
27+
shell: bash

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,4 +105,4 @@ documentation/reference
105105
*DS_Store
106106

107107
# CMake
108-
*/cmake-build-*
108+
*/cmake-build-*

.pre-commit-config.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ repos:
2626
- id: black
2727

2828
- repo: https://github.com/pre-commit/mirrors-clang-format
29-
rev: 'v17.0.6'
29+
rev: "v17.0.6"
3030
hooks:
31-
- id: clang-format
31+
- id: clang-format
32+
exclude: '\.ipynb$'

README.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
11
<a href="https://tiledb.com"><img src="https://github.com/TileDB-Inc/TileDB/raw/dev/doc/source/_static/[email protected]" alt="TileDB logo" width="400"></a>
22

3-
4-
53
# TileDB Vector Search
64

7-
*TileDB-Vector-Search* is a C++ library and Python API for vector search built on top of the [TileDB Storage Engine](https://github.com/TileDB-Inc/TileDB).
5+
_TileDB-Vector-Search_ is a C++ library and Python API for vector search built on top of the [TileDB Storage Engine](https://github.com/TileDB-Inc/TileDB).
86

97
Please see the following blog posts for background:
108

11-
* [Why TileDB as a Vector Database](https://tiledb.com/blog/why-tiledb-as-a-vector-database)
12-
* [TileDB Vector Search 101](https://tiledb.com/blog/tiledb-101-vector-search/)
9+
- [Why TileDB as a Vector Database](https://tiledb.com/blog/why-tiledb-as-a-vector-database)
10+
- [TileDB Vector Search 101](https://tiledb.com/blog/tiledb-101-vector-search/)
1311

1412
We have released a [LangChain integration](https://python.langchain.com/docs/integrations/vectorstores/tiledb), with others to come soon.
1513

1614
# Quick Links
1715

18-
* [Build Instructions](https://tiledb-inc.github.io/TileDB-Vector-Search/documentation/Building.html)
19-
* [Documentation](https://tiledb-inc.github.io/TileDB-Vector-Search/)
20-
* [Python API reference](https://tiledb-inc.github.io/TileDB-Vector-Search/documentation/reference/)
16+
- [Build Instructions](https://tiledb-inc.github.io/TileDB-Vector-Search/documentation/Building.html)
17+
- [Documentation](https://tiledb-inc.github.io/TileDB-Vector-Search/)
18+
- [Python API reference](https://tiledb-inc.github.io/TileDB-Vector-Search/documentation/reference/)
2119

2220
# Quick Installation
2321

@@ -40,4 +38,4 @@ We welcome contributions. Please see [`Building`](./documentation/Building.md) f
4038
development-build instructions. For large new
4139
features, please open an issue to discuss goals and approach in order
4240
to ensure a smooth PR integration and review process. All contributions
43-
must be licensed under the repository's [MIT License](./LICENSE).
41+
must be licensed under the repository's [MIT License](./LICENSE).

_quarto.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ quartodoc:
3636
- title: "tiledb.vector_search"
3737
desc: ""
3838
contents:
39-
- index.Index
40-
- flat_index.FlatIndex
41-
- ivf_flat_index.IVFFlatIndex
42-
- ingestion
39+
- index.Index
40+
- flat_index.FlatIndex
41+
- ivf_flat_index.IVFFlatIndex
42+
- ingestion
4343

4444
website:
4545
favicon: "documentation/assets/tiledb.ico"

apis/python/MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
global-exclude *
66
include pyproject.toml
77
include MANIFEST.in
8-
recursive-include src *.py
8+
recursive-include src *.py

apis/python/requirements-py.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
numpy==1.24.3
22
tiledb-cloud==0.10.24
3-
tiledb==0.25.0
3+
tiledb==0.25.0

apis/python/src/tiledb/vector_search/__init__.py

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,19 @@
66
from .index import Index
77
from .ingestion import ingest
88
from .ivf_flat_index import IVFFlatIndex
9-
from .module import (array_to_matrix, ivf_index, ivf_index_tdb, ivf_query,
10-
ivf_query_ram, load_as_array, load_as_matrix,
11-
partition_ivf_index, query_vq_heap, query_vq_nth,
12-
validate_top_k)
13-
from .storage_formats import STORAGE_VERSION, storage_formats
9+
from .module import array_to_matrix
10+
from .module import ivf_index
11+
from .module import ivf_index_tdb
12+
from .module import ivf_query
13+
from .module import ivf_query_ram
14+
from .module import load_as_array
15+
from .module import load_as_matrix
16+
from .module import partition_ivf_index
17+
from .module import query_vq_heap
18+
from .module import query_vq_nth
19+
from .module import validate_top_k
20+
from .storage_formats import STORAGE_VERSION
21+
from .storage_formats import storage_formats
1422

1523
from ._tiledbvspy import FeatureVector
1624
from ._tiledbvspy import FeatureVectorArray
@@ -41,4 +49,6 @@
4149
"array_to_matrix",
4250
"partition_ivf_index",
4351
"utils",
52+
"STORAGE_VERSION",
53+
"storage_formats",
4454
]

0 commit comments

Comments
 (0)