-
Notifications
You must be signed in to change notification settings - Fork 969
/
Copy pathpyproject.toml
177 lines (158 loc) · 5.42 KB
/
pyproject.toml
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
[tool.poetry]
name = "promptflow-devkit"
version = "1.17.0.dev0"
description = "Prompt flow devkit"
include = [
"promptflow/_sdk/_service/static/*",
"promptflow/_sdk/_service/static/assets/*",
"promptflow/_cli/data/**/*",
"promptflow/_sdk/data/**/*",
]
license = "MIT"
authors = [
"Microsoft Corporation <[email protected]>"
]
repository = "https://github.com/microsoft/promptflow"
homepage = "https://microsoft.github.io/promptflow/"
readme = ["README.md"]
keywords = ["devkit"]
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
packages = [
{ include = "promptflow" }
]
[tool.poetry.urls]
"Bug Reports" = "https://github.com/microsoft/promptflow/issues"
[tool.poetry.dependencies]
python = ">=3.9,<3.9.7 || >3.9.7,<3.13"
promptflow-core = "<2.0.0"
httpx = ">=0.25.1" # used to send http requests asynchronously
sqlalchemy = ">=1.4.48,<3.0.0" # sqlite requirements
pandas = ">=1.5.3,<3.0.0" # load data requirements
python-dotenv = ">=1.0.0,<2.0.0" # control plane sdk requirements, to load .env file
keyring = ">=24.2.0,<25.0.0" # control plane sdk requirements, to access system keyring service
pydash = ">=6.0.0,<8.0.0" # control plane sdk requirements, to support parameter overrides in schema.
cryptography = ">=42.0.4" # control plane sdk requirements to support connection encryption
colorama = ">=0.4.6,<0.5.0" # producing colored terminal text for testing chat flow
tabulate = ">=0.9.0,<1.0.0" # control plane sdk requirements, to print table in console
filelock = ">=3.4.0,<4.0.0" # control plane sdk requirements, to lock for multiprocessing
marshmallow = ">=3.5,<4.0.0"
gitpython = ">=3.1.24,<4.0.0" # used git info to generate flow id
strictyaml = ">=1.5.0,<2.0.0" # used to identify exact location of validation error
waitress = ">=3.0.0,<4.0.0" # used to serve local service
azure-monitor-opentelemetry-exporter = ">=1.0.0b21,<2.0.0"
pyarrow = { version = ">=14.0.1,<15.0.0", optional = true } # used to read parquet file with pandas.read_parquet
pillow = ">=10.1.0,<11.1.0" # used to generate icon data URI for package tool
opentelemetry-exporter-otlp-proto-http = ">=1.22.0,<2.0.0" # trace support
flask-restx = ">=1.2.0,<2.0.0" # PFS Swagger
flask-cors = ">=5.0.0,<6.0.0" # handle PFS CORS
pyinstaller = { version = ">=5.13.2", optional = true} # used to package the CLI tool
streamlit = { version = ">=1.26.0", optional = true}
streamlit-quill = { version = "<0.1.0", optional = true}
bs4 = { version = "*", optional = true}
argcomplete = ">=3.2.3" # for generating shell autocompletions
pywin32 = {version = "*", markers = "sys_platform == 'win32'"} # Support PFS detach mode in windows
[tool.poetry.extras]
executable = [
"pyarrow",
"pyinstaller",
"streamlit",
"streamlit-quill",
"bs4",
]
pyarrow = [
"pyarrow",
]
[tool.poetry.group.dev.dependencies]
pre-commit = "*"
import-linter = "*"
promptflow-core = {path = "../promptflow-core", extras = ["azureml-serving"], develop = true}
promptflow-tracing = {path = "../promptflow-tracing", develop = true}
promptflow = {path = "../promptflow"}
promptflow-tools = {path = "../promptflow-tools"}
promptflow-recording = {path = "../promptflow-recording", develop = true}
promptflow-azure = {path = "../promptflow-azure", develop = true}
[tool.poetry.group.ci.dependencies]
import-linter = "*"
promptflow-core = {path = "../promptflow-core", extras = ["azureml-serving"]}
promptflow-tracing = {path = "../promptflow-tracing"}
promptflow = {path = "../promptflow"}
promptflow-tools = {path = "../promptflow-tools"}
promptflow-recording = {path = "../promptflow-recording"}
numpy = "<2.0.0" # avoid pandas incompatibility
tenacity = "<8.4.0" # tenacity has breaking in 8.4.0
[tool.poetry.group.test.dependencies]
pytest = "*"
pytest-cov = "*"
pytest-xdist = "*"
pytest-mock = "*"
pytest-asyncio = "*"
mock = "*"
ipykernel = ">=6.27.1"
papermill = ">=2.5.0"
keyrings-alt = "*"
bs4 = "*"
uvicorn = ">=0.27.0"
[build-system]
requires = ["poetry-core>=1.5.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.scripts]
pf = "promptflow._cli.pf:main"
[tool.pytest.ini_options]
markers = [
"unittest",
"e2etest",
"csharp"
]
# junit - analyse and publish test results (https://github.com/EnricoMi/publish-unit-test-result-action)
# durations - list the slowest test durations
addopts = """
--junit-xml=test-results.xml \
--dist loadfile \
--log-level=info \
--log-format="%(asctime)s %(levelname)s %(message)s" \
--log-date-format="[%Y-%m-%d %H:%M:%S]" \
--durations=5 \
-ra \
-vv
"""
testpaths = ["tests"]
[tool.coverage.run]
source = [
"*/promptflow/_cli/**",
"*/promptflow/_orchestrator/**",
"*/promptflow/_proxy/**",
"*/promptflow/_sdk/**",
"*/promptflow/batch/**",
]
omit = [
"*/__init__.py",
"*/promptflow/_sdk/_serving/*",
]
[tool.black]
line-length = 120
[tool.importlinter]
root_package = "promptflow"
include_external_packages = "True"
[[tool.importlinter.contracts]]
name = "Contract forbidden modules"
type = "forbidden"
source_modules = [
"promptflow._cli",
"promptflow._internal",
"promptflow._proxy",
"promptflow._sdk",
"promptflow.batch",
"promptflow.client",
"promptflow.entities",
"promptflow.operations"
]
forbidden_modules = ["promptflow.azure"]