Skip to content

Commit d67f5ab

Browse files
authored
Set up Python versions as a matrix (#94)
* Set up Python versions as a matrix * strategy/matrix not just matrix * Update some libs * Remove python2_coverage_test * dont' fail fast * fix tensorflow_test * pandas_test * change coverage to just a pip_library * Fix labels
1 parent c3177cc commit d67f5ab

File tree

5 files changed

+28
-61
lines changed

5 files changed

+28
-61
lines changed

.github/workflows/plugin.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,22 @@ on: [push, pull_request]
33
jobs:
44
test:
55
runs-on: ubuntu-latest
6+
strategy:
7+
fail-fast: false
8+
matrix:
9+
include:
10+
- python-version: '3.7'
11+
- python-version: '3.8'
12+
- python-version: '3.9'
13+
- python-version: '3.10'
14+
- python-version: '3.11'
615
steps:
716
- name: Checkout code
817
uses: actions/checkout@v2
918
- name: Setup python
1019
uses: actions/setup-python@v2
1120
with:
12-
python-version: '3.6.9'
21+
python-version: ${{ matrix.python-version }}
1322
- name: Run tests
1423
run: ./pleasew test --log_file plz-out/log/test.log -e e2e
1524
- name: Run e2e test
@@ -42,4 +51,4 @@ jobs:
4251
release-files: plz-out/package
4352
version-file: tools/VERSION
4453
change-log-file: tools/ChangeLog
45-
release-prefix: tools
54+
release-prefix: tools

test/BUILD

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -77,24 +77,12 @@ python_library(
7777
name = "python_coverage",
7878
srcs = ["python_coverage.py"],
7979
labels = [
80-
"py2",
8180
"py3",
8281
],
8382
)
8483

8584
python_test(
86-
name = "python2_coverage_test",
87-
srcs = ["python_coverage_test.py"],
88-
interpreter = "python2",
89-
labels = [
90-
"py2",
91-
"py3",
92-
],
93-
deps = [":python_coverage"],
94-
)
95-
96-
python_test(
97-
name = "python3_coverage_test",
85+
name = "python_coverage_test",
9886
srcs = ["python_coverage_test.py"],
9987
labels = ["py3"],
10088
deps = [":python_coverage"],
@@ -197,15 +185,15 @@ python_wheel(
197185
)
198186

199187
plz_e2e_test(
200-
name = "correct_labels_on_pip_libary_non_zip_safe",
188+
name = "correct_labels_on_pip_library_non_zip_safe",
201189
cmd = "plz query print -f labels //third_party/python:numpy",
202190
expected_output = "expected_labels_on_numpy.txt",
203191
labels = ["py3"],
204192
deps = ["//third_party/python:numpy"],
205193
)
206194

207195
plz_e2e_test(
208-
name = "correct_labels_on_pip_libary_zip_safe",
196+
name = "correct_labels_on_pip_library_zip_safe",
209197
cmd = "plz query print -f labels //third_party/python:grpcio",
210198
expected_output = "expected_labels_on_grpcio.txt",
211199
labels = ["py3"],

test/expected_labels_on_grpcio.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
py
2-
pip:grpcio==1.32.0
2+
pip:grpcio==1.49.1

test/expected_labels_on_numpy.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
py
2-
pip:numpy==1.18.4
2+
pip:numpy==1.23.4
33
py:zip-unsafe

third_party/python/BUILD

Lines changed: 12 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
subinclude(
2-
"//build_defs:multiversion_wheel",
3-
"//build_defs:python",
4-
)
1+
subinclude("//build_defs:python")
52

63
package(
74
default_visibility = ["PUBLIC"],
@@ -20,7 +17,7 @@ python_wheel(
2017
name = "tensorflow",
2118
licences = ["Apache 2.0"],
2219
test_only = True,
23-
version = "2.6.0",
20+
version = "2.11.0",
2421
deps = [
2522
":absl",
2623
":astunparse",
@@ -32,7 +29,9 @@ python_wheel(
3229
":keras_preprocessing",
3330
":numpy",
3431
":opt_einsum",
32+
":packaging",
3533
":protobuf",
34+
":requests",
3635
":termcolor",
3736
":typing_extensions",
3837
":wrapt",
@@ -112,9 +111,8 @@ python_wheel(
112111
python_wheel(
113112
name = "dateutil",
114113
package_name = "python_dateutil",
115-
hashes = ["5179fabb692e3ec5a6e994eb9a72a6f4498f19106774672fd7e664a7aa9f49c3"],
116114
test_only = True, # Not used by plz itself.
117-
version = "2.4.0",
115+
version = "2.8.2",
118116
deps = [":six"],
119117
)
120118

@@ -125,37 +123,9 @@ python_wheel(
125123
deps = [":six"],
126124
)
127125

128-
if is_platform(
129-
arch = "amd64",
130-
os = "linux",
131-
):
132-
urls = [
133-
"https://files.pythonhosted.org/packages/2f/19/4ebe9fe7006d46dd56eacd8cdc800b465590037bffeea17852520613cfaf/coverage-5.5-cp35-cp35m-manylinux2010_x86_64.whl",
134-
"https://files.pythonhosted.org/packages/42/37/a82863f91b41711203277ea286bc37915063f4d1be179ac34b591bf6d8a5/coverage-5.5-cp36-cp36m-manylinux2010_x86_64.whl",
135-
"https://files.pythonhosted.org/packages/16/e0/fc9f7bd9b84e6b41d0aad1a113e36714aac0c0a9b307aca5f9af443bc50f/coverage-5.5-cp37-cp37m-manylinux2010_x86_64.whl",
136-
"https://files.pythonhosted.org/packages/a4/3a/8f7b217265503eae2b0ea97e714e2709e1e84ee13cd3ca6abdff1e99e76c/coverage-5.5-cp38-cp38-manylinux2010_x86_64.whl",
137-
"https://files.pythonhosted.org/packages/a4/79/625f1ed5da2a69f52fb44e0b7ca1b470437ff502348c716005a98a71cd49/coverage-5.5-cp39-cp39-manylinux2010_x86_64.whl",
138-
]
139-
elif is_platform(
140-
arch = "amd64",
141-
os = "darwin",
142-
):
143-
urls = [
144-
"https://files.pythonhosted.org/packages/9f/16/7e0972f8495f6a1b81cfa6579eead931d63dd445e8ecb3114b04a0e36af2/coverage-5.5-cp35-cp35m-macosx_10_9_x86_64.whl",
145-
"https://files.pythonhosted.org/packages/fd/2b/ab03276eb127f8ec7f1cf1499c77944321b125d89859ab51ee7d9f46475f/coverage-5.5-cp36-cp36m-macosx_10_9_x86_64.whl",
146-
"https://files.pythonhosted.org/packages/52/44/5df49f3b462a0f5818a2f6f206d6523ff21ff9b21c1eb2906f8a31aa321c/coverage-5.5-cp37-cp37m-macosx_10_9_x86_64.whl",
147-
"https://files.pythonhosted.org/packages/b6/26/b53bf0fef1b4bce6f7d61fef10fbf924d943987d4c9e53c394ecebff3673/coverage-5.5-cp38-cp38-macosx_10_9_x86_64.whl",
148-
"https://files.pythonhosted.org/packages/0d/8a/3b13c4e1f241a7083a4ee9986b969f0238f41dcd7a8990c786bc3b4b5b19/coverage-5.5-cp39-cp39-macosx_10_9_x86_64.whl",
149-
]
150-
else:
151-
urls = [
152-
"https://files.pythonhosted.org/packages/93/ac/02bc6a60304a8a58383386f7675f6ebae0d2f49f162dda318e57bd95c746/coverage-5.5-pp37-none-any.whl",
153-
]
154-
155-
python_multiversion_wheel(
126+
pip_library(
156127
name = "coverage",
157-
urls = urls,
158-
version = "5.5",
128+
version = "7.2.1",
159129
)
160130

161131
pip_library(
@@ -309,7 +279,7 @@ pip_library(
309279
pip_library(
310280
name = "numpy",
311281
test_only = True,
312-
version = "1.18.4",
282+
version = "1.23.4",
313283
zip_safe = False,
314284
)
315285

@@ -344,7 +314,7 @@ pip_library(
344314
pip_library(
345315
name = "grpcio",
346316
test_only = True,
347-
version = "1.32.0",
317+
version = "1.49.1",
348318
deps = [
349319
":six",
350320
],
@@ -380,7 +350,7 @@ pip_library(
380350
pip_library(
381351
name = "h5py",
382352
test_only = True,
383-
version = "2.10.0",
353+
version = "3.7.0",
384354
deps = [
385355
":numpy",
386356
":six",
@@ -396,7 +366,7 @@ pip_library(
396366
pip_library(
397367
name = "pandas",
398368
test_only = True,
399-
version = "1.0.3",
369+
version = "1.5.0",
400370
deps = [
401371
":dateutil",
402372
":numpy",
@@ -414,7 +384,7 @@ pip_library(
414384
pip_library(
415385
name = "scipy",
416386
test_only = True,
417-
version = "1.5.2",
387+
version = "1.9.2",
418388
zip_safe = False,
419389
deps = [
420390
":numpy",

0 commit comments

Comments
 (0)