Skip to content

Commit 7e3f46f

Browse files
committed
update pyproject.toml
1 parent 9d41492 commit 7e3f46f

File tree

1 file changed

+37
-8
lines changed

1 file changed

+37
-8
lines changed

integrations/watsonx/pyproject.toml

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,27 @@
11
[build-system]
2-
requires = ["hatchling"]
2+
requires = ["hatchling", "hatch-vcs"]
33
build-backend = "hatchling.build"
44

55
[project]
66
name = "watsonx-haystack"
7-
version = "0.1.0"
7+
version = "0.1.0"
88
description = "Watsonx integration for Haystack"
9+
readme = "README.md"
10+
requires-python = ">=3.9"
11+
license = "Apache-2.0"
912
authors = [{ name = "Divya", email = "[email protected]" }]
13+
classifiers = [
14+
"License :: OSI Approved :: Apache Software License",
15+
"Development Status :: 4 - Beta",
16+
"Programming Language :: Python",
17+
"Programming Language :: Python :: 3.9",
18+
"Programming Language :: Python :: 3.10",
19+
"Programming Language :: Python :: 3.11",
20+
"Programming Language :: Python :: 3.12",
21+
]
1022
dependencies = [
11-
"haystack-ai",
12-
"ibm-watsonx-ai"
23+
"haystack-ai>=2.0.0",
24+
"ibm-watsonx-ai>=0.0.5"
1325
]
1426

1527
[project.urls]
@@ -33,20 +45,30 @@ dependencies = [
3345

3446
[tool.hatch.envs.default.scripts]
3547
docs = ["pydoc-markdown pydoc/config.yml"]
36-
fmt = "ruff check --fix {args} && ruff format {args}"
37-
fmt-check = "ruff check {args} && ruff format --check {args}"
48+
fmt = "ruff check --fix {args:.} && ruff format {args:.}"
49+
fmt-check = "ruff check {args:.} && ruff format --check {args:.}"
3850
test = "pytest"
3951

4052
[tool.hatch.envs.test]
4153
dependencies = [
4254
"pytest",
4355
"pytest-asyncio",
56+
"pytest-cov",
57+
"pytest-rerunfailures",
58+
"mypy",
4459
"anyio",
4560
"haystack-ai",
4661
"ibm-watsonx-ai",
4762
"pytest-mock"
4863
]
4964

65+
[tool.hatch.envs.test.scripts]
66+
unit = 'pytest -m "not integration" {args:tests}'
67+
integration = 'pytest -m "integration" {args:tests}'
68+
all = 'pytest {args:tests}'
69+
cov-retry = 'all --cov=haystack_integrations --reruns 3 --reruns-delay 30 -x'
70+
types = "mypy -p haystack_integrations.components.generators.watsonx {args}"
71+
5072
[tool.hatch.envs.docs]
5173
dependencies = ["haystack-pydoc-tools"]
5274

@@ -61,6 +83,7 @@ packages = ["src/haystack_integrations"]
6183

6284
[tool.pytest.ini_options]
6385
markers = [
86+
"unit: unit tests",
6487
"asyncio: mark tests as using asyncio",
6588
"integration: mark tests as integration tests"
6689
]
@@ -73,12 +96,14 @@ line-length = 120
7396
skip-string-normalization = true
7497

7598
[tool.ruff]
76-
target-version = "py38"
99+
target-version = "py39"
77100
line-length = 120
78101

79102
[tool.ruff.lint]
80103
select = [
81-
"A", "ARG", "B", "C", "DTZ", "E", "F", "FA", "I", "TID", "UP", "RUF"
104+
"A", "ARG", "B", "C", "DTZ", "E", "EM", "F",
105+
"I", "ICN", "ISC", "N", "PLC", "PLE", "PLR",
106+
"PLW", "Q", "RUF", "S", "T", "TID", "UP", "W", "YTT"
82107
]
83108
ignore = [
84109
"A003", # Class attribute shadows builtin
@@ -106,8 +131,12 @@ ignore = [
106131
"TRY003", # Avoid long messages outside exception class
107132
"TRY401", # Redundant exception object in logging.exception call
108133
"UP007", # Use X | Y for type union
134+
"Q000",
109135
]
110136

137+
[tool.ruff.lint.isort]
138+
known-first-party = ["haystack_integrations"]
139+
111140
[tool.ruff.lint.per-file-ignores]
112141
"examples/**" = ["T201", "RET505", "INP001"]
113142
"watsonx/tests/**" = ["ALL"]

0 commit comments

Comments
 (0)