Skip to content

Commit

Permalink
added Dria compatiblity SDK (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
erhant authored Jan 11, 2024
1 parent 572762b commit 8dcfda6
Show file tree
Hide file tree
Showing 23 changed files with 880 additions and 69 deletions.
67 changes: 67 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"extends": ["eslint:recommended", "plugin:node/recommended", "prettier"],
"plugins": ["node", "prettier"],
"rules": {
"prettier/prettier": "error",
"block-scoped-var": "error",
"eqeqeq": "error",
"no-var": "error",
"prefer-const": "error",
"eol-last": "error",
"prefer-arrow-callback": "error",
"no-trailing-spaces": "error",
"no-restricted-properties": [
"error",
{
"object": "describe",
"property": "only"
},
{
"object": "it",
"property": "only"
}
]
},
"ignorePatterns": [
// js output
"build",
"dist",
"lib",
// modules
"node_modules",
// dot files
".parcel-cache",
".github",
// protobufs
"proto"
],
"overrides": [
{
"files": ["**/*.ts", "**/*.tsx"],
"parser": "@typescript-eslint/parser",
"extends": ["plugin:@typescript-eslint/recommended"],
"rules": {
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-warning-comments": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/camelcase": "off",
"node/no-missing-import": "off",
"node/no-empty-function": "off",
"node/no-unsupported-features/es-syntax": "off",
"node/no-missing-require": "off",
"node/shebang": "off",
"no-dupe-class-members": "off",
"require-atomic-updates": "off"
}
}
],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
}
}
12 changes: 9 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,20 @@ jobs:
- name: Install dependencies
run: pnpm install --no-frozen-lockfile

- name: Lint everything
run: pnpm lint

- name: Check formatting
run: pnpm format

- name: Build
run: pnpm build

- name: Start Redis
uses: supercharge/[email protected]
with:
redis-version: 7
redis-port: 6379

- name: Build
run: pnpm build

- name: Run tests
run: pnpm test
14 changes: 14 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# js output
build
dist
lib

# modules
node_modules

# dot files
.parcel-cache
.github

# protobufs
proto
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ const vectordb = new HollowDBVector(hollowdb);
With this, you can insert a new point:

```ts
// an array of floats
const point = [-0.28571999073028564 /* and many more... */, 0.13964000344276428];

// any object
Expand Down Expand Up @@ -167,6 +166,18 @@ pnpm test

Check the formatting with:

```sh
pnpm format
```

Lint everything with:

```sh
pnpm lint
```

You can also check types with:

```sh
pnpm check
```
Expand All @@ -177,4 +188,4 @@ HollowDB Vector replaces DANNY, for the legacy code please [refer to this branch

## License

Dria Docker is licensed under [Apache 2.0](./LICENSE).
HollowDB Vector is licensed under [Apache 2.0](./LICENSE).
63 changes: 45 additions & 18 deletions lib/index.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/index.cjs.map

Large diffs are not rendered by default.

23 changes: 18 additions & 5 deletions lib/index.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8dcfda6

Please sign in to comment.