@@ -2,131 +2,131 @@ trigger:
2
2
batch : true
3
3
branches :
4
4
include :
5
- - ' * '
5
+ - " * "
6
6
paths :
7
7
exclude :
8
- - ' website/*'
9
- - ' *.md'
8
+ - " website/*"
9
+ - " *.md"
10
10
pr :
11
11
paths :
12
12
exclude :
13
- - ' website/*'
14
- - ' *.md'
13
+ - " website/*"
14
+ - " *.md"
15
15
16
16
jobs :
17
- - job : ' Test'
18
- variables :
19
- NOTEBOOK_KERNEL : " thinc-notebook-tests"
20
- strategy :
21
- matrix :
22
- Python36Windows :
23
- imageName : ' windows-2019'
24
- python.version : ' 3.6'
25
- Python37Mac :
26
- imageName : ' macos-latest'
27
- python.version : ' 3.7'
28
- Python38Linux :
29
- imageName : ' ubuntu-latest'
30
- python.version : ' 3.8'
31
- Python39Windows :
32
- imageName : ' windows-latest'
33
- python.version : ' 3.9'
34
- Python310Mac :
35
- imageName : ' macos-latest'
36
- python.version : ' 3.10'
37
- Python311Linux :
38
- imageName : ' ubuntu-latest'
39
- python.version : ' 3.11'
40
- Python311Windows :
41
- imageName : ' windows-latest'
42
- python.version : ' 3.11'
43
- Python311Mac :
44
- imageName : ' macos-latest'
45
- python.version : ' 3.11'
46
- maxParallel : 4
47
- pool :
48
- vmImage : $(imageName)
17
+ - job : " Test"
18
+ variables :
19
+ NOTEBOOK_KERNEL : " thinc-notebook-tests"
20
+ strategy :
21
+ matrix :
22
+ Python36Windows :
23
+ imageName : " windows-2019"
24
+ python.version : " 3.6"
25
+ Python37Mac :
26
+ imageName : " macos-latest"
27
+ python.version : " 3.7"
28
+ Python38Linux :
29
+ imageName : " ubuntu-latest"
30
+ python.version : " 3.8"
31
+ Python39Windows :
32
+ imageName : " windows-latest"
33
+ python.version : " 3.9"
34
+ Python310Mac :
35
+ imageName : " macos-latest"
36
+ python.version : " 3.10"
37
+ Python311Linux :
38
+ imageName : " ubuntu-latest"
39
+ python.version : " 3.11"
40
+ Python311Windows :
41
+ imageName : " windows-latest"
42
+ python.version : " 3.11"
43
+ Python311Mac :
44
+ imageName : " macos-latest"
45
+ python.version : " 3.11"
46
+ maxParallel : 4
47
+ pool :
48
+ vmImage : $(imageName)
49
49
50
- steps :
51
- - task : UsePythonVersion@0
52
- inputs :
53
- versionSpec : ' $(python.version)'
54
- architecture : ' x64'
55
- allowUnstable : true
50
+ steps :
51
+ - task : UsePythonVersion@0
52
+ inputs :
53
+ versionSpec : " $(python.version)"
54
+ architecture : " x64"
55
+ allowUnstable : true
56
56
57
- - script : |
58
- python -m pip install --upgrade pip setuptools wheel
59
- pip install -r requirements.txt
60
- displayName: ' Install dependencies'
57
+ - script : |
58
+ python -m pip install --upgrade pip setuptools wheel
59
+ pip install -r requirements.txt
60
+ displayName: " Install dependencies"
61
61
62
- - script : |
63
- python setup.py build_ext --inplace
64
- python setup.py sdist --formats=gztar
65
- displayName: ' Build sdist'
62
+ - script : |
63
+ python setup.py build_ext --inplace
64
+ python setup.py sdist --formats=gztar
65
+ displayName: " Build sdist"
66
66
67
- - script : |
68
- python -m mypy thinc --no-implicit-reexport
69
- displayName: ' Run mypy'
70
- condition: ne(variables['python.version'], '3.6 ')
67
+ - script : |
68
+ python -m mypy thinc --no-implicit-reexport
69
+ displayName: " Run mypy"
70
+ condition: ne(variables['python.version'], '3.10 ')
71
71
72
- - task : DeleteFiles@1
73
- inputs :
74
- contents : ' thinc'
75
- displayName : ' Delete source directory'
72
+ - task : DeleteFiles@1
73
+ inputs :
74
+ contents : " thinc"
75
+ displayName : " Delete source directory"
76
76
77
- - script : |
78
- python -m pip freeze
79
- pip freeze --exclude pywin32 > installed.txt
80
- pip uninstall -y -r installed.txt
81
- displayName: ' Uninstall all packages'
77
+ - script : |
78
+ python -m pip freeze
79
+ pip freeze --exclude pywin32 > installed.txt
80
+ pip uninstall -y -r installed.txt
81
+ displayName: " Uninstall all packages"
82
82
83
- - bash : |
84
- SDIST=$(python -c "import os;print(os.listdir('./dist')[-1])" 2>&1)
85
- PIP_CONSTRAINT="build-constraints.txt" pip install dist/$SDIST
86
- displayName: ' Install from sdist'
83
+ - bash : |
84
+ SDIST=$(python -c "import os;print(os.listdir('./dist')[-1])" 2>&1)
85
+ PIP_CONSTRAINT="build-constraints.txt" pip install dist/$SDIST
86
+ displayName: " Install from sdist"
87
87
88
- - bash : |
89
- python -c "import thinc"
90
- displayName: ' Test import'
88
+ - bash : |
89
+ python -c "import thinc"
90
+ displayName: " Test import"
91
91
92
- - script : |
93
- pip install -r requirements.txt
94
- pip install ipykernel pydot graphviz
95
- python -m ipykernel install --name thinc-notebook-tests --user
96
- python -m pytest --pyargs thinc --cov=thinc --cov-report=term
97
- displayName: ' Run tests without extras'
92
+ - script : |
93
+ pip install -r requirements.txt
94
+ pip install ipykernel pydot graphviz
95
+ python -m ipykernel install --name thinc-notebook-tests --user
96
+ python -m pytest --pyargs thinc --cov=thinc --cov-report=term
97
+ displayName: " Run tests without extras"
98
98
99
- # Notes on numpy requirements hacks:
100
- # 1. torch does not have a direct numpy requirement but is compiled
101
- # against a newer version than the oldest supported numpy for windows and
102
- # python 3.10; this version of numpy would not work with
103
- # tensorflow~=2.5.0 as specified above, but there is no release for
104
- # python 3.10 anyway
105
- # 2. restrict to numpy<1.24.0 due to mxnet incompatibility
106
- # 3. keep restriction to torch<1.13.0 due to segfaults with numpy<1.24.0,
107
- # which skips torch for python 3.11
108
- - script : |
109
- pip install "protobuf~=3.20.0" "tensorflow~=2.5.0"
110
- pip install "mxnet; sys_platform != 'win32'"
111
- pip install "torch<1.13.0" --extra-index-url https://download.pytorch.org/whl/cpu
112
- pip install "numpy~=1.23.0; python_version=='3.10' and sys_platform=='win32'"
113
- pip install "numpy<1.24.0"
114
- pip install -r requirements.txt
115
- pip uninstall -y mypy
116
- displayName: ' Install extras for testing'
99
+ # Notes on numpy requirements hacks:
100
+ # 1. torch does not have a direct numpy requirement but is compiled
101
+ # against a newer version than the oldest supported numpy for windows and
102
+ # python 3.10; this version of numpy would not work with
103
+ # tensorflow~=2.5.0 as specified above, but there is no release for
104
+ # python 3.10 anyway
105
+ # 2. restrict to numpy<1.24.0 due to mxnet incompatibility
106
+ # 3. keep restriction to torch<1.13.0 due to segfaults with numpy<1.24.0,
107
+ # which skips torch for python 3.11
108
+ - script : |
109
+ pip install "protobuf~=3.20.0" "tensorflow~=2.5.0"
110
+ pip install "mxnet; sys_platform != 'win32'"
111
+ pip install "torch<1.13.0" --extra-index-url https://download.pytorch.org/whl/cpu
112
+ pip install "numpy~=1.23.0; python_version=='3.10' and sys_platform=='win32'"
113
+ pip install "numpy<1.24.0"
114
+ pip install -r requirements.txt
115
+ pip uninstall -y mypy
116
+ displayName: " Install extras for testing"
117
117
118
- - script : |
119
- python -m pytest --pyargs thinc --cov=thinc --cov-report=term
120
- displayName: ' Run tests with extras'
118
+ - script : |
119
+ python -m pytest --pyargs thinc --cov=thinc --cov-report=term
120
+ displayName: " Run tests with extras"
121
121
122
- - script : |
123
- pip uninstall -y tensorflow
124
- pip install thinc-apple-ops
125
- python -m pytest --pyargs thinc_apple_ops
126
- displayName: ' Run tests for thinc-apple-ops'
127
- condition: and(startsWith(variables['imageName'], 'macos'), eq(variables['python.version'], '3.10'))
122
+ - script : |
123
+ pip uninstall -y tensorflow
124
+ pip install thinc-apple-ops
125
+ python -m pytest --pyargs thinc_apple_ops
126
+ displayName: " Run tests for thinc-apple-ops"
127
+ condition: and(startsWith(variables['imageName'], 'macos'), eq(variables['python.version'], '3.10'))
128
128
129
- - script : |
130
- python -m pytest --pyargs thinc
131
- displayName: ' Run tests with thinc-apple-ops'
132
- condition: and(startsWith(variables['imageName'], 'macos'), eq(variables['python.version'], '3.10'))
129
+ - script : |
130
+ python -m pytest --pyargs thinc
131
+ displayName: " Run tests with thinc-apple-ops"
132
+ condition: and(startsWith(variables['imageName'], 'macos'), eq(variables['python.version'], '3.10'))
0 commit comments