-
Notifications
You must be signed in to change notification settings - Fork 14
113 lines (97 loc) · 5.27 KB
/
array-api-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: Array API Tests
on:
push:
branches:
- "main"
pull_request:
schedule:
# Every weekday at 03:19 UTC, see https://crontab.guru/
- cron: "19 3 * * 1-5"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.9"]
steps:
- name: Checkout Cubed
uses: actions/checkout@v3
with:
path: cubed
- name: Checkout Array API tests
uses: actions/checkout@v3
with:
repository: data-apis/array-api-tests
path: array-api-tests
submodules: "true"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install dependencies
run: |
pushd array-api-tests
pip install -e '../cubed[test]'
pip install -r requirements.txt # from Array API tests repo
- name: Run Array API tests
env:
ARRAY_API_TESTS_MODULE: cubed.array_api
run: |
pushd array-api-tests
# Skip testing functions with known issues
cat << EOF >> skips.txt
# not implemented (elemwise inplace)
array_api_tests/test_operators_and_elementwise_functions.py::test_add[__iadd__(x1, x2)]
array_api_tests/test_operators_and_elementwise_functions.py::test_add[__iadd__(x, s)]
array_api_tests/test_operators_and_elementwise_functions.py::test_bitwise_and[__iand__(x1, x2)]
array_api_tests/test_operators_and_elementwise_functions.py::test_bitwise_and[__iand__(x, s)]
array_api_tests/test_operators_and_elementwise_functions.py::test_bitwise_left_shift[__ilshift__(x1, x2)]
array_api_tests/test_operators_and_elementwise_functions.py::test_bitwise_left_shift[__ilshift__(x, s)]
array_api_tests/test_operators_and_elementwise_functions.py::test_bitwise_or[__ior__(x1, x2)]
array_api_tests/test_operators_and_elementwise_functions.py::test_bitwise_or[__ior__(x, s)]
array_api_tests/test_operators_and_elementwise_functions.py::test_bitwise_right_shift[__irshift__(x1, x2)]
array_api_tests/test_operators_and_elementwise_functions.py::test_bitwise_right_shift[__irshift__(x, s)]
array_api_tests/test_operators_and_elementwise_functions.py::test_bitwise_xor[__ixor__(x1, x2)]
array_api_tests/test_operators_and_elementwise_functions.py::test_bitwise_xor[__ixor__(x, s)]
array_api_tests/test_operators_and_elementwise_functions.py::test_divide[__itruediv__(x1, x2)]
array_api_tests/test_operators_and_elementwise_functions.py::test_divide[__itruediv__(x, s)]
array_api_tests/test_operators_and_elementwise_functions.py::test_floor_divide[__ifloordiv__(x1, x2)]
array_api_tests/test_operators_and_elementwise_functions.py::test_floor_divide[__ifloordiv__(x, s)]
array_api_tests/test_operators_and_elementwise_functions.py::test_multiply[__imul__(x1, x2)]
array_api_tests/test_operators_and_elementwise_functions.py::test_multiply[__imul__(x, s)]
array_api_tests/test_operators_and_elementwise_functions.py::test_pow[__ipow__(x1, x2)]
array_api_tests/test_operators_and_elementwise_functions.py::test_pow[__ipow__(x, s)]
array_api_tests/test_operators_and_elementwise_functions.py::test_remainder[__imod__(x1, x2)]
array_api_tests/test_operators_and_elementwise_functions.py::test_remainder[__imod__(x, s)]
array_api_tests/test_operators_and_elementwise_functions.py::test_subtract[__isub__(x1, x2)]
array_api_tests/test_operators_and_elementwise_functions.py::test_subtract[__isub__(x, s)]
# don't run special cases yet
array_api_tests/test_special_cases.py
# don't test signatures or names yet as some are not implemented
array_api_tests/test_signatures.py
array_api_tests/test_has_names.py
# very slow
array_api_tests/test_creation_functions.py::test_eye
# edge case failures (https://github.com/cubed-dev/cubed/issues/420)
array_api_tests/test_linalg.py::test_tensordot
array_api_tests/test_linalg.py::test_vecdot
# not implemented
array_api_tests/test_array_object.py::test_setitem
array_api_tests/test_array_object.py::test_setitem_masking
array_api_tests/test_sorting_functions.py
array_api_tests/test_statistical_functions.py::test_std
array_api_tests/test_statistical_functions.py::test_var
# finfo(float32).eps returns float32 but should return float
array_api_tests/test_data_type_functions.py::test_finfo[float32]
# From https://github.com/data-apis/array-api-tests/blob/master/.github/workflows/numpy.yml
# https://github.com/numpy/numpy/issues/18881
array_api_tests/test_creation_functions.py::test_linspace
EOF
pytest -v -rxXfEA --hypothesis-max-examples=2 --disable-data-dependent-shapes --disable-extension linalg --hypothesis-disable-deadline --cov=cubed.array_api --cov-report=term-missing