Skip to content

fix: install api client from git repo #1046

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Apr 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,10 @@ dependencies = [
"datasets",
"colorlog>=6.9.0",
"codegen-sdk-pink>=0.1.0",
"dateutil",
"codegen-api-client",
]

# renovate: datasource=python-version depName=python
license = { text = "Apache-2.0" }
classifiers = [
"Development Status :: 4 - Beta",
Expand Down Expand Up @@ -161,11 +162,15 @@ dev-dependencies = [
"modal>=0.73.25",
"pytest-lsp>=1.0.0b1",
"cython>=3.0.11",
"codegen-api-client",
]

[tool.uv.workspace]
exclude = ["codegen-examples"]

[tool.uv.sources]
codegen-api-client = { git = "https://github.com/codegen-sh/codegen-api-client" }


[tool.cython-lint]
max-line-length = 200
Expand Down
11 changes: 6 additions & 5 deletions src/codegen/agents/agent.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import os
from typing import Any, Optional

from codegen.agents.client.openapi_client.api.agents_api import AgentsApi
from codegen.agents.client.openapi_client.api_client import ApiClient
from codegen.agents.client.openapi_client.configuration import Configuration
from codegen.agents.client.openapi_client.models.agent_run_response import AgentRunResponse
from codegen.agents.client.openapi_client.models.create_agent_run_input import CreateAgentRunInput
from codegen_api_client.api.agents_api import AgentsApi
from codegen_api_client.api_client import ApiClient
from codegen_api_client.configuration import Configuration
from codegen_api_client.models.agent_run_response import AgentRunResponse
from codegen_api_client.models.create_agent_run_input import CreateAgentRunInput

from codegen.agents.constants import CODEGEN_BASE_API_URL


Expand Down Expand Up @@ -78,7 +79,7 @@
# Convert API response to dict for Job initialization

job = AgentTask(agent_run_response, self.api_client, self.org_id)
self.current_job = job

Check failure on line 82 in src/codegen/agents/agent.py

View workflow job for this annotation

GitHub Actions / mypy

error: Incompatible types in assignment (expression has type "AgentTask", variable has type "None") [assignment]
return job

def get_status(self) -> Optional[dict[str, Any]]:
Expand Down
62 changes: 0 additions & 62 deletions src/codegen/agents/client/.openapi-generator/FILES

This file was deleted.

1 change: 0 additions & 1 deletion src/codegen/agents/client/.openapi-generator/VERSION

This file was deleted.

22 changes: 0 additions & 22 deletions src/codegen/agents/client/README.md

This file was deleted.

44 changes: 0 additions & 44 deletions src/codegen/agents/client/openapi_client/__init__.py

This file was deleted.

6 changes: 0 additions & 6 deletions src/codegen/agents/client/openapi_client/api/__init__.py

This file was deleted.

Loading
Loading