Skip to content

Commit e828a38

Browse files
authored
chore: update md files for new hatch scripts (#1911)
* chore: update md files for new hatch scripts * fix
1 parent 9bd9134 commit e828a38

21 files changed

Lines changed: 103 additions & 87 deletions

File tree

CONTRIBUTING.md

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -194,48 +194,40 @@ $ hatch version
194194
195195
#### Run the linter
196196

197-
Every time you change the code, it's a good practice to run the linter, that will ensure your code is well formatted
198-
and the static checker is happy with the typing:
197+
Every time you change the code, it's a good practice to format the code and perform linting (with automatic fixes):
199198

200199
```console
201-
$ hatch run lint:all
200+
$ hatch run fmt
202201
```
203202

204-
If you see Hatch reporting problems, you can try fixing them with:
203+
To check for static type errors, run:
205204

206205
```console
207-
$ hatch run lint:fmt
208-
```
209-
210-
You can also run the code formatter and the static checker separated:
211-
212-
```console
213-
$ hatch run lint:style
214-
```
215-
216-
and
217-
218-
```console
219-
$ hatch run lint:typing
206+
$ hatch run test:types
220207
```
221208

222209
#### Run the tests
223210

224211
It's important your tests pass before contributing code. To run all the tests locally:
225212

226213
```console
227-
$ hatch run test
214+
$ hatch run test:all
228215
```
229216

230217
> [!IMPORTANT] The command above will run ALL the tests, including integration tests; some of those often need you to
231218
> run a certain service in background (e.g. a Vector Database) or provide credentials to external services (e.g. OpenAI)
232219
> in order to pass.
233220
234-
If you want to run only a portion of the tests, for example including integration tests, Hatch will happily take the
235-
same options you would pass to `pytest` directly, in this case a marker with the option `-m`:
221+
To run the unit tests only, run:
222+
223+
```console
224+
$ hatch run test:unit
225+
```
226+
227+
For integration tests, run:
236228

237229
```console
238-
$ hatch run test -m"not integration"
230+
$ hatch run test:integration
239231
```
240232

241233
#### Create a new integration

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ For example, to run the tests suite for the Chroma document store, from the root
1212

1313
```sh
1414
$ cd integrations/chroma
15-
$ hatch run test
15+
$ hatch run test:all
1616
```
1717

1818
Hatch will take care of setting up an isolated Python environment and run the tests.

integrations/amazon_bedrock/README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,18 @@ pip install hatch
2626

2727
With `hatch` installed, to run all the tests:
2828
```
29-
hatch run test
29+
hatch run test:all
3030
```
31-
> Note: there are no integration tests for this project.
3231

33-
To run the linters `ruff` and `mypy`:
32+
To format your code and perform linting using Ruff (with automatic fixes), run:
3433
```
35-
hatch run lint:all
34+
hatch run fmt
35+
```
36+
37+
To check for static type errors, run:
38+
39+
```console
40+
$ hatch run test:types
3641
```
3742

3843
## License

integrations/amazon_sagemaker/README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pip install hatch
2626

2727
With `hatch` installed, to run all the tests:
2828
```
29-
hatch run test
29+
hatch run test:all
3030
```
3131

3232
> Note: You need to export your AWS credentials for Sagemaker integration tests to run (`AWS_ACCESS_KEY_ID` and
@@ -39,12 +39,18 @@ hatch run test:unit
3939

4040
To only run integration tests:
4141
```
42-
hatch run test -m "integration"
42+
hatch run test:integration
4343
```
4444

45-
To run the linters `ruff` and `mypy`:
45+
To format your code and perform linting using Ruff (with automatic fixes), run:
4646
```
47-
hatch run lint:all
47+
hatch run fmt
48+
```
49+
50+
To check for static type errors, run:
51+
52+
```console
53+
$ hatch run test:types
4854
```
4955

5056
## License

integrations/anthropic/README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,18 @@ pip install hatch
2727

2828
With `hatch` installed, to run all the tests:
2929
```
30-
hatch run test
30+
hatch run test:all
3131
```
32-
> Note: there are no integration tests for this project.
3332

34-
To run the linters `ruff` and `mypy`:
33+
To format your code and perform linting using Ruff (with automatic fixes), run:
3534
```
36-
hatch run lint:all
35+
hatch run fmt
36+
```
37+
38+
To check for static type errors, run:
39+
40+
```console
41+
$ hatch run test:types
3742
```
3843

3944
## Examples

integrations/chroma/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![PyPI - Version](https://img.shields.io/pypi/v/chroma-haystack.svg)](https://pypi.org/project/chroma-haystack)
44
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/chroma-haystack.svg)](https://pypi.org/project/chroma-haystack)
5-
[![test](https://github.com/masci/chroma-haystack/actions/workflows/test.yml/badge.svg)](https://github.com/masci/chroma-haystack/actions/workflows/test.yml)
5+
[![test](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/chroma.yml/badge.svg)](https://github.com/deepset-ai/haystack-core-integrations/actions/workflows/chroma.yml)
66

77
-----
88

integrations/cohere/README.md

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,39 +27,30 @@ pip install hatch
2727

2828
With `hatch` installed, to run all the tests:
2929
```
30-
hatch run test
30+
hatch run test:all
3131
```
3232
> Note: integration tests will be skipped unless the env var COHERE_API_KEY is set. The api key needs to be valid
3333
> in order to pass the tests.
3434
3535
To only run unit tests:
3636
```
37-
hatch run test -m"not integration"
37+
hatch run test:unit
3838
```
3939

40-
To only run embedders tests:
40+
For integration tests, run:
4141
```
42-
hatch run test -m"embedders"
42+
hatch run test:integration
4343
```
4444

45-
To only run generators tests:
45+
To format your code and perform linting using Ruff (with automatic fixes), run:
4646
```
47-
hatch run test -m"generators"
47+
hatch run fmt
4848
```
4949

50-
To only run ranker tests:
51-
```
52-
hatch run test -m"ranker"
53-
```
50+
To check for static type errors, run:
5451

55-
Markers can be combined, for example you can run only integration tests for embedders with:
56-
```
57-
hatch run test -m"integrations and embedders"
58-
```
59-
60-
To run the linters `ruff` and `mypy`:
61-
```
62-
hatch run lint:all
52+
```console
53+
$ hatch run test:types
6354
```
6455

6556
## License

integrations/deepeval/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ For more information about the deepeval evaluation framework, please refer to th
2424
## Testing
2525

2626
```console
27-
hatch run test
27+
hatch run test:all
2828
```
2929

3030
## Examples

integrations/elasticsearch/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ docker-compose up
2424
Then run tests:
2525

2626
```console
27-
hatch run test
27+
hatch run test:all
2828
```
2929

3030
## License

integrations/google_vertex/README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,19 @@ pip install hatch
2929
With `hatch` installed, to run all the tests:
3030

3131
```
32-
hatch run test
32+
hatch run test:all
3333
```
3434

35-
To run the linters `ruff` and `mypy`:
35+
To format your code and perform linting using Ruff (with automatic fixes), run:
3636

3737
```
38-
hatch run lint:all
38+
hatch run fmt
39+
```
40+
41+
To check for static type errors, run:
42+
43+
```console
44+
$ hatch run test:types
3945
```
4046

4147
## License

0 commit comments

Comments
 (0)