|
3 | 3 | This is the test suite for array libraries adopting the [Python Array API |
4 | 4 | standard](https://data-apis.org/array-api/latest). |
5 | 5 |
|
6 | | -Note the suite is still a **work in progress**. Feedback and contributions are |
7 | | -welcome! |
| 6 | +Keeping full coverage of the spec is an on-going priority as the Array API evolves. |
| 7 | +Feedback and contributions are welcome! |
8 | 8 |
|
9 | 9 | ## Quickstart |
10 | 10 |
|
@@ -33,11 +33,23 @@ You need to specify the array library to test. It can be specified via the |
33 | 33 | `ARRAY_API_TESTS_MODULE` environment variable, e.g. |
34 | 34 |
|
35 | 35 | ```bash |
36 | | -$ export ARRAY_API_TESTS_MODULE=numpy.array_api |
| 36 | +$ export ARRAY_API_TESTS_MODULE=array_api_strict |
37 | 37 | ``` |
38 | 38 |
|
39 | 39 | Alternately, import/define the `xp` variable in `array_api_tests/__init__.py`. |
40 | 40 |
|
| 41 | +### Specifying the API version |
| 42 | + |
| 43 | +You can specify the API version to use when testing via the |
| 44 | +`ARRAY_API_TESTS_VERSION` environment variable, e.g. |
| 45 | + |
| 46 | +```bash |
| 47 | +$ export ARRAY_API_TESTS_VERSION="2023.12" |
| 48 | +``` |
| 49 | + |
| 50 | +Currently this defaults to the array module's `__array_api_version__` value, and |
| 51 | +if that attribute doesn't exist then we fallback to `"2021.12"`. |
| 52 | + |
41 | 53 | ### Run the suite |
42 | 54 |
|
43 | 55 | Simply run `pytest` against the `array_api_tests/` folder to run the full suite. |
@@ -154,13 +166,6 @@ library to fail. |
154 | 166 |
|
155 | 167 | ### Configuration |
156 | 168 |
|
157 | | -#### API version |
158 | | - |
159 | | -You can specify the API version to use when testing via the |
160 | | -`ARRAY_API_TESTS_VERSION` environment variable. Currently this defaults to the |
161 | | -array module's `__array_api_version__` value, and if that attribute doesn't |
162 | | -exist then we fallback to `"2021.12"`. |
163 | | - |
164 | 169 | #### Data-dependent shapes |
165 | 170 |
|
166 | 171 | Use the `--disable-data-dependent-shapes` flag to skip testing functions which have |
@@ -349,26 +354,6 @@ into a release. If you want, you can add release notes, which GitHub can |
349 | 354 | generate for you. |
350 | 355 |
|
351 | 356 |
|
352 | | -## Future plans |
353 | | - |
354 | | -Keeping full coverage of the spec is an on-going priority as the Array API |
355 | | -evolves. |
356 | | - |
357 | | -Additionally, we have features and general improvements planned. Work on such |
358 | | -functionality is guided primarily by the concerete needs of developers |
359 | | -implementing and using the Array API—be sure to [let us |
360 | | -know](https://github.com/data-apis/array-api-tests/issues) any limitations you |
361 | | -come across. |
362 | | - |
363 | | -* A dependency graph for every test case, which could be used to modify pytest's |
364 | | - collection so that low-dependency tests are run first, and tests with faulty |
365 | | - dependencies would skip/xfail. |
366 | | - |
367 | | -* In some tests we've found it difficult to find appropaite assertion parameters |
368 | | - for output values (particularly epsilons for floating-point outputs), so we |
369 | | - need to review these and either implement assertions or properly note the lack |
370 | | - thereof. |
371 | | - |
372 | 357 | --- |
373 | 358 |
|
374 | 359 | <sup>1</sup>The only exceptions to having just one primary test per function are: |
|
0 commit comments