From 6d52be49f447eaef0229c6497eb80b1cccbafc95 Mon Sep 17 00:00:00 2001 From: Daniel Chalef <131175+danielchalef@users.noreply.github.com> Date: Fri, 23 Aug 2024 13:01:33 -0700 Subject: [PATCH] Add Apache License 2.0 boilerplate to all Python files (#30) * Add Apache License 2.0 boilerplate to all Python files --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/getzep/graphiti?shareId=XXXX-XXXX-XXXX-XXXX). * format * format * chore: Add Ellipsis configuration file --- core/edges.py | 16 +++++++++++++++ core/graphiti.py | 16 +++++++++++++++ core/llm_client/client.py | 16 +++++++++++++++ core/llm_client/config.py | 16 +++++++++++++++ core/llm_client/openai_client.py | 16 +++++++++++++++ core/nodes.py | 16 +++++++++++++++ core/prompts/dedupe_edges.py | 16 +++++++++++++++ core/prompts/dedupe_nodes.py | 16 +++++++++++++++ core/prompts/extract_edges.py | 16 +++++++++++++++ core/prompts/extract_nodes.py | 16 +++++++++++++++ core/prompts/invalidate_edges.py | 16 +++++++++++++++ core/prompts/lib.py | 16 +++++++++++++++ core/prompts/models.py | 16 +++++++++++++++ core/search/search.py | 16 +++++++++++++++ core/utils/bulk_utils.py | 16 +++++++++++++++ core/utils/maintenance/edge_operations.py | 16 +++++++++++++++ .../maintenance/graph_data_operations.py | 16 +++++++++++++++ core/utils/maintenance/node_operations.py | 16 +++++++++++++++ core/utils/maintenance/temporal_operations.py | 16 +++++++++++++++ core/utils/utils.py | 16 +++++++++++++++ ellipsis.yaml | 20 +++++++++++++++++++ examples/podcast/podcast_runner.py | 16 +++++++++++++++ 22 files changed, 356 insertions(+) create mode 100644 ellipsis.yaml diff --git a/core/edges.py b/core/edges.py index 29978c9..ca80103 100644 --- a/core/edges.py +++ b/core/edges.py @@ -1,3 +1,19 @@ +""" +Copyright 2024, Zep Software, Inc. + +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 logging from abc import ABC, abstractmethod from datetime import datetime diff --git a/core/graphiti.py b/core/graphiti.py index 0c1a26c..b25e165 100644 --- a/core/graphiti.py +++ b/core/graphiti.py @@ -1,3 +1,19 @@ +""" +Copyright 2024, Zep Software, Inc. + +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 asyncio import logging import os diff --git a/core/llm_client/client.py b/core/llm_client/client.py index 0c5c7f7..3350dae 100644 --- a/core/llm_client/client.py +++ b/core/llm_client/client.py @@ -1,3 +1,19 @@ +""" +Copyright 2024, Zep Software, Inc. + +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 typing from abc import ABC, abstractmethod diff --git a/core/llm_client/config.py b/core/llm_client/config.py index a591ecf..fa614b5 100644 --- a/core/llm_client/config.py +++ b/core/llm_client/config.py @@ -1,3 +1,19 @@ +""" +Copyright 2024, Zep Software, Inc. + +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. +""" + EMBEDDING_DIM = 1024 diff --git a/core/llm_client/openai_client.py b/core/llm_client/openai_client.py index e5f4ed8..67c4a22 100644 --- a/core/llm_client/openai_client.py +++ b/core/llm_client/openai_client.py @@ -1,3 +1,19 @@ +""" +Copyright 2024, Zep Software, Inc. + +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 json import logging import typing diff --git a/core/nodes.py b/core/nodes.py index 3015a42..b77c3ce 100644 --- a/core/nodes.py +++ b/core/nodes.py @@ -1,3 +1,19 @@ +""" +Copyright 2024, Zep Software, Inc. + +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 logging from abc import ABC, abstractmethod from datetime import datetime diff --git a/core/prompts/dedupe_edges.py b/core/prompts/dedupe_edges.py index 4827ee4..f29c28d 100644 --- a/core/prompts/dedupe_edges.py +++ b/core/prompts/dedupe_edges.py @@ -1,3 +1,19 @@ +""" +Copyright 2024, Zep Software, Inc. + +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 json from typing import Any, Protocol, TypedDict diff --git a/core/prompts/dedupe_nodes.py b/core/prompts/dedupe_nodes.py index c3e2088..10f4466 100644 --- a/core/prompts/dedupe_nodes.py +++ b/core/prompts/dedupe_nodes.py @@ -1,3 +1,19 @@ +""" +Copyright 2024, Zep Software, Inc. + +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 json from typing import Any, Protocol, TypedDict diff --git a/core/prompts/extract_edges.py b/core/prompts/extract_edges.py index a57d202..b09dd5d 100644 --- a/core/prompts/extract_edges.py +++ b/core/prompts/extract_edges.py @@ -1,3 +1,19 @@ +""" +Copyright 2024, Zep Software, Inc. + +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 json from typing import Any, Protocol, TypedDict diff --git a/core/prompts/extract_nodes.py b/core/prompts/extract_nodes.py index 8b75aff..d068170 100644 --- a/core/prompts/extract_nodes.py +++ b/core/prompts/extract_nodes.py @@ -1,3 +1,19 @@ +""" +Copyright 2024, Zep Software, Inc. + +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 json from typing import Any, Protocol, TypedDict diff --git a/core/prompts/invalidate_edges.py b/core/prompts/invalidate_edges.py index 23dd967..51e103c 100644 --- a/core/prompts/invalidate_edges.py +++ b/core/prompts/invalidate_edges.py @@ -1,3 +1,19 @@ +""" +Copyright 2024, Zep Software, Inc. + +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. +""" + from typing import Any, Protocol, TypedDict from .models import Message, PromptFunction, PromptVersion diff --git a/core/prompts/lib.py b/core/prompts/lib.py index 69e73bc..e329d83 100644 --- a/core/prompts/lib.py +++ b/core/prompts/lib.py @@ -1,3 +1,19 @@ +""" +Copyright 2024, Zep Software, Inc. + +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. +""" + from typing import Any, Protocol, TypedDict from .dedupe_edges import ( diff --git a/core/prompts/models.py b/core/prompts/models.py index b1dc041..f905a4a 100644 --- a/core/prompts/models.py +++ b/core/prompts/models.py @@ -1,3 +1,19 @@ +""" +Copyright 2024, Zep Software, Inc. + +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. +""" + from typing import Any, Callable, Protocol from pydantic import BaseModel diff --git a/core/search/search.py b/core/search/search.py index c897fe3..7716546 100644 --- a/core/search/search.py +++ b/core/search/search.py @@ -1,3 +1,19 @@ +""" +Copyright 2024, Zep Software, Inc. + +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 logging from datetime import datetime from time import time diff --git a/core/utils/bulk_utils.py b/core/utils/bulk_utils.py index 9b2202f..6aa8cb3 100644 --- a/core/utils/bulk_utils.py +++ b/core/utils/bulk_utils.py @@ -1,3 +1,19 @@ +""" +Copyright 2024, Zep Software, Inc. + +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 asyncio import typing from datetime import datetime diff --git a/core/utils/maintenance/edge_operations.py b/core/utils/maintenance/edge_operations.py index ec436ab..d7a165a 100644 --- a/core/utils/maintenance/edge_operations.py +++ b/core/utils/maintenance/edge_operations.py @@ -1,3 +1,19 @@ +""" +Copyright 2024, Zep Software, Inc. + +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 logging from datetime import datetime from time import time diff --git a/core/utils/maintenance/graph_data_operations.py b/core/utils/maintenance/graph_data_operations.py index 4849b23..ab99b72 100644 --- a/core/utils/maintenance/graph_data_operations.py +++ b/core/utils/maintenance/graph_data_operations.py @@ -1,3 +1,19 @@ +""" +Copyright 2024, Zep Software, Inc. + +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 asyncio import logging from datetime import datetime, timezone diff --git a/core/utils/maintenance/node_operations.py b/core/utils/maintenance/node_operations.py index e13a5a1..162ab8e 100644 --- a/core/utils/maintenance/node_operations.py +++ b/core/utils/maintenance/node_operations.py @@ -1,3 +1,19 @@ +""" +Copyright 2024, Zep Software, Inc. + +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 logging from datetime import datetime from time import time diff --git a/core/utils/maintenance/temporal_operations.py b/core/utils/maintenance/temporal_operations.py index a13002b..832ad9c 100644 --- a/core/utils/maintenance/temporal_operations.py +++ b/core/utils/maintenance/temporal_operations.py @@ -1,3 +1,19 @@ +""" +Copyright 2024, Zep Software, Inc. + +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 logging from datetime import datetime from typing import List diff --git a/core/utils/utils.py b/core/utils/utils.py index 62a4ea9..08188b2 100644 --- a/core/utils/utils.py +++ b/core/utils/utils.py @@ -1,3 +1,19 @@ +""" +Copyright 2024, Zep Software, Inc. + +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 logging from core.edges import EpisodicEdge diff --git a/ellipsis.yaml b/ellipsis.yaml new file mode 100644 index 0000000..a3a638b --- /dev/null +++ b/ellipsis.yaml @@ -0,0 +1,20 @@ +# See https://docs.ellipsis.dev for all available configurations. + +version: 1.3 + +pr_address_comments: + delivery: "new_commit" +pr_review: + auto_review_enabled: true # enable auto-review of PRs + auto_summarize_pr: true # enable auto-summary of PRs + confidence_threshold: 0.8 # Threshold for how confident Ellipsis needs to be in order to leave a comment, in range [0.0-1.0] + rules: # customize behavior + - "Ensure the copyright notice is present as the header of all Python files" + - "Ensure code is idiomatic" + - "Code should be DRY (Don't Repeat Yourself)" + - "Extremely Complicated Code Needs Comments" + - "Use Descriptive Variable and Constant Names" + - "Follow the Single Responsibility Principle" + - "Function and Method Naming Should Follow Consistent Patterns" + - "There should no secrets or credentials in the code" + - "Don't log sensitive data" \ No newline at end of file diff --git a/examples/podcast/podcast_runner.py b/examples/podcast/podcast_runner.py index 08ec32b..3c09508 100644 --- a/examples/podcast/podcast_runner.py +++ b/examples/podcast/podcast_runner.py @@ -1,3 +1,19 @@ +""" +Copyright 2024, Zep Software, Inc. + +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 asyncio import logging import os