src/base_template/pyproject.toml (107 lines of code) (raw):
[project]
name = "{{cookiecutter.project_name}}"
version = "0.1.0"
description = ""
authors = [
{name = "Your Name", email = "your@email.com"},
]
dependencies = [
{%- for dep in cookiecutter.extra_dependencies %}
"{{ dep }}",
{%- endfor %}
"opentelemetry-exporter-gcp-trace~=1.9.0",
{%- if "adk" not in cookiecutter.tags %}
"langchain-core~=0.3.9",
"traceloop-sdk~=0.38.7",
{%- endif %}
"google-cloud-logging~=3.11.4",
{%- if cookiecutter.deployment_target == 'cloud_run' %}
"google-cloud-aiplatform[evaluation]~=1.88.0",
"fastapi~=0.115.8",
"uvicorn~=0.34.0"
{%- elif cookiecutter.deployment_target == 'agent_engine' %}
"google-cloud-aiplatform[evaluation,agent-engines]~=1.90.0"
{%- endif %}
]
{% if cookiecutter.deployment_target == 'cloud_run' %}
requires-python = ">=3.10,<3.14"
{% elif cookiecutter.deployment_target == 'agent_engine' %}
requires-python = ">=3.10,<3.13"
{%- endif %}
[dependency-groups]
dev = [
"pytest>=8.3.4",
"pytest-asyncio>=0.23.8",
"nest-asyncio>=1.6.0",
]
[project.optional-dependencies]
{% if cookiecutter.agent_name != 'live_api' and "adk" not in cookiecutter.tags %}
streamlit = [
"streamlit~=1.42.0",
"streamlit-extras~=0.4.3",
"extra-streamlit-components~=0.1.71",
"streamlit-feedback~=0.1.3",
]
{% endif %}
jupyter = [
"jupyter~=1.0.0",
]
lint = [
"ruff>=0.4.6",
"mypy~=1.15.0",
"codespell~=2.2.0",
"types-pyyaml~=6.0.12.20240917",
"types-requests~=2.32.0.20240914",
]
[tool.ruff]
line-length = 88
target-version = "py310"
[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # pyflakes
"W", # pycodestyle warnings
"I", # isort
"C", # flake8-comprehensions
"B", # flake8-bugbear
"UP", # pyupgrade
"RUF", # ruff specific rules
]
ignore = ["E501", "C901"] # ignore line too long, too complex
[tool.ruff.lint.isort]
known-first-party = ["app", "frontend"]
[tool.mypy]
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
no_implicit_optional = true
check_untyped_defs = true
disallow_subclassing_any = true
warn_incomplete_stub = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_unreachable = true
follow_imports = "silent"
ignore_missing_imports = true
explicit_package_bases = true
disable_error_code = ["misc", "no-untyped-call", "no-any-return"]
{% if cookiecutter.agent_name == 'live_api' %}
exclude = [".venv","./frontend"]
{% else %}
exclude = [".venv"]
{%- endif %}
[tool.codespell]
ignore-words-list = "rouge"
{% if cookiecutter.agent_name == 'live_api' %}
skip = "./locust_env/*,uv.lock,.venv,./frontend,**/*.ipynb"
{% else %}
skip = "./locust_env/*,uv.lock,.venv,**/*.ipynb"
{%- endif %}
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.pytest.ini_options]
pythonpath = "."
asyncio_default_fixture_loop_scope = "function"
[tool.hatch.build.targets.wheel]
packages = ["app","frontend"]