Skip to content

Commit

Permalink
Add python3.10 functional testing to circle (#2827)
Browse files Browse the repository at this point in the history
  • Loading branch information
raubitsj authored Oct 24, 2021
1 parent 080c485 commit 50c7895
Show file tree
Hide file tree
Showing 10 changed files with 52 additions and 16 deletions.
4 changes: 4 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ workflows:
name: "func-s_service-lin-py37"
image: "python:3.7"
toxenv: "func-s_service-py37,func-covercircle"
- test:
name: "func-s_py310-lin-py310"
image: "python:3.10"
toxenv: "func-s_py310-py310,func-covercircle"
- win:
name: "win-py37"
toxenv: "py37,wincovercircle"
Expand Down
6 changes: 3 additions & 3 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ codecov:
require_ci_to_pass: no
notify:
# after_n_builds calculation
# 11 = 1 (lin-py36) + 4 (win-py37) + 5 (func-s_{base,tf115,tf21,tf25,grpc}-lin-py37) + 1 (pylaunch)
# 12 = 1 (lin-py36) + 4 (win-py37) + 6 (func-s_{base,tf115,tf21,tf25,service,py310}-lin-*) + 1 (pylaunch)
# also change comment block after_n_builds just below
after_n_builds: 11
after_n_builds: 12
wait_for_ci: no

comment:
layout: "reach, diff, flags, files"
behavior: default
require_changes: no
after_n_builds: 11
after_n_builds: 12

ignore:
- "wandb/vendor"
Expand Down
1 change: 1 addition & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ canonicalsrc =
.tox/func-s_tf21-py37/lib/python3.7/site-packages/wandb/
.tox/func-s_tf25-py37/lib/python3.7/site-packages/wandb/
.tox/func-s_service-py37/lib/python3.7/site-packages/wandb/
.tox/func-s_py310-py310/lib/python3.10/site-packages/wandb/

[run]
# TODO(jhr): enable this in the future
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"""Base case - main process init/finish.
---
id: 0.0.2
id: 0.core.01-without-finish
plugin:
- wandb
assert:
Expand All @@ -19,4 +19,3 @@
wandb.init()
wandb.log(dict(m1=1))
wandb.log(dict(m2=2))
wandb.finish()
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"""Base case - main process init/finish.
---
id: 0.0.1
id: 0.core.02-with-finish
plugin:
- wandb
assert:
Expand All @@ -12,10 +12,14 @@
m1: 1
m2: 2
- :wandb:runs[0][exitcode]: 0
- :op:contains:
- :wandb:runs[0][telemetry][3] # feature
- 2 # finish
"""

import wandb

wandb.init()
wandb.log(dict(m1=1))
wandb.log(dict(m2=2))
wandb.finish()
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"""Error case - main process init/finish.
---
id: 0.0.3
id: 0.core.03-script-fail
plugin:
- wandb
assert:
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
id: 0.0.5
id: 0.magic.01-mnist-convnet
plugin:
- wandb
var:
Expand Down
27 changes: 27 additions & 0 deletions functional_tests/py310/01-basic.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env python
"""Base case - main process init/finish.
---
id: 0.py310.01-basic
plugin:
- wandb
tag:
shard: py310
assert:
- :wandb:runs_len: 1
- :wandb:runs[0][config]: {}
- :wandb:runs[0][summary]:
m1: 1
m2: 2
- :wandb:runs[0][exitcode]: 0
- :op:contains:
- :wandb:runs[0][telemetry][3] # feature
- 2 # finish
"""

import wandb

wandb.init()
wandb.log(dict(m1=1))
wandb.log(dict(m2=2))
wandb.finish()
17 changes: 9 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -275,28 +275,29 @@ commands =
cp .coverage coverage.xml cover-results/
coverage report -m --ignore-errors --skip-covered --omit "wandb/vendor/*"

[testenv:func-s_{base,tf115,tf21,tf25,service}-{py35,py36,py37,py38,py39}]
[testenv:func-s_{base,tf115,tf21,tf25,service,py310}-{py35,py36,py37,py38,py39,py310}]
install_command = pip install -f https://download.pytorch.org/whl/torch_stable.html {opts} {packages}
commands_pre =
setenv =
COVERAGE_FILE={envdir}/.coverage
YEACOV_SOURCE={envsitepackagesdir}/wandb/
deps =
-r{toxinidir}/requirements.txt
func-s_base-py{35,36,37,38,39}: -r{toxinidir}/requirements_dev.txt
func-s_base-py{35,36,37,38,39,310}: -r{toxinidir}/requirements_dev.txt
pytest-mock<=3.2.0
yea-wandb==0.7.22
extras =
func-s_service-py{35,36,37,38,39}: service
func-s_service-py{35,36,37,38,39,310}: service
whitelist_externals =
mkdir
commands =
mkdir -p test-results
func-s_base-py{35,36,37,38,39}: yea --shard default run {posargs:--all}
func-s_tf115-py{35,36,37,38,39}: yea --shard tf115 run {posargs:--all}
func-s_tf21-py{35,36,37,38,39}: yea --shard tf21 run {posargs:--all}
func-s_tf25-py{35,36,37,38,39}: yea --shard tf25 run {posargs:--all}
func-s_service-py{35,36,37,38,39}: yea --shard service run {posargs:--all}
func-s_base-py{35,36,37,38,39,310}: yea --shard default run {posargs:--all}
func-s_tf115-py{35,36,37,38,39,310}: yea --shard tf115 run {posargs:--all}
func-s_tf21-py{35,36,37,38,39,310}: yea --shard tf21 run {posargs:--all}
func-s_tf25-py{35,36,37,38,39,310}: yea --shard tf25 run {posargs:--all}
func-s_service-py{35,36,37,38,39,310}: yea --shard service run {posargs:--all}
func-s_py310-py{35,36,37,38,39,310}: yea --shard py310 run {posargs:--all}

[testenv:func-cover]
skip_install = true
Expand Down

0 comments on commit 50c7895

Please sign in to comment.