Skip to content

Commit

Permalink
Missing packages and removing unused variables from env.sample (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
FilipaSdS authored Sep 27, 2024
1 parent 95fe1d1 commit 67eda27
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 39 deletions.
20 changes: 6 additions & 14 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
21 changes: 0 additions & 21 deletions tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from labs.github.github import GithubRequests
from labs.api.types import (
CallLLMRequest,
CodeMonkeyRequest,
CommitChangesRequest,
CreateBranchRequest,
CreatePullRequest,
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 67eda27

Please sign in to comment.