You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/README.md
+20-11Lines changed: 20 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,19 +2,17 @@
2
2
3
3
## Prereqs
4
4
5
-
The tests rely on pytest, tabulate and sentence-transformers
5
+
The tests rely on pytestand tabulate
6
6
7
7
```bash
8
-
pip install pytest tabulate sentence-transformers
8
+
pip install pytest tabulate
9
9
```
10
10
11
-
Mongo and Milvus are expected to be already running. From the root of this repo:
11
+
To run tests specific to a particular database or vector database requires that the resources are up and running.
12
12
13
-
```bash
14
-
docker compose up -d
15
-
```
16
-
17
-
Some tests in the ./models and ./prompts folder require API Keys to cloud model providers. You can edit the test code to include your own, or update ```~/set-env.sh``` and run the following to get the environment variables loaded in your shell:
13
+
Some tests may require API Keys to particular cloud model providers. If you would like to test that provider, then
14
+
you can either edit the test code to include your own, or update ```~/set-env.sh``` and run the following to get
15
+
the environment variables loaded in your shell:
18
16
19
17
```bash
20
18
source~/set-env.sh
@@ -26,17 +24,28 @@ source ~/set-env.sh
26
24
python3 ./run-tests.py
27
25
```
28
26
29
-
WARNING: This will "clean" the environment before running *_all tests_*:
27
+
Note: We do not currently recommend running all tests concurrently - we are updating our automation and test scope
28
+
to improve this capability going forward.
29
+
30
+
WARNING: Initiating this script will "clean" the environment before running *_all tests_*:
30
31
- Uninstall any llmware modules locally installed
31
32
- Install the llmware module from this repo (simulating a user installing from pypi)
32
33
- Completely remove $HOME/llmware_data
33
-
- Reset Mongo and Milvus (drop all collections)
34
+
- Reset Mongo and Milvus (drop all collections) -> not currently updated to drop Postgres and SQLITE DBs or other Vector DBs
34
35
- Run ./models/test_all_generative_models.py which will pull down many GBs of model files to the test systems.
35
36
36
37
37
-
38
38
### Only running tests from a specific folder or file
39
39
40
+
This is our recommended testing approach, unless a PR has significant cross-module changes, and even in such cases
41
+
it is usually more effective to run 2-3 individual tests and supplement with manual testing.
42
+
43
+
Note: please note that we are in the process of updating our test automation coverage suite. We would welcome
44
+
contributions from the community to continue to improve the automation and coverage scope of these tests.
45
+
46
+
In addition to the formal tests, we would recommend using recent examples as well as good proxies, especially in
0 commit comments