-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
134 lines (125 loc) · 4.17 KB
/
pyproject.toml
File metadata and controls
134 lines (125 loc) · 4.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
[project]
name = "prompttrail"
version = "0.2.1"
description = "A lightweight library for Prompt Programming: Agent as Code"
authors = [
{ name = "hmirin", email = "hmirin@example.com" }
]
dependencies = [
"openai>=1.14.2",
"pydantic>=2.6.4",
"google-generativeai>=0.4.1",
"tiktoken>=0.6.0",
"click>=8.1.7",
"types-cachetools>=5.3.0.7",
"typing_inspect>=0.9.0",
"anthropic>=0.21.0",
"typing-inspect>=0.9.0",
"jinja2>=3.1.2",
"transformers>=4.44.2",
"fastapi>=0.115.8",
"uvicorn>=0.34.0",
]
readme = "README.md"
requires-python = ">= 3.11"
license = "MIT"
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.11",
]
[project.urls]
Documentation = "https://prompttrail.readthedocs.io"
Repository = "https://github.com/combinatrix-ai/PromptTrail"
[build-system]
# Workaround for https://github.com/astral-sh/rye/issues/1446
requires = ["hatchling==1.26.3", "hatch-vcs"]
build-backend = "hatchling.build"
[tool.rye]
managed = true
dev-dependencies = [
"mypy>=1.4.1",
"black>=23.7.0",
"isort>=5.12.0",
"autoflake>=2.2.0",
"pyproject-autoflake>=1.0.2",
"ipython>=8.14.0",
"sphinx>=7.1.1",
"pylint>=2.17.5",
"flake8>=6.1.0",
"coverage>=7.2.7",
"pytest>=7.4.0",
"pytest-cov>=4.1.0",
"pydoc-markdown>=4.8.2",
"mkdocs>=1.5.2",
"setuptools>=68.1.2",
"types-tqdm>=4.66.0.1",
"mkdocstrings>=0.22.0",
"docconvert>=2.1.0",
"pyment>=0.3.3",
"myst_parser>=2.0.0",
"autodoc-pydantic>=2.0.1",
"sphinx_rtd_theme>=1.3.0",
"ipykernel>=6.25.1",
"torch>=2.5.1",
"accelerate>=1.2.1",
"tqdm>=4.67.1",
"requests>=2.32.3",
"httpx>=0.28.1",
"pytest-asyncio>=0.25.3",
]
[tool.rye.scripts]
all = { chain = ["format", "lint", "test", "doc"] }
format = { chain = ["format:black", "format:autoflake", "format:isort"] }
format-check = { chain = ["format:black-check", "format:autoflake-check", "format:isort-check"] }
"format:black" = "black src tests examples"
"format:autoflake" = "pautoflake src tests examples"
"format:isort" = "isort src tests examples"
"format:black-check" = "black --check src tests examples"
"format:autoflake-check" = "pautoflake --check src tests examples"
"format:isort-check" = "isort --check src tests examples"
lint = { chain = ["lint:flake8", "lint:mypy"] }
"lint:mypy" = "mypy src tests examples"
"lint:flake8" = "flake8 --ignore=E121,E123,E126,E226,E24,E704,E203,W503,W504,E501,F401,F403 src tests examples"
test = "pytest --log-cli-level=DEBUG --cov=src --cov-report=xml tests examples"
doc = { chain = ["doc:prep", "doc:rm", "doc:build"] }
"doc:prep" = "sphinx-apidoc --implicit-namespaces -f -o docs/source src/prompttrail"
"doc:rm" = "rm -rf docs/build docs/source/modules.rst"
"doc:build" = "sphinx-build -b html docs/source docs/build"
pyreverse = "pyreverse src.prompttrail -o png"
"dogfooding:fix_markdown" = "python examples/dogfooding/fix_markdown.py"
"dogfooding:commit" = "python examples/dogfooding/commit_with_auto_generated_comment.py"
"see-all" = "python examples/dogfooding/utils/load_all_important_files.py"
chat = "python examples/dogfooding/chat.py"
agent = "python examples/dogfooding/coding_agent.py"
commit = { chain = ["format-check", "all", "dogfooding:commit"] }
commit-skip-test = { chain = ["dogfooding:commit"] }
[tool.hatch.metadata]
allow-direct-references = true
[tool.black]
target-version = ['py311']
[tool.isort]
profile = "black"
[tool.autoflake]
# run with pautoflake
in-place = true
recursive = true
exclude = ".venv,.git,__pycache__,.mypy_cache,.pytest_cache"
# expand wildcard star imports with undefined names; this only triggers if there is only one star import in
# the file; this is skipped if there are any uses of `__all__` or `del` in the file
expand-star-imports = true
# remove all unused imports (not just those from the standard library)
remove-all-unused-imports = true
# exclude __init__.py when removing unused imports
ignore-init-module-imports = true
remove-duplicate-keys = true
remove-unused-variables = true
[tool.pytest.ini_options]
pythonpath = [
"."
]
testpaths = [
"tests",
"examples"
]