From 15f8f4d6272aea7dc77345557425de150561761c Mon Sep 17 00:00:00 2001 From: Will Jones Date: Wed, 29 Jan 2025 08:27:07 -0800 Subject: [PATCH] ci: check license headers (#2076) Based on the same workflow in Lance. --- .github/workflows/license-header-check.yml | 31 +++++++++++++++++++ docs/src/notebooks/diffusiondb/datagen.py | 13 +------- java/core/lancedb-jni/src/connection.rs | 3 ++ java/core/lancedb-jni/src/error.rs | 15 ++------- java/core/lancedb-jni/src/ffi.rs | 15 ++------- java/core/lancedb-jni/src/lib.rs | 15 ++------- java/core/lancedb-jni/src/traits.rs | 15 ++------- .../java/com/lancedb/lancedb/Connection.java | 17 ++-------- .../com/lancedb/lancedb/ConnectionTest.java | 15 ++------- java/license_header.txt | 4 +++ nodejs/__test__/arrow.test.ts | 16 ++-------- nodejs/__test__/connection.test.ts | 15 ++------- nodejs/__test__/embedding.test.ts | 15 ++------- nodejs/__test__/registry.test.ts | 17 +++------- nodejs/__test__/remote.test.ts | 15 ++------- nodejs/__test__/s3_integration.test.ts | 15 ++------- nodejs/__test__/table.test.ts | 15 ++------- nodejs/__test__/util.test.ts | 3 ++ nodejs/build.rs | 3 ++ nodejs/lancedb/arrow.ts | 15 ++------- nodejs/lancedb/connection.ts | 15 ++------- .../lancedb/embedding/embedding_function.ts | 15 ++------- nodejs/lancedb/embedding/index.ts | 15 ++------- nodejs/lancedb/embedding/openai.ts | 15 ++------- nodejs/lancedb/embedding/registry.ts | 15 ++------- nodejs/lancedb/embedding/transformers.ts | 15 ++------- nodejs/lancedb/index.ts | 15 ++------- nodejs/lancedb/indices.ts | 15 ++------- nodejs/lancedb/query.ts | 15 ++------- nodejs/lancedb/sanitize.ts | 15 ++------- nodejs/lancedb/table.ts | 15 ++------- nodejs/lancedb/util.ts | 3 ++ nodejs/license_header.txt | 2 ++ nodejs/src/connection.rs | 15 ++------- nodejs/src/error.rs | 3 ++ nodejs/src/index.rs | 15 ++------- nodejs/src/iterator.rs | 15 ++------- nodejs/src/lib.rs | 15 ++------- nodejs/src/merge.rs | 3 ++ nodejs/src/query.rs | 15 ++------- nodejs/src/remote.rs | 15 ++------- nodejs/src/table.rs | 15 ++------- nodejs/src/util.rs | 3 ++ python/build.rs | 3 ++ python/license_header.txt | 2 ++ python/python/lancedb/__init__.py | 15 ++------- python/python/lancedb/arrow.py | 3 ++ python/python/lancedb/common.py | 16 +++------- python/python/lancedb/conftest.py | 3 ++ python/python/lancedb/context.py | 16 +++------- python/python/lancedb/db.py | 15 ++------- python/python/lancedb/dependencies.py | 4 ++- python/python/lancedb/embeddings/__init__.py | 16 +++------- python/python/lancedb/embeddings/bedrock.py | 15 ++------- python/python/lancedb/embeddings/cohere.py | 15 ++------- .../python/lancedb/embeddings/gemini_text.py | 15 ++------- python/python/lancedb/embeddings/gte.py | 16 +++------- .../lancedb/embeddings/gte_mlx_model.py | 3 ++ python/python/lancedb/embeddings/imagebind.py | 15 ++------- .../python/lancedb/embeddings/instructor.py | 16 +++------- python/python/lancedb/embeddings/jinaai.py | 15 ++------- python/python/lancedb/embeddings/open_clip.py | 16 +++------- .../embeddings/sentence_transformers.py | 16 +++------- .../python/lancedb/embeddings/transformers.py | 15 ++------- python/python/lancedb/embeddings/utils.py | 15 ++------- python/python/lancedb/embeddings/voyageai.py | 15 ++------- python/python/lancedb/embeddings/watsonx.py | 16 +++------- python/python/lancedb/exceptions.py | 3 ++ python/python/lancedb/index.py | 3 ++ .../python/lancedb/integrations/__init__.py | 2 ++ python/python/lancedb/integrations/pyarrow.py | 3 ++ python/python/lancedb/merge.py | 16 +++------- python/python/lancedb/remote/__init__.py | 15 ++------- python/python/lancedb/remote/db.py | 15 ++------- python/python/lancedb/remote/errors.py | 14 ++------- python/python/lancedb/rerankers/__init__.py | 3 ++ .../python/lancedb/rerankers/answerdotai.py | 16 +++------- python/python/lancedb/rerankers/base.py | 15 ++------- python/python/lancedb/rerankers/cohere.py | 15 ++------- python/python/lancedb/rerankers/colbert.py | 15 ++------- .../python/lancedb/rerankers/cross_encoder.py | 15 ++------- python/python/lancedb/rerankers/jinaai.py | 15 ++------- .../lancedb/rerankers/linear_combination.py | 15 ++------- python/python/lancedb/rerankers/openai.py | 15 ++------- python/python/lancedb/rerankers/rrf.py | 15 ++------- python/python/lancedb/rerankers/util.py | 3 +- python/python/lancedb/rerankers/voyageai.py | 15 ++------- python/python/lancedb/schema.py | 15 ++------- python/python/lancedb/util.py | 3 +- python/python/tests/docs/test_basic.py | 3 ++ .../python/tests/docs/test_binary_vector.py | 3 ++ .../python/tests/docs/test_distance_range.py | 3 ++ .../tests/docs/test_embeddings_optional.py | 3 ++ python/python/tests/docs/test_guide_index.py | 3 ++ python/python/tests/docs/test_guide_tables.py | 3 ++ python/python/tests/docs/test_multivector.py | 3 ++ python/python/tests/docs/test_python.py | 3 ++ python/python/tests/docs/test_search.py | 3 ++ python/python/tests/test_context.py | 15 ++------- python/python/tests/test_db.py | 15 ++------- python/python/tests/test_duckdb.py | 3 ++ python/python/tests/test_e2e_remote_db.py | 15 ++------- python/python/tests/test_fts.py | 3 ++ python/python/tests/test_huggingface.py | 15 ++------- python/python/tests/test_io.py | 15 ++------- python/python/tests/test_pyarrow.py | 3 ++ python/python/tests/test_rerankers.py | 3 ++ python/python/tests/test_s3.py | 15 ++------- python/python/tests/test_table.py | 3 +- python/python/tests/test_util.py | 15 ++------- python/src/arrow.rs | 4 +-- python/src/error.rs | 15 ++------- python/src/index.rs | 15 ++------- python/src/lib.rs | 15 ++------- python/src/query.rs | 15 ++------- python/src/util.rs | 3 ++ rust/ffi/node/src/arrow.rs | 15 ++------- rust/ffi/node/src/convert.rs | 15 ++------- rust/ffi/node/src/error.rs | 15 ++------- rust/ffi/node/src/index.rs | 15 ++------- rust/ffi/node/src/index/scalar.rs | 15 ++------- rust/ffi/node/src/index/vector.rs | 15 ++------- rust/ffi/node/src/lib.rs | 15 ++------- rust/ffi/node/src/neon_ext.rs | 15 ++------- rust/ffi/node/src/neon_ext/js_object_ext.rs | 15 ++------- rust/ffi/node/src/query.rs | 3 ++ rust/ffi/node/src/table.rs | 15 ++------- rust/lancedb/examples/bedrock.rs | 3 ++ rust/lancedb/examples/full_text_search.rs | 15 ++------- rust/lancedb/examples/ivf_pq.rs | 15 ++------- rust/lancedb/examples/openai.rs | 3 ++ .../lancedb/examples/sentence_transformers.rs | 3 ++ rust/lancedb/examples/simple.rs | 15 ++------- rust/lancedb/src/arrow.rs | 15 ++------- rust/lancedb/src/connection.rs | 15 ++------- rust/lancedb/src/data.rs | 15 ++------- rust/lancedb/src/data/inspect.rs | 15 ++------- rust/lancedb/src/data/sanitize.rs | 15 ++------- rust/lancedb/src/embeddings.rs | 16 ++-------- rust/lancedb/src/embeddings/bedrock.rs | 3 ++ rust/lancedb/src/embeddings/openai.rs | 3 ++ .../src/embeddings/sentence_transformers.rs | 3 ++ rust/lancedb/src/error.rs | 15 ++------- rust/lancedb/src/index.rs | 15 ++------- rust/lancedb/src/index/scalar.rs | 3 ++ rust/lancedb/src/index/vector.rs | 15 ++------- rust/lancedb/src/io.rs | 3 ++ rust/lancedb/src/io/object_store.rs | 15 ++------- rust/lancedb/src/ipc.rs | 15 ++------- rust/lancedb/src/lib.rs | 15 ++------- rust/lancedb/src/polars_arrow_convertors.rs | 3 ++ rust/lancedb/src/query.rs | 15 ++------- rust/lancedb/src/remote.rs | 15 ++------- rust/lancedb/src/remote/client.rs | 15 ++------- rust/lancedb/src/remote/db.rs | 15 ++------- rust/lancedb/src/remote/table.rs | 3 ++ rust/lancedb/src/remote/util.rs | 3 ++ rust/lancedb/src/table.rs | 15 ++------- rust/lancedb/src/table/dataset.rs | 15 ++------- rust/lancedb/src/table/merge.rs | 15 ++------- rust/lancedb/src/utils.rs | 15 ++------- rust/lancedb/tests/embedding_registry_test.rs | 3 ++ rust/lancedb/tests/object_store_test.rs | 16 ++-------- rust/license_header.txt | 2 ++ 164 files changed, 456 insertions(+), 1409 deletions(-) create mode 100644 .github/workflows/license-header-check.yml create mode 100644 java/license_header.txt create mode 100644 nodejs/license_header.txt create mode 100644 python/license_header.txt create mode 100644 rust/license_header.txt diff --git a/.github/workflows/license-header-check.yml b/.github/workflows/license-header-check.yml new file mode 100644 index 00000000..336ba961 --- /dev/null +++ b/.github/workflows/license-header-check.yml @@ -0,0 +1,31 @@ +name: Check license headers +on: + push: + branches: + - main + pull_request: + paths: + - rust/** + - python/** + - nodejs/** + - java/** + - .github/workflows/license-header-check.yml +jobs: + check-licenses: + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v4 + - name: Install license-header-checker + working-directory: /tmp + run: | + curl -s https://raw.githubusercontent.com/lluissm/license-header-checker/master/install.sh | bash + mv /tmp/bin/license-header-checker /usr/local/bin/ + - name: Check license headers (rust) + run: license-header-checker -a -v ./rust/license_header.txt ./ rs && [[ -z `git status -s` ]] + - name: Check license headers (python) + run: license-header-checker -a -v ./python/license_header.txt python py && [[ -z `git status -s` ]] + - name: Check license headers (typescript) + run: license-header-checker -a -v ./nodejs/license_header.txt nodejs ts && [[ -z `git status -s` ]] + - name: Check license headers (java) + run: license-header-checker -a -v ./nodejs/license_header.txt java java && [[ -z `git status -s` ]] diff --git a/docs/src/notebooks/diffusiondb/datagen.py b/docs/src/notebooks/diffusiondb/datagen.py index 42bcdf39..f27f6a31 100755 --- a/docs/src/notebooks/diffusiondb/datagen.py +++ b/docs/src/notebooks/diffusiondb/datagen.py @@ -1,17 +1,6 @@ #!/usr/bin/env python # -# Copyright 2023 LanceDB Developers -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. + """Dataset hf://poloclub/diffusiondb """ diff --git a/java/core/lancedb-jni/src/connection.rs b/java/core/lancedb-jni/src/connection.rs index 750a879b..724840d0 100644 --- a/java/core/lancedb-jni/src/connection.rs +++ b/java/core/lancedb-jni/src/connection.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors + use crate::ffi::JNIEnvExt; use crate::traits::IntoJava; use crate::{Error, RT}; diff --git a/java/core/lancedb-jni/src/error.rs b/java/core/lancedb-jni/src/error.rs index 793d0d8a..dcb8b855 100644 --- a/java/core/lancedb-jni/src/error.rs +++ b/java/core/lancedb-jni/src/error.rs @@ -1,16 +1,5 @@ -// Copyright 2024 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors use std::str::Utf8Error; diff --git a/java/core/lancedb-jni/src/ffi.rs b/java/core/lancedb-jni/src/ffi.rs index b9684b09..579bf692 100644 --- a/java/core/lancedb-jni/src/ffi.rs +++ b/java/core/lancedb-jni/src/ffi.rs @@ -1,16 +1,5 @@ -// Copyright 2024 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors use core::slice; diff --git a/java/core/lancedb-jni/src/lib.rs b/java/core/lancedb-jni/src/lib.rs index 490d9c97..6d498759 100644 --- a/java/core/lancedb-jni/src/lib.rs +++ b/java/core/lancedb-jni/src/lib.rs @@ -1,16 +1,5 @@ -// Copyright 2024 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors use lazy_static::lazy_static; diff --git a/java/core/lancedb-jni/src/traits.rs b/java/core/lancedb-jni/src/traits.rs index 01a7a490..077392bf 100644 --- a/java/core/lancedb-jni/src/traits.rs +++ b/java/core/lancedb-jni/src/traits.rs @@ -1,16 +1,5 @@ -// Copyright 2024 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors use jni::objects::{JMap, JObject, JString, JValue}; use jni::JNIEnv; diff --git a/java/core/src/main/java/com/lancedb/lancedb/Connection.java b/java/core/src/main/java/com/lancedb/lancedb/Connection.java index a667e724..c5908757 100644 --- a/java/core/src/main/java/com/lancedb/lancedb/Connection.java +++ b/java/core/src/main/java/com/lancedb/lancedb/Connection.java @@ -1,16 +1,5 @@ -/* - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors package com.lancedb.lancedb; @@ -117,4 +106,4 @@ public class Connection implements Closeable { private native void releaseNativeConnection(long handle); private Connection() {} -} \ No newline at end of file +} diff --git a/java/core/src/test/java/com/lancedb/lancedb/ConnectionTest.java b/java/core/src/test/java/com/lancedb/lancedb/ConnectionTest.java index 65b3bc5a..b526722b 100644 --- a/java/core/src/test/java/com/lancedb/lancedb/ConnectionTest.java +++ b/java/core/src/test/java/com/lancedb/lancedb/ConnectionTest.java @@ -1,16 +1,5 @@ -/* - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors package com.lancedb.lancedb; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/java/license_header.txt b/java/license_header.txt new file mode 100644 index 00000000..97f909f4 --- /dev/null +++ b/java/license_header.txt @@ -0,0 +1,4 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * SPDX-FileCopyrightText: Copyright The LanceDB Authors + */ diff --git a/nodejs/__test__/arrow.test.ts b/nodejs/__test__/arrow.test.ts index 4907063d..0f5b6e37 100644 --- a/nodejs/__test__/arrow.test.ts +++ b/nodejs/__test__/arrow.test.ts @@ -1,17 +1,7 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors + import { Schema } from "apache-arrow"; -// Copyright 2024 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. import * as arrow15 from "apache-arrow-15"; import * as arrow16 from "apache-arrow-16"; diff --git a/nodejs/__test__/connection.test.ts b/nodejs/__test__/connection.test.ts index 38b5afad..43416a6b 100644 --- a/nodejs/__test__/connection.test.ts +++ b/nodejs/__test__/connection.test.ts @@ -1,16 +1,5 @@ -// Copyright 2024 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors import { readdirSync } from "fs"; import { Field, Float64, Schema } from "apache-arrow"; diff --git a/nodejs/__test__/embedding.test.ts b/nodejs/__test__/embedding.test.ts index e1904cf7..03802dab 100644 --- a/nodejs/__test__/embedding.test.ts +++ b/nodejs/__test__/embedding.test.ts @@ -1,16 +1,5 @@ -// Copyright 2024 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors import * as tmp from "tmp"; diff --git a/nodejs/__test__/registry.test.ts b/nodejs/__test__/registry.test.ts index cd52af8a..f00121da 100644 --- a/nodejs/__test__/registry.test.ts +++ b/nodejs/__test__/registry.test.ts @@ -1,17 +1,8 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors + import * as apiArrow from "apache-arrow"; -// Copyright 2024 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. + import * as arrow15 from "apache-arrow-15"; import * as arrow16 from "apache-arrow-16"; import * as arrow17 from "apache-arrow-17"; diff --git a/nodejs/__test__/remote.test.ts b/nodejs/__test__/remote.test.ts index 6dbac639..2271bd51 100644 --- a/nodejs/__test__/remote.test.ts +++ b/nodejs/__test__/remote.test.ts @@ -1,16 +1,5 @@ -// Copyright 2024 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors import * as http from "http"; import { RequestListener } from "http"; diff --git a/nodejs/__test__/s3_integration.test.ts b/nodejs/__test__/s3_integration.test.ts index 9fd33f3f..ce194202 100644 --- a/nodejs/__test__/s3_integration.test.ts +++ b/nodejs/__test__/s3_integration.test.ts @@ -1,16 +1,5 @@ -// Copyright 2024 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors /* eslint-disable @typescript-eslint/naming-convention */ diff --git a/nodejs/__test__/table.test.ts b/nodejs/__test__/table.test.ts index 33e0daa2..c366dbc7 100644 --- a/nodejs/__test__/table.test.ts +++ b/nodejs/__test__/table.test.ts @@ -1,16 +1,5 @@ -// Copyright 2024 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors import * as fs from "fs"; import * as path from "path"; diff --git a/nodejs/__test__/util.test.ts b/nodejs/__test__/util.test.ts index 49654ad5..802f8ed4 100644 --- a/nodejs/__test__/util.test.ts +++ b/nodejs/__test__/util.test.ts @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors + import { IntoSql, toSQL } from "../lancedb/util"; test.each([ ["string", "'string'"], diff --git a/nodejs/build.rs b/nodejs/build.rs index 9fc23678..a5c27e88 100644 --- a/nodejs/build.rs +++ b/nodejs/build.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors + extern crate napi_build; fn main() { diff --git a/nodejs/lancedb/arrow.ts b/nodejs/lancedb/arrow.ts index 258f77a4..48c60e19 100644 --- a/nodejs/lancedb/arrow.ts +++ b/nodejs/lancedb/arrow.ts @@ -1,16 +1,5 @@ -// Copyright 2023 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors import { Table as ArrowTable, diff --git a/nodejs/lancedb/connection.ts b/nodejs/lancedb/connection.ts index f352ef3a..cea2c380 100644 --- a/nodejs/lancedb/connection.ts +++ b/nodejs/lancedb/connection.ts @@ -1,16 +1,5 @@ -// Copyright 2024 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors import { Data, Schema, SchemaLike, TableLike } from "./arrow"; import { fromTableToBuffer, makeEmptyTable } from "./arrow"; diff --git a/nodejs/lancedb/embedding/embedding_function.ts b/nodejs/lancedb/embedding/embedding_function.ts index c59f6094..b1fa7fd4 100644 --- a/nodejs/lancedb/embedding/embedding_function.ts +++ b/nodejs/lancedb/embedding/embedding_function.ts @@ -1,16 +1,5 @@ -// Copyright 2024 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors import "reflect-metadata"; import { diff --git a/nodejs/lancedb/embedding/index.ts b/nodejs/lancedb/embedding/index.ts index 44e58b28..723e1e9c 100644 --- a/nodejs/lancedb/embedding/index.ts +++ b/nodejs/lancedb/embedding/index.ts @@ -1,16 +1,5 @@ -// Copyright 2023 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors import { Field, Schema } from "../arrow"; import { sanitizeType } from "../sanitize"; diff --git a/nodejs/lancedb/embedding/openai.ts b/nodejs/lancedb/embedding/openai.ts index 813a9930..1fe86668 100644 --- a/nodejs/lancedb/embedding/openai.ts +++ b/nodejs/lancedb/embedding/openai.ts @@ -1,16 +1,5 @@ -// Copyright 2023 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors import type OpenAI from "openai"; import type { EmbeddingCreateParams } from "openai/resources/index"; diff --git a/nodejs/lancedb/embedding/registry.ts b/nodejs/lancedb/embedding/registry.ts index 7bcf81ee..31cc29c0 100644 --- a/nodejs/lancedb/embedding/registry.ts +++ b/nodejs/lancedb/embedding/registry.ts @@ -1,16 +1,5 @@ -// Copyright 2024 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors import { type EmbeddingFunction, diff --git a/nodejs/lancedb/embedding/transformers.ts b/nodejs/lancedb/embedding/transformers.ts index 4b9af1e1..6b3e4f3a 100644 --- a/nodejs/lancedb/embedding/transformers.ts +++ b/nodejs/lancedb/embedding/transformers.ts @@ -1,16 +1,5 @@ -// Copyright 2023 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors import { Float, Float32 } from "../arrow"; import { EmbeddingFunction } from "./embedding_function"; diff --git a/nodejs/lancedb/index.ts b/nodejs/lancedb/index.ts index e9a0abcb..1102695f 100644 --- a/nodejs/lancedb/index.ts +++ b/nodejs/lancedb/index.ts @@ -1,16 +1,5 @@ -// Copyright 2024 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors import { Connection, diff --git a/nodejs/lancedb/indices.ts b/nodejs/lancedb/indices.ts index 503ee9ee..f853770d 100644 --- a/nodejs/lancedb/indices.ts +++ b/nodejs/lancedb/indices.ts @@ -1,16 +1,5 @@ -// Copyright 2024 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors import { Index as LanceDbIndex } from "./native"; diff --git a/nodejs/lancedb/query.ts b/nodejs/lancedb/query.ts index eb22d512..dad825f9 100644 --- a/nodejs/lancedb/query.ts +++ b/nodejs/lancedb/query.ts @@ -1,16 +1,5 @@ -// Copyright 2024 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors import { Table as ArrowTable, diff --git a/nodejs/lancedb/sanitize.ts b/nodejs/lancedb/sanitize.ts index 50298b8a..0ea33831 100644 --- a/nodejs/lancedb/sanitize.ts +++ b/nodejs/lancedb/sanitize.ts @@ -1,16 +1,5 @@ -// Copyright 2023 LanceDB Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors // The utilities in this file help sanitize data from the user's arrow // library into the types expected by vectordb's arrow library. Node diff --git a/nodejs/lancedb/table.ts b/nodejs/lancedb/table.ts index 3d413207..4f6115e4 100644 --- a/nodejs/lancedb/table.ts +++ b/nodejs/lancedb/table.ts @@ -1,16 +1,5 @@ -// Copyright 2024 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors import { Table as ArrowTable, diff --git a/nodejs/lancedb/util.ts b/nodejs/lancedb/util.ts index 20b84ae1..275d5e15 100644 --- a/nodejs/lancedb/util.ts +++ b/nodejs/lancedb/util.ts @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors + export type IntoSql = | string | number diff --git a/nodejs/license_header.txt b/nodejs/license_header.txt new file mode 100644 index 00000000..488f8c03 --- /dev/null +++ b/nodejs/license_header.txt @@ -0,0 +1,2 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors diff --git a/nodejs/src/connection.rs b/nodejs/src/connection.rs index 01c41239..2ec4b986 100644 --- a/nodejs/src/connection.rs +++ b/nodejs/src/connection.rs @@ -1,16 +1,5 @@ -// Copyright 2024 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors use std::collections::HashMap; use std::str::FromStr; diff --git a/nodejs/src/error.rs b/nodejs/src/error.rs index 7fec4725..3953b790 100644 --- a/nodejs/src/error.rs +++ b/nodejs/src/error.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors + pub type Result = napi::Result; pub trait NapiErrorExt { diff --git a/nodejs/src/index.rs b/nodejs/src/index.rs index 547358d1..d91b22f4 100644 --- a/nodejs/src/index.rs +++ b/nodejs/src/index.rs @@ -1,16 +1,5 @@ -// Copyright 2024 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors use std::sync::Mutex; diff --git a/nodejs/src/iterator.rs b/nodejs/src/iterator.rs index 21eb3176..8d65dfc3 100644 --- a/nodejs/src/iterator.rs +++ b/nodejs/src/iterator.rs @@ -1,16 +1,5 @@ -// Copyright 2024 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors use futures::StreamExt; use lancedb::arrow::SendableRecordBatchStream; diff --git a/nodejs/src/lib.rs b/nodejs/src/lib.rs index 0ac75b7c..5e8c3950 100644 --- a/nodejs/src/lib.rs +++ b/nodejs/src/lib.rs @@ -1,16 +1,5 @@ -// Copyright 2024 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors use std::collections::HashMap; diff --git a/nodejs/src/merge.rs b/nodejs/src/merge.rs index 9228ec44..cbeb3890 100644 --- a/nodejs/src/merge.rs +++ b/nodejs/src/merge.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors + use lancedb::{arrow::IntoArrow, ipc::ipc_file_to_batches, table::merge::MergeInsertBuilder}; use napi::bindgen_prelude::*; use napi_derive::napi; diff --git a/nodejs/src/query.rs b/nodejs/src/query.rs index 8b2cb1a8..7a467c60 100644 --- a/nodejs/src/query.rs +++ b/nodejs/src/query.rs @@ -1,16 +1,5 @@ -// Copyright 2024 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors use std::sync::Arc; diff --git a/nodejs/src/remote.rs b/nodejs/src/remote.rs index 3ed940aa..38b4f43e 100644 --- a/nodejs/src/remote.rs +++ b/nodejs/src/remote.rs @@ -1,16 +1,5 @@ -// Copyright 2024 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors use napi_derive::*; diff --git a/nodejs/src/table.rs b/nodejs/src/table.rs index 5a674414..d70640e6 100644 --- a/nodejs/src/table.rs +++ b/nodejs/src/table.rs @@ -1,16 +1,5 @@ -// Copyright 2024 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors use std::collections::HashMap; diff --git a/nodejs/src/util.rs b/nodejs/src/util.rs index 9fb3681b..a29a67f9 100644 --- a/nodejs/src/util.rs +++ b/nodejs/src/util.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors + use lancedb::DistanceType; pub fn parse_distance_type(distance_type: impl AsRef) -> napi::Result { diff --git a/python/build.rs b/python/build.rs index dace4a9b..a8bd66da 100644 --- a/python/build.rs +++ b/python/build.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors + fn main() { pyo3_build_config::add_extension_module_link_args(); } diff --git a/python/license_header.txt b/python/license_header.txt new file mode 100644 index 00000000..471e174d --- /dev/null +++ b/python/license_header.txt @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors diff --git a/python/python/lancedb/__init__.py b/python/python/lancedb/__init__.py index 93365073..8eddee18 100644 --- a/python/python/lancedb/__init__.py +++ b/python/python/lancedb/__init__.py @@ -1,15 +1,6 @@ -# Copyright 2023 LanceDB Developers -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + import importlib.metadata import os diff --git a/python/python/lancedb/arrow.py b/python/python/lancedb/arrow.py index 602d7df7..7cf876d9 100644 --- a/python/python/lancedb/arrow.py +++ b/python/python/lancedb/arrow.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + from typing import List, Optional, Union import pyarrow as pa diff --git a/python/python/lancedb/common.py b/python/python/lancedb/common.py index 80e3254d..07ae8efe 100644 --- a/python/python/lancedb/common.py +++ b/python/python/lancedb/common.py @@ -1,15 +1,7 @@ -# Copyright 2023 LanceDB Developers -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + + from pathlib import Path from typing import Iterable, List, Optional, Union diff --git a/python/python/lancedb/conftest.py b/python/python/lancedb/conftest.py index a1c748f5..53ac89da 100644 --- a/python/python/lancedb/conftest.py +++ b/python/python/lancedb/conftest.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + import os import time diff --git a/python/python/lancedb/context.py b/python/python/lancedb/context.py index bd7b04c8..b0e085ff 100644 --- a/python/python/lancedb/context.py +++ b/python/python/lancedb/context.py @@ -1,15 +1,7 @@ -# Copyright 2023 LanceDB Developers -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + + from __future__ import annotations import deprecation diff --git a/python/python/lancedb/db.py b/python/python/lancedb/db.py index 51c1c610..813348b8 100644 --- a/python/python/lancedb/db.py +++ b/python/python/lancedb/db.py @@ -1,15 +1,6 @@ -# Copyright 2023 LanceDB Developers -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + from __future__ import annotations diff --git a/python/python/lancedb/dependencies.py b/python/python/lancedb/dependencies.py index 83454d26..50fc5534 100644 --- a/python/python/lancedb/dependencies.py +++ b/python/python/lancedb/dependencies.py @@ -1,5 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 -# SPDX-FileCopyrightText: Copyright The Lance Authors +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + + # # The following code is originally from https://github.com/pola-rs/polars/blob/ea4389c31b0e87ddf20a85e4c3797b285966edb6/py-polars/polars/dependencies.py # and is licensed under the MIT license: diff --git a/python/python/lancedb/embeddings/__init__.py b/python/python/lancedb/embeddings/__init__.py index afa127d7..0b9680d4 100644 --- a/python/python/lancedb/embeddings/__init__.py +++ b/python/python/lancedb/embeddings/__init__.py @@ -1,15 +1,7 @@ -# Copyright (c) 2023. LanceDB Developers -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + + # ruff: noqa: F401 from .base import EmbeddingFunction, EmbeddingFunctionConfig, TextEmbeddingFunction from .bedrock import BedRockText diff --git a/python/python/lancedb/embeddings/bedrock.py b/python/python/lancedb/embeddings/bedrock.py index c7105370..ffa44f0c 100644 --- a/python/python/lancedb/embeddings/bedrock.py +++ b/python/python/lancedb/embeddings/bedrock.py @@ -1,15 +1,6 @@ -# Copyright (c) 2023. LanceDB Developers -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + import json from functools import cached_property diff --git a/python/python/lancedb/embeddings/cohere.py b/python/python/lancedb/embeddings/cohere.py index 03e41814..8769ddaa 100644 --- a/python/python/lancedb/embeddings/cohere.py +++ b/python/python/lancedb/embeddings/cohere.py @@ -1,15 +1,6 @@ -# Copyright (c) 2023. LanceDB Developers -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + import os from typing import ClassVar, List, Union diff --git a/python/python/lancedb/embeddings/gemini_text.py b/python/python/lancedb/embeddings/gemini_text.py index 55afc5e0..9756115c 100644 --- a/python/python/lancedb/embeddings/gemini_text.py +++ b/python/python/lancedb/embeddings/gemini_text.py @@ -1,15 +1,6 @@ -# Copyright (c) 2023. LanceDB Developers -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + import os from functools import cached_property diff --git a/python/python/lancedb/embeddings/gte.py b/python/python/lancedb/embeddings/gte.py index 34038889..b4e7e16e 100644 --- a/python/python/lancedb/embeddings/gte.py +++ b/python/python/lancedb/embeddings/gte.py @@ -1,15 +1,7 @@ -# Copyright (c) 2023. LanceDB Developers -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + + from typing import List, Union import numpy as np diff --git a/python/python/lancedb/embeddings/gte_mlx_model.py b/python/python/lancedb/embeddings/gte_mlx_model.py index 89c509f6..af6f5fbf 100644 --- a/python/python/lancedb/embeddings/gte_mlx_model.py +++ b/python/python/lancedb/embeddings/gte_mlx_model.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + import json from typing import List, Optional diff --git a/python/python/lancedb/embeddings/imagebind.py b/python/python/lancedb/embeddings/imagebind.py index d66e44fb..84bb0a12 100644 --- a/python/python/lancedb/embeddings/imagebind.py +++ b/python/python/lancedb/embeddings/imagebind.py @@ -1,15 +1,6 @@ -# Copyright (c) 2023. LanceDB Developers -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + from functools import cached_property from typing import List, Union diff --git a/python/python/lancedb/embeddings/instructor.py b/python/python/lancedb/embeddings/instructor.py index a6022be6..a694fd38 100644 --- a/python/python/lancedb/embeddings/instructor.py +++ b/python/python/lancedb/embeddings/instructor.py @@ -1,15 +1,7 @@ -# Copyright (c) 2023. LanceDB Developers -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + + from typing import List import numpy as np diff --git a/python/python/lancedb/embeddings/jinaai.py b/python/python/lancedb/embeddings/jinaai.py index 5f89d97c..03ffbd63 100644 --- a/python/python/lancedb/embeddings/jinaai.py +++ b/python/python/lancedb/embeddings/jinaai.py @@ -1,15 +1,6 @@ -# Copyright (c) 2023. LanceDB Developers -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + import os import io diff --git a/python/python/lancedb/embeddings/open_clip.py b/python/python/lancedb/embeddings/open_clip.py index 4d0a3a32..ab6537a1 100644 --- a/python/python/lancedb/embeddings/open_clip.py +++ b/python/python/lancedb/embeddings/open_clip.py @@ -1,15 +1,7 @@ -# Copyright (c) 2023. LanceDB Developers -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + + import concurrent.futures import io import os diff --git a/python/python/lancedb/embeddings/sentence_transformers.py b/python/python/lancedb/embeddings/sentence_transformers.py index b0ef1d50..30d283cf 100644 --- a/python/python/lancedb/embeddings/sentence_transformers.py +++ b/python/python/lancedb/embeddings/sentence_transformers.py @@ -1,15 +1,7 @@ -# Copyright (c) 2023. LanceDB Developers -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + + from typing import List, Union import numpy as np diff --git a/python/python/lancedb/embeddings/transformers.py b/python/python/lancedb/embeddings/transformers.py index caee75fb..c8a65b9c 100644 --- a/python/python/lancedb/embeddings/transformers.py +++ b/python/python/lancedb/embeddings/transformers.py @@ -1,15 +1,6 @@ -# Copyright (c) 2023. LanceDB Developers -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + from functools import cached_property from typing import List, Any diff --git a/python/python/lancedb/embeddings/utils.py b/python/python/lancedb/embeddings/utils.py index 59dcdb9b..cf7cf104 100644 --- a/python/python/lancedb/embeddings/utils.py +++ b/python/python/lancedb/embeddings/utils.py @@ -1,15 +1,6 @@ -# Copyright (c) 2023. LanceDB Developers -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + import functools import math diff --git a/python/python/lancedb/embeddings/voyageai.py b/python/python/lancedb/embeddings/voyageai.py index 417b5fc4..73d62703 100644 --- a/python/python/lancedb/embeddings/voyageai.py +++ b/python/python/lancedb/embeddings/voyageai.py @@ -1,15 +1,6 @@ -# Copyright (c) 2023. LanceDB Developers -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + import os from typing import ClassVar, TYPE_CHECKING, List, Union diff --git a/python/python/lancedb/embeddings/watsonx.py b/python/python/lancedb/embeddings/watsonx.py index 35aa132f..039713c0 100644 --- a/python/python/lancedb/embeddings/watsonx.py +++ b/python/python/lancedb/embeddings/watsonx.py @@ -1,15 +1,7 @@ -# Copyright (c) 2023. LanceDB Developers -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + + import os from functools import cached_property from typing import List, Optional, Dict, Union diff --git a/python/python/lancedb/exceptions.py b/python/python/lancedb/exceptions.py index 0dddb13d..0ac0971e 100644 --- a/python/python/lancedb/exceptions.py +++ b/python/python/lancedb/exceptions.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + """Custom exception handling""" diff --git a/python/python/lancedb/index.py b/python/python/lancedb/index.py index 8b9f7ca4..6d855f52 100644 --- a/python/python/lancedb/index.py +++ b/python/python/lancedb/index.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + from dataclasses import dataclass from typing import Literal, Optional diff --git a/python/python/lancedb/integrations/__init__.py b/python/python/lancedb/integrations/__init__.py index e69de29b..471e174d 100644 --- a/python/python/lancedb/integrations/__init__.py +++ b/python/python/lancedb/integrations/__init__.py @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors diff --git a/python/python/lancedb/integrations/pyarrow.py b/python/python/lancedb/integrations/pyarrow.py index 2225ef94..db4353e3 100644 --- a/python/python/lancedb/integrations/pyarrow.py +++ b/python/python/lancedb/integrations/pyarrow.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + import logging from typing import Any, List, Optional, Tuple, Union, Literal diff --git a/python/python/lancedb/merge.py b/python/python/lancedb/merge.py index 48cc9847..575f1dba 100644 --- a/python/python/lancedb/merge.py +++ b/python/python/lancedb/merge.py @@ -1,15 +1,7 @@ -# Copyright 2023 LanceDB Developers -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + + from __future__ import annotations from typing import TYPE_CHECKING, List, Optional diff --git a/python/python/lancedb/remote/__init__.py b/python/python/lancedb/remote/__init__.py index e834c226..8b34aba8 100644 --- a/python/python/lancedb/remote/__init__.py +++ b/python/python/lancedb/remote/__init__.py @@ -1,15 +1,6 @@ -# Copyright 2023 LanceDB Developers -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + from dataclasses import dataclass, field from datetime import timedelta diff --git a/python/python/lancedb/remote/db.py b/python/python/lancedb/remote/db.py index f53ab10a..e01c49e6 100644 --- a/python/python/lancedb/remote/db.py +++ b/python/python/lancedb/remote/db.py @@ -1,15 +1,6 @@ -# Copyright 2023 LanceDB Developers -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + from datetime import timedelta import logging diff --git a/python/python/lancedb/remote/errors.py b/python/python/lancedb/remote/errors.py index d8f3fde6..76e3b5a8 100644 --- a/python/python/lancedb/remote/errors.py +++ b/python/python/lancedb/remote/errors.py @@ -1,15 +1,5 @@ -# Copyright 2023 LanceDB Developers -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors from typing import Optional diff --git a/python/python/lancedb/rerankers/__init__.py b/python/python/lancedb/rerankers/__init__.py index c3e27331..6bac100e 100644 --- a/python/python/lancedb/rerankers/__init__.py +++ b/python/python/lancedb/rerankers/__init__.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + from .base import Reranker from .cohere import CohereReranker from .colbert import ColbertReranker diff --git a/python/python/lancedb/rerankers/answerdotai.py b/python/python/lancedb/rerankers/answerdotai.py index 3940fe4b..0a4897b9 100644 --- a/python/python/lancedb/rerankers/answerdotai.py +++ b/python/python/lancedb/rerankers/answerdotai.py @@ -1,15 +1,7 @@ -# Copyright (c) 2023. LanceDB Developers -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + + import pyarrow as pa from .base import Reranker from ..util import attempt_import_or_raise diff --git a/python/python/lancedb/rerankers/base.py b/python/python/lancedb/rerankers/base.py index 7f90d40a..ece08eec 100644 --- a/python/python/lancedb/rerankers/base.py +++ b/python/python/lancedb/rerankers/base.py @@ -1,15 +1,6 @@ -# Copyright (c) 2023. LanceDB Developers -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + from abc import ABC, abstractmethod from packaging.version import Version diff --git a/python/python/lancedb/rerankers/cohere.py b/python/python/lancedb/rerankers/cohere.py index 1462b5fd..b4044995 100644 --- a/python/python/lancedb/rerankers/cohere.py +++ b/python/python/lancedb/rerankers/cohere.py @@ -1,15 +1,6 @@ -# Copyright (c) 2023. LanceDB Developers -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + import os from packaging.version import Version diff --git a/python/python/lancedb/rerankers/colbert.py b/python/python/lancedb/rerankers/colbert.py index b40c0b4b..a7a98b36 100644 --- a/python/python/lancedb/rerankers/colbert.py +++ b/python/python/lancedb/rerankers/colbert.py @@ -1,15 +1,6 @@ -# Copyright (c) 2023. LanceDB Developers -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + from .answerdotai import AnswerdotaiRerankers diff --git a/python/python/lancedb/rerankers/cross_encoder.py b/python/python/lancedb/rerankers/cross_encoder.py index 6a6cb2bd..3920f4d0 100644 --- a/python/python/lancedb/rerankers/cross_encoder.py +++ b/python/python/lancedb/rerankers/cross_encoder.py @@ -1,15 +1,6 @@ -# Copyright (c) 2023. LanceDB Developers -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + from functools import cached_property from typing import Union diff --git a/python/python/lancedb/rerankers/jinaai.py b/python/python/lancedb/rerankers/jinaai.py index c44355cf..781455eb 100644 --- a/python/python/lancedb/rerankers/jinaai.py +++ b/python/python/lancedb/rerankers/jinaai.py @@ -1,15 +1,6 @@ -# Copyright (c) 2023. LanceDB Developers -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + import os from functools import cached_property diff --git a/python/python/lancedb/rerankers/linear_combination.py b/python/python/lancedb/rerankers/linear_combination.py index f8d45eed..a22c7b8d 100644 --- a/python/python/lancedb/rerankers/linear_combination.py +++ b/python/python/lancedb/rerankers/linear_combination.py @@ -1,15 +1,6 @@ -# Copyright (c) 2023. LanceDB Developers -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + from collections import defaultdict from numpy import nan diff --git a/python/python/lancedb/rerankers/openai.py b/python/python/lancedb/rerankers/openai.py index 76fe8e4c..7bffdc56 100644 --- a/python/python/lancedb/rerankers/openai.py +++ b/python/python/lancedb/rerankers/openai.py @@ -1,15 +1,6 @@ -# Copyright (c) 2023. LanceDB Developers -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + import json import os diff --git a/python/python/lancedb/rerankers/rrf.py b/python/python/lancedb/rerankers/rrf.py index e0c95b48..cbb38cae 100644 --- a/python/python/lancedb/rerankers/rrf.py +++ b/python/python/lancedb/rerankers/rrf.py @@ -1,15 +1,6 @@ -# Copyright (c) 2023. LanceDB Developers -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + from typing import Union, List, TYPE_CHECKING import pyarrow as pa diff --git a/python/python/lancedb/rerankers/util.py b/python/python/lancedb/rerankers/util.py index 0edcfc20..5b29753d 100644 --- a/python/python/lancedb/rerankers/util.py +++ b/python/python/lancedb/rerankers/util.py @@ -1,5 +1,6 @@ # SPDX-License-Identifier: Apache-2.0 -# SPDX-FileCopyrightText: Copyright The Lance Authors +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + import pyarrow as pa diff --git a/python/python/lancedb/rerankers/voyageai.py b/python/python/lancedb/rerankers/voyageai.py index e47f190e..c0e2d23c 100644 --- a/python/python/lancedb/rerankers/voyageai.py +++ b/python/python/lancedb/rerankers/voyageai.py @@ -1,15 +1,6 @@ -# Copyright (c) 2023. LanceDB Developers -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + import os from functools import cached_property diff --git a/python/python/lancedb/schema.py b/python/python/lancedb/schema.py index 1a604dd5..e8e73f2e 100644 --- a/python/python/lancedb/schema.py +++ b/python/python/lancedb/schema.py @@ -1,15 +1,6 @@ -# Copyright 2023 LanceDB Developers -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + """Schema related utilities.""" diff --git a/python/python/lancedb/util.py b/python/python/lancedb/util.py index 67c5f9c7..3eb70d20 100644 --- a/python/python/lancedb/util.py +++ b/python/python/lancedb/util.py @@ -1,5 +1,6 @@ # SPDX-License-Identifier: Apache-2.0 -# SPDX-FileCopyrightText: Copyright The Lance Authors +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + import binascii import functools diff --git a/python/python/tests/docs/test_basic.py b/python/python/tests/docs/test_basic.py index 62b9055d..433b209c 100644 --- a/python/python/tests/docs/test_basic.py +++ b/python/python/tests/docs/test_basic.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + import shutil # --8<-- [start:imports] diff --git a/python/python/tests/docs/test_binary_vector.py b/python/python/tests/docs/test_binary_vector.py index fba4b85a..ed03cadd 100644 --- a/python/python/tests/docs/test_binary_vector.py +++ b/python/python/tests/docs/test_binary_vector.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + import shutil # --8<-- [start:imports] diff --git a/python/python/tests/docs/test_distance_range.py b/python/python/tests/docs/test_distance_range.py index 41624d74..a405c682 100644 --- a/python/python/tests/docs/test_distance_range.py +++ b/python/python/tests/docs/test_distance_range.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + import shutil import pytest diff --git a/python/python/tests/docs/test_embeddings_optional.py b/python/python/tests/docs/test_embeddings_optional.py index b7b915df..89eababb 100644 --- a/python/python/tests/docs/test_embeddings_optional.py +++ b/python/python/tests/docs/test_embeddings_optional.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + import lancedb # --8<-- [start:imports] diff --git a/python/python/tests/docs/test_guide_index.py b/python/python/tests/docs/test_guide_index.py index 482dd794..c9dd5a86 100644 --- a/python/python/tests/docs/test_guide_index.py +++ b/python/python/tests/docs/test_guide_index.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + # --8<-- [start:import-lancedb] import lancedb diff --git a/python/python/tests/docs/test_guide_tables.py b/python/python/tests/docs/test_guide_tables.py index fd23c1fb..d174c5b9 100644 --- a/python/python/tests/docs/test_guide_tables.py +++ b/python/python/tests/docs/test_guide_tables.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + # --8<-- [start:import-lancedb] import lancedb diff --git a/python/python/tests/docs/test_multivector.py b/python/python/tests/docs/test_multivector.py index 7ef02eb7..5e4ae831 100644 --- a/python/python/tests/docs/test_multivector.py +++ b/python/python/tests/docs/test_multivector.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + import shutil from lancedb.index import IvfPq import pytest diff --git a/python/python/tests/docs/test_python.py b/python/python/tests/docs/test_python.py index 44c028db..a9dfbf95 100644 --- a/python/python/tests/docs/test_python.py +++ b/python/python/tests/docs/test_python.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + # --8<-- [start:import-lancedb] import lancedb diff --git a/python/python/tests/docs/test_search.py b/python/python/tests/docs/test_search.py index 55be3529..a3f4c60a 100644 --- a/python/python/tests/docs/test_search.py +++ b/python/python/tests/docs/test_search.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + # --8<-- [start:import-lancedb] import lancedb diff --git a/python/python/tests/test_context.py b/python/python/tests/test_context.py index bcd1d63c..31a1b171 100644 --- a/python/python/tests/test_context.py +++ b/python/python/tests/test_context.py @@ -1,15 +1,6 @@ -# Copyright 2023 LanceDB Developers -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + import pandas as pd import pytest diff --git a/python/python/tests/test_db.py b/python/python/tests/test_db.py index 176c0110..d7e2d0c4 100644 --- a/python/python/tests/test_db.py +++ b/python/python/tests/test_db.py @@ -1,15 +1,6 @@ -# Copyright 2023 LanceDB Developers -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + import re from datetime import timedelta diff --git a/python/python/tests/test_duckdb.py b/python/python/tests/test_duckdb.py index e122ba94..a307149e 100644 --- a/python/python/tests/test_duckdb.py +++ b/python/python/tests/test_duckdb.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + import duckdb import pyarrow as pa diff --git a/python/python/tests/test_e2e_remote_db.py b/python/python/tests/test_e2e_remote_db.py index f058092e..d4364bc4 100644 --- a/python/python/tests/test_e2e_remote_db.py +++ b/python/python/tests/test_e2e_remote_db.py @@ -1,15 +1,6 @@ -# Copyright 2023 LanceDB Developers -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + import numpy as np import pytest diff --git a/python/python/tests/test_fts.py b/python/python/tests/test_fts.py index ff5c6287..c08976f9 100644 --- a/python/python/tests/test_fts.py +++ b/python/python/tests/test_fts.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + # Copyright 2023 LanceDB Developers # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/python/python/tests/test_huggingface.py b/python/python/tests/test_huggingface.py index ea4d39b2..9b597bbc 100644 --- a/python/python/tests/test_huggingface.py +++ b/python/python/tests/test_huggingface.py @@ -1,15 +1,6 @@ -# Copyright 2024 Lance Developers -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + from pathlib import Path diff --git a/python/python/tests/test_io.py b/python/python/tests/test_io.py index af082180..dbf24d69 100644 --- a/python/python/tests/test_io.py +++ b/python/python/tests/test_io.py @@ -1,15 +1,6 @@ -# Copyright 2023 LanceDB Developers -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + import os diff --git a/python/python/tests/test_pyarrow.py b/python/python/tests/test_pyarrow.py index d4a1e07c..7d99d19c 100644 --- a/python/python/tests/test_pyarrow.py +++ b/python/python/tests/test_pyarrow.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + import pyarrow as pa import lancedb diff --git a/python/python/tests/test_rerankers.py b/python/python/tests/test_rerankers.py index 8a6ee83c..fce74ac9 100644 --- a/python/python/tests/test_rerankers.py +++ b/python/python/tests/test_rerankers.py @@ -1,3 +1,6 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + import os import random diff --git a/python/python/tests/test_s3.py b/python/python/tests/test_s3.py index 85b72749..85040998 100644 --- a/python/python/tests/test_s3.py +++ b/python/python/tests/test_s3.py @@ -1,15 +1,6 @@ -# Copyright 2024 Lance Developers -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + import asyncio import copy diff --git a/python/python/tests/test_table.py b/python/python/tests/test_table.py index a10ea597..6e810b97 100644 --- a/python/python/tests/test_table.py +++ b/python/python/tests/test_table.py @@ -1,5 +1,6 @@ # SPDX-License-Identifier: Apache-2.0 -# SPDX-FileCopyrightText: Copyright The Lance Authors +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + import os from datetime import date, datetime, timedelta diff --git a/python/python/tests/test_util.py b/python/python/tests/test_util.py index 596b4649..3b31bcea 100644 --- a/python/python/tests/test_util.py +++ b/python/python/tests/test_util.py @@ -1,15 +1,6 @@ -# Copyright 2023 LanceDB Developers -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright The LanceDB Authors + import os import pathlib diff --git a/python/src/arrow.rs b/python/src/arrow.rs index cb797345..04a84d5a 100644 --- a/python/src/arrow.rs +++ b/python/src/arrow.rs @@ -1,5 +1,5 @@ -// use arrow::datatypes::SchemaRef; -// use lancedb::arrow::SendableRecordBatchStream; +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors use std::sync::Arc; diff --git a/python/src/error.rs b/python/src/error.rs index f34eedcb..3c35184b 100644 --- a/python/src/error.rs +++ b/python/src/error.rs @@ -1,16 +1,5 @@ -// Copyright 2024 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors use pyo3::{ exceptions::{PyIOError, PyNotImplementedError, PyOSError, PyRuntimeError, PyValueError}, diff --git a/python/src/index.rs b/python/src/index.rs index 48b5e074..3f50e9a6 100644 --- a/python/src/index.rs +++ b/python/src/index.rs @@ -1,16 +1,5 @@ -// Copyright 2024 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors use lancedb::index::vector::IvfFlatIndexBuilder; use lancedb::index::{ diff --git a/python/src/lib.rs b/python/src/lib.rs index eff066d0..a1ed0d08 100644 --- a/python/src/lib.rs +++ b/python/src/lib.rs @@ -1,16 +1,5 @@ -// Copyright 2024 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors use arrow::RecordBatchStream; use connection::{connect, Connection}; diff --git a/python/src/query.rs b/python/src/query.rs index 42e6adb4..723d7c81 100644 --- a/python/src/query.rs +++ b/python/src/query.rs @@ -1,16 +1,5 @@ -// Copyright 2024 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors use arrow::array::make_array; use arrow::array::ArrayData; diff --git a/python/src/util.rs b/python/src/util.rs index a649f875..84043217 100644 --- a/python/src/util.rs +++ b/python/src/util.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors + use std::sync::Mutex; use lancedb::DistanceType; diff --git a/rust/ffi/node/src/arrow.rs b/rust/ffi/node/src/arrow.rs index 036f7104..8f509cf5 100644 --- a/rust/ffi/node/src/arrow.rs +++ b/rust/ffi/node/src/arrow.rs @@ -1,16 +1,5 @@ -// Copyright 2024 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors use std::io::Cursor; use std::ops::Deref; diff --git a/rust/ffi/node/src/convert.rs b/rust/ffi/node/src/convert.rs index d098fc0c..e197b75b 100644 --- a/rust/ffi/node/src/convert.rs +++ b/rust/ffi/node/src/convert.rs @@ -1,16 +1,5 @@ -// Copyright 2023 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors use neon::prelude::*; use neon::types::buffer::TypedArray; diff --git a/rust/ffi/node/src/error.rs b/rust/ffi/node/src/error.rs index 2777cb7b..bb02f570 100644 --- a/rust/ffi/node/src/error.rs +++ b/rust/ffi/node/src/error.rs @@ -1,16 +1,5 @@ -// Copyright 2023 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors use arrow_schema::ArrowError; use neon::context::Context; diff --git a/rust/ffi/node/src/index.rs b/rust/ffi/node/src/index.rs index 3dcc9bea..103613e9 100644 --- a/rust/ffi/node/src/index.rs +++ b/rust/ffi/node/src/index.rs @@ -1,16 +1,5 @@ -// Copyright 2023 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors pub mod scalar; pub mod vector; diff --git a/rust/ffi/node/src/index/scalar.rs b/rust/ffi/node/src/index/scalar.rs index 10937467..a8c25901 100644 --- a/rust/ffi/node/src/index/scalar.rs +++ b/rust/ffi/node/src/index/scalar.rs @@ -1,16 +1,5 @@ -// Copyright 2023 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors use lancedb::index::{scalar::BTreeIndexBuilder, Index}; use neon::{ diff --git a/rust/ffi/node/src/index/vector.rs b/rust/ffi/node/src/index/vector.rs index bcc74cb5..8a875126 100644 --- a/rust/ffi/node/src/index/vector.rs +++ b/rust/ffi/node/src/index/vector.rs @@ -1,16 +1,5 @@ -// Copyright 2023 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors use lancedb::index::vector::IvfPqIndexBuilder; use lancedb::index::Index; diff --git a/rust/ffi/node/src/lib.rs b/rust/ffi/node/src/lib.rs index 4e4105fa..23903411 100644 --- a/rust/ffi/node/src/lib.rs +++ b/rust/ffi/node/src/lib.rs @@ -1,16 +1,5 @@ -// Copyright 2023 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors use neon::prelude::*; use once_cell::sync::OnceCell; diff --git a/rust/ffi/node/src/neon_ext.rs b/rust/ffi/node/src/neon_ext.rs index e2e4b2d2..6f07dce6 100644 --- a/rust/ffi/node/src/neon_ext.rs +++ b/rust/ffi/node/src/neon_ext.rs @@ -1,15 +1,4 @@ -// Copyright 2023 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors pub mod js_object_ext; diff --git a/rust/ffi/node/src/neon_ext/js_object_ext.rs b/rust/ffi/node/src/neon_ext/js_object_ext.rs index fb08a4e1..868a6661 100644 --- a/rust/ffi/node/src/neon_ext/js_object_ext.rs +++ b/rust/ffi/node/src/neon_ext/js_object_ext.rs @@ -1,16 +1,5 @@ -// Copyright 2023 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors use crate::error::{Error, Result}; use neon::prelude::*; diff --git a/rust/ffi/node/src/query.rs b/rust/ffi/node/src/query.rs index 5aec3d3b..1ada244b 100644 --- a/rust/ffi/node/src/query.rs +++ b/rust/ffi/node/src/query.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors + use std::convert::TryFrom; use std::ops::Deref; diff --git a/rust/ffi/node/src/table.rs b/rust/ffi/node/src/table.rs index bbd59631..0583affb 100644 --- a/rust/ffi/node/src/table.rs +++ b/rust/ffi/node/src/table.rs @@ -1,16 +1,5 @@ -// Copyright 2023 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors use std::ops::Deref; diff --git a/rust/lancedb/examples/bedrock.rs b/rust/lancedb/examples/bedrock.rs index 3b9c7a23..5cc7e0cb 100644 --- a/rust/lancedb/examples/bedrock.rs +++ b/rust/lancedb/examples/bedrock.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors + use std::{iter::once, sync::Arc}; use arrow_array::{Float64Array, Int32Array, RecordBatch, RecordBatchIterator, StringArray}; diff --git a/rust/lancedb/examples/full_text_search.rs b/rust/lancedb/examples/full_text_search.rs index 1d63e308..b79400a5 100644 --- a/rust/lancedb/examples/full_text_search.rs +++ b/rust/lancedb/examples/full_text_search.rs @@ -1,16 +1,5 @@ -// Copyright 2024 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors use std::sync::Arc; diff --git a/rust/lancedb/examples/ivf_pq.rs b/rust/lancedb/examples/ivf_pq.rs index 3d141b2a..a92f9486 100644 --- a/rust/lancedb/examples/ivf_pq.rs +++ b/rust/lancedb/examples/ivf_pq.rs @@ -1,16 +1,5 @@ -// Copyright 2024 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors //! This example demonstrates setting advanced parameters when building an IVF PQ index //! diff --git a/rust/lancedb/examples/openai.rs b/rust/lancedb/examples/openai.rs index 3c1244f3..73954f34 100644 --- a/rust/lancedb/examples/openai.rs +++ b/rust/lancedb/examples/openai.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors + // --8<-- [start:imports] use std::{iter::once, sync::Arc}; diff --git a/rust/lancedb/examples/sentence_transformers.rs b/rust/lancedb/examples/sentence_transformers.rs index 13b270c4..9250430d 100644 --- a/rust/lancedb/examples/sentence_transformers.rs +++ b/rust/lancedb/examples/sentence_transformers.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors + use std::{iter::once, sync::Arc}; use arrow_array::{RecordBatch, RecordBatchIterator, StringArray}; diff --git a/rust/lancedb/examples/simple.rs b/rust/lancedb/examples/simple.rs index 775dd560..f5400da5 100644 --- a/rust/lancedb/examples/simple.rs +++ b/rust/lancedb/examples/simple.rs @@ -1,16 +1,5 @@ -// Copyright 2024 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors //! This example demonstrates basic usage of LanceDb. //! diff --git a/rust/lancedb/src/arrow.rs b/rust/lancedb/src/arrow.rs index 2c0fad5e..32adef9a 100644 --- a/rust/lancedb/src/arrow.rs +++ b/rust/lancedb/src/arrow.rs @@ -1,16 +1,5 @@ -// Copyright 2023 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors use std::{pin::Pin, sync::Arc}; diff --git a/rust/lancedb/src/connection.rs b/rust/lancedb/src/connection.rs index ebe29910..c03f3c42 100644 --- a/rust/lancedb/src/connection.rs +++ b/rust/lancedb/src/connection.rs @@ -1,16 +1,5 @@ -// Copyright 2023 LanceDB Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors //! LanceDB Database diff --git a/rust/lancedb/src/data.rs b/rust/lancedb/src/data.rs index ce566063..d988884a 100644 --- a/rust/lancedb/src/data.rs +++ b/rust/lancedb/src/data.rs @@ -1,16 +1,5 @@ -// Copyright 2023 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors //! Data types, schema coercion, and data cleaning and etc. diff --git a/rust/lancedb/src/data/inspect.rs b/rust/lancedb/src/data/inspect.rs index 29d4291a..f0cbd09e 100644 --- a/rust/lancedb/src/data/inspect.rs +++ b/rust/lancedb/src/data/inspect.rs @@ -1,16 +1,5 @@ -// Copyright 2023 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors use std::collections::HashMap; diff --git a/rust/lancedb/src/data/sanitize.rs b/rust/lancedb/src/data/sanitize.rs index fe139b99..35af8e5b 100644 --- a/rust/lancedb/src/data/sanitize.rs +++ b/rust/lancedb/src/data/sanitize.rs @@ -1,16 +1,5 @@ -// Copyright 2023 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors use std::{iter::repeat_with, sync::Arc}; diff --git a/rust/lancedb/src/embeddings.rs b/rust/lancedb/src/embeddings.rs index 832b4278..a4626ffc 100644 --- a/rust/lancedb/src/embeddings.rs +++ b/rust/lancedb/src/embeddings.rs @@ -1,16 +1,6 @@ -// Copyright 2024 LanceDB Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors + #[cfg(feature = "openai")] pub mod openai; diff --git a/rust/lancedb/src/embeddings/bedrock.rs b/rust/lancedb/src/embeddings/bedrock.rs index d0fbc921..4b1b2321 100644 --- a/rust/lancedb/src/embeddings/bedrock.rs +++ b/rust/lancedb/src/embeddings/bedrock.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors + use aws_sdk_bedrockruntime::Client as BedrockClient; use std::{borrow::Cow, fmt::Formatter, str::FromStr, sync::Arc}; diff --git a/rust/lancedb/src/embeddings/openai.rs b/rust/lancedb/src/embeddings/openai.rs index fea84260..c2a36c6e 100644 --- a/rust/lancedb/src/embeddings/openai.rs +++ b/rust/lancedb/src/embeddings/openai.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors + use std::{borrow::Cow, fmt::Formatter, str::FromStr, sync::Arc}; use arrow::array::{AsArray, Float32Builder}; diff --git a/rust/lancedb/src/embeddings/sentence_transformers.rs b/rust/lancedb/src/embeddings/sentence_transformers.rs index 0d0c30f7..af96969d 100644 --- a/rust/lancedb/src/embeddings/sentence_transformers.rs +++ b/rust/lancedb/src/embeddings/sentence_transformers.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors + use std::{borrow::Cow, sync::Arc}; use super::EmbeddingFunction; diff --git a/rust/lancedb/src/error.rs b/rust/lancedb/src/error.rs index 37bd8852..1b653913 100644 --- a/rust/lancedb/src/error.rs +++ b/rust/lancedb/src/error.rs @@ -1,16 +1,5 @@ -// Copyright 2023 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors use std::sync::PoisonError; diff --git a/rust/lancedb/src/index.rs b/rust/lancedb/src/index.rs index 201ee605..cc11f617 100644 --- a/rust/lancedb/src/index.rs +++ b/rust/lancedb/src/index.rs @@ -1,16 +1,5 @@ -// Copyright 2024 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors use std::sync::Arc; diff --git a/rust/lancedb/src/index/scalar.rs b/rust/lancedb/src/index/scalar.rs index b2f27c7d..2d5c0a72 100644 --- a/rust/lancedb/src/index/scalar.rs +++ b/rust/lancedb/src/index/scalar.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors + //! Scalar indices are exact indices that are used to quickly satisfy a variety of filters //! against a column of scalar values. //! diff --git a/rust/lancedb/src/index/vector.rs b/rust/lancedb/src/index/vector.rs index e7f0b6de..b5e5c710 100644 --- a/rust/lancedb/src/index/vector.rs +++ b/rust/lancedb/src/index/vector.rs @@ -1,16 +1,5 @@ -// Copyright 2023 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors //! Vector indices are approximate indices that are used to find rows similar to //! a query vector. Vector indices speed up vector searches. diff --git a/rust/lancedb/src/io.rs b/rust/lancedb/src/io.rs index ef12e4fd..8b2f74fd 100644 --- a/rust/lancedb/src/io.rs +++ b/rust/lancedb/src/io.rs @@ -1 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors + pub mod object_store; diff --git a/rust/lancedb/src/io/object_store.rs b/rust/lancedb/src/io/object_store.rs index bc61b751..9d4b0dca 100644 --- a/rust/lancedb/src/io/object_store.rs +++ b/rust/lancedb/src/io/object_store.rs @@ -1,16 +1,5 @@ -// Copyright 2023 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors //! A mirroring object store that mirror writes to a secondary object store diff --git a/rust/lancedb/src/ipc.rs b/rust/lancedb/src/ipc.rs index 79c6fe91..c814b41b 100644 --- a/rust/lancedb/src/ipc.rs +++ b/rust/lancedb/src/ipc.rs @@ -1,16 +1,5 @@ -// Copyright 2024 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors //! IPC support diff --git a/rust/lancedb/src/lib.rs b/rust/lancedb/src/lib.rs index 9ff37ccb..014b4290 100644 --- a/rust/lancedb/src/lib.rs +++ b/rust/lancedb/src/lib.rs @@ -1,16 +1,5 @@ -// Copyright 2024 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors //! [LanceDB](https://github.com/lancedb/lancedb) is an open-source database for vector-search built with persistent storage, //! which greatly simplifies retrieval, filtering and management of embeddings. diff --git a/rust/lancedb/src/polars_arrow_convertors.rs b/rust/lancedb/src/polars_arrow_convertors.rs index 91383037..3a345761 100644 --- a/rust/lancedb/src/polars_arrow_convertors.rs +++ b/rust/lancedb/src/polars_arrow_convertors.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors + /// Polars and LanceDB both use Arrow for their in memory-representation, but use /// different Rust Arrow implementations. LanceDB uses the arrow-rs crate and /// Polars uses the polars-arrow crate. diff --git a/rust/lancedb/src/query.rs b/rust/lancedb/src/query.rs index afbbb543..001a131c 100644 --- a/rust/lancedb/src/query.rs +++ b/rust/lancedb/src/query.rs @@ -1,16 +1,5 @@ -// Copyright 2024 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors use std::future::Future; use std::sync::Arc; diff --git a/rust/lancedb/src/remote.rs b/rust/lancedb/src/remote.rs index 7f94ea7d..45c007ee 100644 --- a/rust/lancedb/src/remote.rs +++ b/rust/lancedb/src/remote.rs @@ -1,16 +1,5 @@ -// Copyright 2024 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors //! This module contains a remote client for a LanceDB server. This is used //! to communicate with LanceDB cloud. It can also serve as an example for diff --git a/rust/lancedb/src/remote/client.rs b/rust/lancedb/src/remote/client.rs index 93fe6b6a..bbc51c63 100644 --- a/rust/lancedb/src/remote/client.rs +++ b/rust/lancedb/src/remote/client.rs @@ -1,16 +1,5 @@ -// Copyright 2024 LanceDB Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors use std::{future::Future, time::Duration}; diff --git a/rust/lancedb/src/remote/db.rs b/rust/lancedb/src/remote/db.rs index f08b93d7..9ee1e68d 100644 --- a/rust/lancedb/src/remote/db.rs +++ b/rust/lancedb/src/remote/db.rs @@ -1,16 +1,5 @@ -// Copyright 2024 LanceDB Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors use std::collections::HashMap; use std::sync::Arc; diff --git a/rust/lancedb/src/remote/table.rs b/rust/lancedb/src/remote/table.rs index a98996db..b27e5702 100644 --- a/rust/lancedb/src/remote/table.rs +++ b/rust/lancedb/src/remote/table.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors + use std::io::Cursor; use std::sync::{Arc, Mutex}; diff --git a/rust/lancedb/src/remote/util.rs b/rust/lancedb/src/remote/util.rs index d13be70f..b9fe824c 100644 --- a/rust/lancedb/src/remote/util.rs +++ b/rust/lancedb/src/remote/util.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors + use std::io::Cursor; use arrow_array::RecordBatchReader; diff --git a/rust/lancedb/src/table.rs b/rust/lancedb/src/table.rs index ea2d29f7..7cf98361 100644 --- a/rust/lancedb/src/table.rs +++ b/rust/lancedb/src/table.rs @@ -1,16 +1,5 @@ -// Copyright 2024 LanceDB Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors //! LanceDB Table APIs diff --git a/rust/lancedb/src/table/dataset.rs b/rust/lancedb/src/table/dataset.rs index a3c6348f..ffb5336d 100644 --- a/rust/lancedb/src/table/dataset.rs +++ b/rust/lancedb/src/table/dataset.rs @@ -1,16 +1,5 @@ -// Copyright 2024 LanceDB Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors use std::{ ops::{Deref, DerefMut}, diff --git a/rust/lancedb/src/table/merge.rs b/rust/lancedb/src/table/merge.rs index 159ede1c..32d12bca 100644 --- a/rust/lancedb/src/table/merge.rs +++ b/rust/lancedb/src/table/merge.rs @@ -1,16 +1,5 @@ -// Copyright 2024 Lance Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors use std::sync::Arc; diff --git a/rust/lancedb/src/utils.rs b/rust/lancedb/src/utils.rs index d630ed7c..3056dd9b 100644 --- a/rust/lancedb/src/utils.rs +++ b/rust/lancedb/src/utils.rs @@ -1,16 +1,5 @@ -// Copyright 2024 LanceDB Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors use std::sync::Arc; diff --git a/rust/lancedb/tests/embedding_registry_test.rs b/rust/lancedb/tests/embedding_registry_test.rs index 3fd54bfb..c6386aa8 100644 --- a/rust/lancedb/tests/embedding_registry_test.rs +++ b/rust/lancedb/tests/embedding_registry_test.rs @@ -1,3 +1,6 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors + use std::{ borrow::Cow, collections::{HashMap, HashSet}, diff --git a/rust/lancedb/tests/object_store_test.rs b/rust/lancedb/tests/object_store_test.rs index ba9d8e1c..c5beea46 100644 --- a/rust/lancedb/tests/object_store_test.rs +++ b/rust/lancedb/tests/object_store_test.rs @@ -1,16 +1,6 @@ -// Copyright 2023 LanceDB Developers. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors + #![cfg(feature = "s3-test")] use std::sync::Arc; diff --git a/rust/license_header.txt b/rust/license_header.txt new file mode 100644 index 00000000..488f8c03 --- /dev/null +++ b/rust/license_header.txt @@ -0,0 +1,2 @@ +// SPDX-License-Identifier: Apache-2.0 +// SPDX-FileCopyrightText: Copyright The LanceDB Authors