From 75143262790dcd97751a978713a67ee495c87e8b Mon Sep 17 00:00:00 2001 From: zhukang Date: Tue, 14 Jan 2025 20:54:19 +0800 Subject: [PATCH] refactor: improve package structure - Update import paths to use full package name - Add package __init__.py - Update pyproject.toml with correct dependencies and tools - Configure pytest, black, and isort --- __init__.py | 6 +++++ pyproject.toml | 45 ++++++++++++++++++++----------- tasksamples/text_analysis_task.py | 2 +- 3 files changed, 37 insertions(+), 16 deletions(-) create mode 100644 __init__.py diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..6b78212 --- /dev/null +++ b/__init__.py @@ -0,0 +1,6 @@ +"""Agent Task Executor + +A flexible task execution framework that uses LLMs (Large Language Models). +""" + +__version__ = "0.1.0" diff --git a/pyproject.toml b/pyproject.toml index 994cb62..6f76319 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,27 +1,42 @@ [project] -name = "agent-task-executor" +name = "agent_task_executor" version = "0.1.0" -description = "An LLM-based agent task execution framework" +description = "A flexible task execution framework that uses LLMs" authors = [ - {name = "Your Name", email = "your.email@example.com"}, + { name = "Your Name", email = "your.email@example.com" } ] dependencies = [ - "python-dateutil>=2.8.2", - "typing-extensions>=4.4.0", - "openai>=1.0.0", + "httpx>=0.24.1", + "tenacity>=8.2.2", + "pyyaml>=6.0.1", + "cryptography>=41.0.3", "python-dotenv>=1.0.0", - "tenacity>=8.2.0", - "httpx>=0.24.0", +] +requires-python = ">=3.8" + +[project.optional-dependencies] +dev = [ + "pytest>=7.4.0", + "black>=23.7.0", + "isort>=5.12.0", + "mypy>=1.4.1", ] [build-system] requires = ["hatchling"] build-backend = "hatchling.build" -[tool.rye] -managed = true -dev-dependencies = [ - "pytest>=7.3.1", - "black>=23.7.0", - "isort>=5.12.0", -] +[tool.pytest.ini_options] +testpaths = ["tests"] +python_files = ["test_*.py"] +addopts = "-v" + +[tool.black] +line-length = 100 +target-version = ["py38"] +include = '\.pyi?$' + +[tool.isort] +profile = "black" +line_length = 100 +multi_line_output = 3 diff --git a/tasksamples/text_analysis_task.py b/tasksamples/text_analysis_task.py index 93a7b17..f1a406f 100644 --- a/tasksamples/text_analysis_task.py +++ b/tasksamples/text_analysis_task.py @@ -1,4 +1,4 @@ -from task_executor import TaskExecutor, TaskStatus +from agent_task_executor.task_executor import TaskExecutor, TaskStatus from typing import Dict, Any import time import json