From 67eda27bc4b161d32c2706e2a24664d5748e9bfd Mon Sep 17 00:00:00 2001 From: FilipaSdS <101112271+FilipaSdS@users.noreply.github.com> Date: Fri, 27 Sep 2024 15:10:29 +0100 Subject: [PATCH] Missing packages and removing unused variables from env.sample (#106) --- .env.sample | 20 ++++++-------------- Makefile | 2 +- poetry.lock | 6 +++--- pyproject.toml | 2 ++ tests/test_api.py | 21 --------------------- 5 files changed, 12 insertions(+), 39 deletions(-) diff --git a/.env.sample b/.env.sample index c14f50f..9abde3a 100644 --- a/.env.sample +++ b/.env.sample @@ -9,17 +9,9 @@ COHERE_API_KEY="set" GROQ_API_KEY="set" DATABASE_HOST_IN_DOCKER="db" -DATABASE_HOST="localhost" -DATABASE_USER="testuser" -DATABASE_PASS="testpwd" -DATABASE_NAME="vectordb" -DATABASE_PORT="63045" -DATABASE_URL="postgresql://postgres:postgres@postgres:5432/postgres" - -DATABASE_TEST_HOST_IN_DOCKER="db_test" -DATABASE_TEST_HOST="localhost" -DATABASE_TEST_USER="testuser_test" -DATABASE_TEST_PASS="testpwd_test" -DATABASE_TEST_NAME="vectordb_test" -DATABASE_TEST_PORT="63046" -DATABASE_TEST_URL="postgresql://postgres_test:postgres_test@postgres_test:5432/postgres_test" +DATABASE_HOST=localhost +DATABASE_USER=testuser +DATABASE_PASS=testpwd +DATABASE_NAME=vectordb +DATABASE_PORT=63045 +DATABASE_URL=postgresql://postgres:postgres@postgres:5432/postgres diff --git a/Makefile b/Makefile index 0e7aa62..2cf0d15 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ PROJECT_NAME = labs PYTHON_VERSION = 3.11 PYTHON_INTERPRETER = python ENV ?= local -ENV_FILE = ./.env.$(ENV) +ENV_FILE := .env.$(ENV) include $(ENV_FILE) export diff --git a/poetry.lock b/poetry.lock index be4d5c2..0cb2891 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.5.0 and should not be changed by hand. [[package]] name = "aiohappyeyeballs" @@ -4023,7 +4023,7 @@ files = [ ] [package.dependencies] -greenlet = {version = "!=0.4.17", markers = "python_version < \"3.13\" and (platform_machine == \"aarch64\" or platform_machine == \"ppc64le\" or platform_machine == \"x86_64\" or platform_machine == \"amd64\" or platform_machine == \"AMD64\" or platform_machine == \"win32\" or platform_machine == \"WIN32\")"} +greenlet = {version = "!=0.4.17", markers = "python_version < \"3.13\" and (platform_machine == \"win32\" or platform_machine == \"WIN32\" or platform_machine == \"AMD64\" or platform_machine == \"amd64\" or platform_machine == \"x86_64\" or platform_machine == \"ppc64le\" or platform_machine == \"aarch64\")"} typing-extensions = ">=4.6.0" [package.extras] @@ -5086,4 +5086,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.0" python-versions = "^3.11.7" -content-hash = "2c03a4d25302e5e2768c0cb6cc456a64209faef8fc3291382683652abc2f5dc0" +content-hash = "61965d57297b0522f6569d109592762a082b6919e90d0f9559181647c1229c43" diff --git a/pyproject.toml b/pyproject.toml index 321cea9..f10a33f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,7 +26,9 @@ pandas = "^2.2.2" langdetect = "^1.0.9" psycopg2-binary = "^2.9.9" psycopg = {extras = ["binary"], version = "^3.2.2"} +pydantic = "^2.9.2" sqlalchemy = "^2.0.35" +langchain = "^0.3.0" langchain-community = "^0.3.0" [tool.poetry.group.dev.dependencies] diff --git a/tests/test_api.py b/tests/test_api.py index 6f5d0db..fe24d88 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -2,7 +2,6 @@ from labs.github.github import GithubRequests from labs.api.types import ( CallLLMRequest, - CodeMonkeyRequest, CommitChangesRequest, CreateBranchRequest, CreatePullRequest, @@ -33,26 +32,6 @@ def test_successfull_call_llm_with_context(self, mocked_call): assert response.status_code == 200 assert response.json() == ["file1.py", "file2.py"] - @patch("labs.api.codemonkey_endpoints.run") - def test_successfull_call_run(self, mocked_call): - client = TestClient(app) - request = CodeMonkeyRequest( - github_token="valid_token", - repo_owner="owner", - repo_name="repo", - litellm_api_key="token", - issue_number=1, - ) - - mocked_call.return_value = None - - response = client.post( - "/codemonkey/run", - json=request.__dict__, - ) - - assert response.status_code == 200 - @patch.object(GithubRequests, "list_issues") def test_successfull_list_issues(self, mocked_list): client = TestClient(app)