1
1
[build-system ]
2
- requires = [" hatchling" ]
2
+ requires = [" hatchling" , " hatch-vcs " ]
3
3
build-backend = " hatchling.build"
4
4
5
5
[project ]
6
6
name = " watsonx-haystack"
7
- version = " 0.1.0"
7
+ version = " 0.1.0"
8
8
description = " Watsonx integration for Haystack"
9
+ readme = " README.md"
10
+ requires-python = " >=3.9"
11
+ license = " Apache-2.0"
9
12
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
+ ]
10
22
dependencies = [
11
- " haystack-ai" ,
12
- " ibm-watsonx-ai"
23
+ " haystack-ai>=2.0.0 " ,
24
+ " ibm-watsonx-ai>=0.0.5 "
13
25
]
14
26
15
27
[project .urls ]
@@ -33,20 +45,30 @@ dependencies = [
33
45
34
46
[tool .hatch .envs .default .scripts ]
35
47
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:. }"
38
50
test = " pytest"
39
51
40
52
[tool .hatch .envs .test ]
41
53
dependencies = [
42
54
" pytest" ,
43
55
" pytest-asyncio" ,
56
+ " pytest-cov" ,
57
+ " pytest-rerunfailures" ,
58
+ " mypy" ,
44
59
" anyio" ,
45
60
" haystack-ai" ,
46
61
" ibm-watsonx-ai" ,
47
62
" pytest-mock"
48
63
]
49
64
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
+
50
72
[tool .hatch .envs .docs ]
51
73
dependencies = [" haystack-pydoc-tools" ]
52
74
@@ -61,6 +83,7 @@ packages = ["src/haystack_integrations"]
61
83
62
84
[tool .pytest .ini_options ]
63
85
markers = [
86
+ " unit: unit tests" ,
64
87
" asyncio: mark tests as using asyncio" ,
65
88
" integration: mark tests as integration tests"
66
89
]
@@ -73,12 +96,14 @@ line-length = 120
73
96
skip-string-normalization = true
74
97
75
98
[tool .ruff ]
76
- target-version = " py38 "
99
+ target-version = " py39 "
77
100
line-length = 120
78
101
79
102
[tool .ruff .lint ]
80
103
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"
82
107
]
83
108
ignore = [
84
109
" A003" , # Class attribute shadows builtin
@@ -106,8 +131,12 @@ ignore = [
106
131
" TRY003" , # Avoid long messages outside exception class
107
132
" TRY401" , # Redundant exception object in logging.exception call
108
133
" UP007" , # Use X | Y for type union
134
+ " Q000" ,
109
135
]
110
136
137
+ [tool .ruff .lint .isort ]
138
+ known-first-party = [" haystack_integrations" ]
139
+
111
140
[tool .ruff .lint .per-file-ignores ]
112
141
"examples/**" = [" T201" , " RET505" , " INP001" ]
113
142
"watsonx/tests/**" = [" ALL" ]
0 commit comments