diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4efb077..a9f3812 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,3 +5,12 @@ repos: - id: ruff-check args: [--fix] - id: ruff-format + + - repo: local + hooks: + - id: license-headers + name: Check Elastic License 2.0 headers + entry: bash -c 'missing=$(grep -L "Licensed under the Elastic License 2.0" "$@"); if [ -n "$missing" ]; then echo "Files missing Elastic License 2.0 header:"; echo "$missing"; exit 1; fi' -- + language: system + types: [python] + exclude: ^(\.venv|dist|build)/ diff --git a/examples/chatbot_rag_app/datasets/__init__.py b/examples/chatbot_rag_app/datasets/__init__.py index 8b13789..3de86e8 100644 --- a/examples/chatbot_rag_app/datasets/__init__.py +++ b/examples/chatbot_rag_app/datasets/__init__.py @@ -1 +1,3 @@ - +# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +# or more contributor license agreements. Licensed under the Elastic License 2.0; +# you may not use this file except in compliance with the Elastic License 2.0. diff --git a/examples/chatbot_rag_app/evaluators/__init__.py b/examples/chatbot_rag_app/evaluators/__init__.py index 8b13789..3de86e8 100644 --- a/examples/chatbot_rag_app/evaluators/__init__.py +++ b/examples/chatbot_rag_app/evaluators/__init__.py @@ -1 +1,3 @@ - +# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +# or more contributor license agreements. Licensed under the Elastic License 2.0; +# you may not use this file except in compliance with the Elastic License 2.0. diff --git a/examples/chatbot_rag_app/tasks/__init__.py b/examples/chatbot_rag_app/tasks/__init__.py index 8b13789..3de86e8 100644 --- a/examples/chatbot_rag_app/tasks/__init__.py +++ b/examples/chatbot_rag_app/tasks/__init__.py @@ -1 +1,3 @@ - +# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +# or more contributor license agreements. Licensed under the Elastic License 2.0; +# you may not use this file except in compliance with the Elastic License 2.0. diff --git a/examples/claude_code_eval/__init__.py b/examples/claude_code_eval/__init__.py index e69de29..3de86e8 100644 --- a/examples/claude_code_eval/__init__.py +++ b/examples/claude_code_eval/__init__.py @@ -0,0 +1,3 @@ +# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +# or more contributor license agreements. Licensed under the Elastic License 2.0; +# you may not use this file except in compliance with the Elastic License 2.0. diff --git a/examples/claude_code_eval/datasets/__init__.py b/examples/claude_code_eval/datasets/__init__.py index e69de29..3de86e8 100644 --- a/examples/claude_code_eval/datasets/__init__.py +++ b/examples/claude_code_eval/datasets/__init__.py @@ -0,0 +1,3 @@ +# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +# or more contributor license agreements. Licensed under the Elastic License 2.0; +# you may not use this file except in compliance with the Elastic License 2.0. diff --git a/examples/claude_code_eval/evaluators/__init__.py b/examples/claude_code_eval/evaluators/__init__.py index e69de29..3de86e8 100644 --- a/examples/claude_code_eval/evaluators/__init__.py +++ b/examples/claude_code_eval/evaluators/__init__.py @@ -0,0 +1,3 @@ +# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +# or more contributor license agreements. Licensed under the Elastic License 2.0; +# you may not use this file except in compliance with the Elastic License 2.0. diff --git a/examples/claude_code_eval/tasks/__init__.py b/examples/claude_code_eval/tasks/__init__.py index e69de29..3de86e8 100644 --- a/examples/claude_code_eval/tasks/__init__.py +++ b/examples/claude_code_eval/tasks/__init__.py @@ -0,0 +1,3 @@ +# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +# or more contributor license agreements. Licensed under the Elastic License 2.0; +# you may not use this file except in compliance with the Elastic License 2.0.