awslabs.git-repo-research-mcp-server 1.0.1__tar.gz → 1.0.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {awslabs_git_repo_research_mcp_server-1.0.1 → awslabs_git_repo_research_mcp_server-1.0.3}/PKG-INFO +1 -1
- awslabs_git_repo_research_mcp_server-1.0.3/awslabs/__init__.py +15 -0
- awslabs_git_repo_research_mcp_server-1.0.3/awslabs/git_repo_research_mcp_server/__init__.py +16 -0
- {awslabs_git_repo_research_mcp_server-1.0.1 → awslabs_git_repo_research_mcp_server-1.0.3}/awslabs/git_repo_research_mcp_server/defaults.py +9 -6
- {awslabs_git_repo_research_mcp_server-1.0.1 → awslabs_git_repo_research_mcp_server-1.0.3}/awslabs/git_repo_research_mcp_server/embeddings.py +9 -6
- {awslabs_git_repo_research_mcp_server-1.0.1 → awslabs_git_repo_research_mcp_server-1.0.3}/awslabs/git_repo_research_mcp_server/github_search.py +9 -6
- {awslabs_git_repo_research_mcp_server-1.0.1 → awslabs_git_repo_research_mcp_server-1.0.3}/awslabs/git_repo_research_mcp_server/indexer.py +9 -6
- {awslabs_git_repo_research_mcp_server-1.0.1 → awslabs_git_repo_research_mcp_server-1.0.3}/awslabs/git_repo_research_mcp_server/models.py +9 -6
- {awslabs_git_repo_research_mcp_server-1.0.1 → awslabs_git_repo_research_mcp_server-1.0.3}/awslabs/git_repo_research_mcp_server/repository.py +9 -6
- {awslabs_git_repo_research_mcp_server-1.0.1 → awslabs_git_repo_research_mcp_server-1.0.3}/awslabs/git_repo_research_mcp_server/search.py +10 -7
- {awslabs_git_repo_research_mcp_server-1.0.1 → awslabs_git_repo_research_mcp_server-1.0.3}/awslabs/git_repo_research_mcp_server/server.py +9 -6
- {awslabs_git_repo_research_mcp_server-1.0.1 → awslabs_git_repo_research_mcp_server-1.0.3}/awslabs/git_repo_research_mcp_server/utils.py +9 -6
- {awslabs_git_repo_research_mcp_server-1.0.1 → awslabs_git_repo_research_mcp_server-1.0.3}/pyproject.toml +1 -1
- {awslabs_git_repo_research_mcp_server-1.0.1 → awslabs_git_repo_research_mcp_server-1.0.3}/run_tests.sh +14 -0
- awslabs_git_repo_research_mcp_server-1.0.3/tests/__init__.py +14 -0
- {awslabs_git_repo_research_mcp_server-1.0.1 → awslabs_git_repo_research_mcp_server-1.0.3}/tests/conftest.py +9 -6
- {awslabs_git_repo_research_mcp_server-1.0.1 → awslabs_git_repo_research_mcp_server-1.0.3}/tests/test_errors_repository.py +9 -6
- {awslabs_git_repo_research_mcp_server-1.0.1 → awslabs_git_repo_research_mcp_server-1.0.3}/tests/test_github_search_edge_cases.py +9 -6
- {awslabs_git_repo_research_mcp_server-1.0.1 → awslabs_git_repo_research_mcp_server-1.0.3}/tests/test_graphql_github_search.py +9 -6
- {awslabs_git_repo_research_mcp_server-1.0.1 → awslabs_git_repo_research_mcp_server-1.0.3}/tests/test_local_repository.py +9 -6
- {awslabs_git_repo_research_mcp_server-1.0.1 → awslabs_git_repo_research_mcp_server-1.0.3}/tests/test_repository_utils.py +9 -6
- {awslabs_git_repo_research_mcp_server-1.0.1 → awslabs_git_repo_research_mcp_server-1.0.3}/tests/test_rest_github_search.py +9 -6
- {awslabs_git_repo_research_mcp_server-1.0.1 → awslabs_git_repo_research_mcp_server-1.0.3}/tests/test_search.py +12 -9
- {awslabs_git_repo_research_mcp_server-1.0.1 → awslabs_git_repo_research_mcp_server-1.0.3}/tests/test_server.py +9 -6
- {awslabs_git_repo_research_mcp_server-1.0.1 → awslabs_git_repo_research_mcp_server-1.0.3}/tests/test_url_repository.py +9 -6
- awslabs_git_repo_research_mcp_server-1.0.1/awslabs/__init__.py +0 -12
- awslabs_git_repo_research_mcp_server-1.0.1/awslabs/git_repo_research_mcp_server/__init__.py +0 -13
- awslabs_git_repo_research_mcp_server-1.0.1/tests/__init__.py +0 -11
- {awslabs_git_repo_research_mcp_server-1.0.1 → awslabs_git_repo_research_mcp_server-1.0.3}/.gitignore +0 -0
- {awslabs_git_repo_research_mcp_server-1.0.1 → awslabs_git_repo_research_mcp_server-1.0.3}/.pre-commit-config.yaml +0 -0
- {awslabs_git_repo_research_mcp_server-1.0.1 → awslabs_git_repo_research_mcp_server-1.0.3}/.python-version +0 -0
- {awslabs_git_repo_research_mcp_server-1.0.1 → awslabs_git_repo_research_mcp_server-1.0.3}/CHANGELOG.md +0 -0
- {awslabs_git_repo_research_mcp_server-1.0.1 → awslabs_git_repo_research_mcp_server-1.0.3}/LICENSE +0 -0
- {awslabs_git_repo_research_mcp_server-1.0.1 → awslabs_git_repo_research_mcp_server-1.0.3}/NOTICE +0 -0
- {awslabs_git_repo_research_mcp_server-1.0.1 → awslabs_git_repo_research_mcp_server-1.0.3}/README.md +0 -0
- {awslabs_git_repo_research_mcp_server-1.0.1 → awslabs_git_repo_research_mcp_server-1.0.3}/uv.lock +0 -0
{awslabs_git_repo_research_mcp_server-1.0.1 → awslabs_git_repo_research_mcp_server-1.0.3}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: awslabs.git-repo-research-mcp-server
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.3
|
|
4
4
|
Summary: An AWS Labs Model Context Protocol (MCP) server for researching git repositories
|
|
5
5
|
Project-URL: Homepage, https://awslabs.github.io/mcp/
|
|
6
6
|
Project-URL: Documentation, https://awslabs.github.io/mcp/servers/git-repo-research-mcp-server/
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
# This file is part of the awslabs namespace.
|
|
15
|
+
# It is intentionally minimal to support PEP 420 namespace packages.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
"""awslabs.git-repo-research-mcp-server"""
|
|
15
|
+
|
|
16
|
+
__version__ = '0.0.0'
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
"""Default constants for Git Repository Research MCP Server."""
|
|
12
15
|
|
|
13
16
|
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
"""Embeddings generation for Git Repository Research MCP Server.
|
|
12
15
|
|
|
13
16
|
This module provides functionality for generating embeddings from text
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
"""GitHub repository search functionality for Git Repository Research MCP Server.
|
|
12
15
|
|
|
13
16
|
This module provides functionality for searching GitHub repositories using the GitHub GraphQL API.
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
"""FAISS indexing for Git Repository Research MCP Server using LangChain.
|
|
12
15
|
|
|
13
16
|
This module provides functionality for creating and managing FAISS indices
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
"""Data models for Git Repository Research MCP Server."""
|
|
12
15
|
|
|
13
16
|
from datetime import datetime
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
"""Repository handling for Git Repository Research MCP Server.
|
|
12
15
|
|
|
13
16
|
This module provides functionality for cloning, accessing, and processing
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
"""Search functionality for Git Repository Research MCP Server.
|
|
12
15
|
|
|
13
16
|
This module provides functionality for searching within indexed Git repositories
|
|
@@ -210,7 +213,7 @@ class RepositorySearcher:
|
|
|
210
213
|
index_path = self.repository_indexer._get_index_path(repository_name)
|
|
211
214
|
|
|
212
215
|
# Load the index and chunk map
|
|
213
|
-
vector_store = self.repository_indexer.load_index_without_pickle(
|
|
216
|
+
vector_store = self.repository_indexer.load_index_without_pickle(index_path)
|
|
214
217
|
if vector_store is None:
|
|
215
218
|
logger.error(f'Index or chunk map not found for repository {repository_name}')
|
|
216
219
|
# Set repository_directory even if index is not found
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
"""awslabs git-repo-research MCP Server implementation."""
|
|
12
15
|
|
|
13
16
|
import json
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
"""Utility functions for Git Repository Research MCP Server.
|
|
12
15
|
|
|
13
16
|
This module provides utility functions for the Git Repository Research MCP Server.
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
2
|
|
|
3
|
+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
# you may not use this file except in compliance with the License.
|
|
7
|
+
# You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
# See the License for the specific language governing permissions and
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
|
|
3
17
|
# Exit on error
|
|
4
18
|
set -e
|
|
5
19
|
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
"""Tests for the Git Repository Research MCP Server."""
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
"""Configuration for pytest."""
|
|
12
15
|
|
|
13
16
|
import pytest
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
"""Tests for Git Repository Research MCP Server with a local repository."""
|
|
12
15
|
|
|
13
16
|
import pytest
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
"""Tests for GitHub search functionality edge cases and error handling."""
|
|
12
15
|
|
|
13
16
|
import pytest
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
"""Tests for GitHub GraphQL search functionality."""
|
|
12
15
|
|
|
13
16
|
import pytest
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
"""Tests for Git Repository Research MCP Server with a local repository."""
|
|
12
15
|
|
|
13
16
|
import json
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
"""Tests for Git Repository Research MCP Server utility functions."""
|
|
12
15
|
|
|
13
16
|
import json
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
"""Live test for the GitHub repository search functionality in the Git Repository Research MCP Server."""
|
|
12
15
|
|
|
13
16
|
import asyncio
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
"""Tests for the search functionality in Git Repository Research MCP Server."""
|
|
12
15
|
|
|
13
16
|
import pytest
|
|
@@ -330,7 +333,7 @@ def test_search_with_repository_name():
|
|
|
330
333
|
|
|
331
334
|
# Verify the mock calls
|
|
332
335
|
mock_indexer._get_index_path.assert_called_once_with('test_repo')
|
|
333
|
-
mock_indexer.load_index_without_pickle.assert_called_once_with('test_repo')
|
|
336
|
+
mock_indexer.load_index_without_pickle.assert_called_once_with('/tmp/index/test_repo')
|
|
334
337
|
mock_vector_store.similarity_search.assert_called_once_with('test query', k=10)
|
|
335
338
|
|
|
336
339
|
|
|
@@ -387,7 +390,7 @@ def test_search_with_directory_path():
|
|
|
387
390
|
assert result.results[0].score == 1.0
|
|
388
391
|
|
|
389
392
|
# Verify the mock calls
|
|
390
|
-
mock_indexer.load_index_without_pickle.assert_called_once_with('test_repo')
|
|
393
|
+
mock_indexer.load_index_without_pickle.assert_called_once_with('/tmp/index/test_repo')
|
|
391
394
|
|
|
392
395
|
|
|
393
396
|
def test_search_with_similarity_search_with_score_fallback():
|
|
@@ -446,7 +449,7 @@ def test_search_with_similarity_search_with_score_fallback():
|
|
|
446
449
|
|
|
447
450
|
# Verify the mock calls
|
|
448
451
|
mock_indexer._get_index_path.assert_called_once_with('test_repo')
|
|
449
|
-
mock_indexer.load_index_without_pickle.assert_called_once_with('test_repo')
|
|
452
|
+
mock_indexer.load_index_without_pickle.assert_called_once_with('/tmp/index/test_repo')
|
|
450
453
|
mock_vector_store.similarity_search.assert_called_once_with('test query', k=10)
|
|
451
454
|
mock_vector_store.similarity_search_with_score.assert_called_once_with('test query', k=10)
|
|
452
455
|
mock_logger_error.assert_called_once()
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
"""Comprehensive tests for Git Repository Research MCP Server."""
|
|
12
15
|
|
|
13
16
|
import json
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
"""Tests for Git Repository Research MCP Server with a remote repository."""
|
|
12
15
|
|
|
13
16
|
import json
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
|
|
4
|
-
# with the License. A copy of the License is located at
|
|
5
|
-
#
|
|
6
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
#
|
|
8
|
-
# or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
|
|
9
|
-
# OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
|
|
10
|
-
# and limitations under the License.
|
|
11
|
-
# This file is part of the awslabs namespace.
|
|
12
|
-
# It is intentionally minimal to support PEP 420 namespace packages.
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
|
|
4
|
-
# with the License. A copy of the License is located at
|
|
5
|
-
#
|
|
6
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
#
|
|
8
|
-
# or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
|
|
9
|
-
# OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
|
|
10
|
-
# and limitations under the License.
|
|
11
|
-
"""awslabs.git-repo-research-mcp-server"""
|
|
12
|
-
|
|
13
|
-
__version__ = '0.0.0'
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
|
|
4
|
-
# with the License. A copy of the License is located at
|
|
5
|
-
#
|
|
6
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
-
#
|
|
8
|
-
# or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
|
|
9
|
-
# OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
|
|
10
|
-
# and limitations under the License.
|
|
11
|
-
"""Tests for the Git Repository Research MCP Server."""
|
{awslabs_git_repo_research_mcp_server-1.0.1 → awslabs_git_repo_research_mcp_server-1.0.3}/.gitignore
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{awslabs_git_repo_research_mcp_server-1.0.1 → awslabs_git_repo_research_mcp_server-1.0.3}/LICENSE
RENAMED
|
File without changes
|
{awslabs_git_repo_research_mcp_server-1.0.1 → awslabs_git_repo_research_mcp_server-1.0.3}/NOTICE
RENAMED
|
File without changes
|
{awslabs_git_repo_research_mcp_server-1.0.1 → awslabs_git_repo_research_mcp_server-1.0.3}/README.md
RENAMED
|
File without changes
|
{awslabs_git_repo_research_mcp_server-1.0.1 → awslabs_git_repo_research_mcp_server-1.0.3}/uv.lock
RENAMED
|
File without changes
|