File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 17
17
set -xeuo pipefail
18
18
19
19
# Install deps in a virtual env.
20
- readonly VENV_DIR=/tmp/optax-env
21
- rm -rf " ${VENV_DIR} "
22
- python3 -m venv " ${VENV_DIR} "
20
+ mkdir -p _testing
21
+ VENV_DIR=" $( mktemp -d -p ` pwd` /_testing optax-env.XXXXXXXX) "
22
+ # in the unlikely case in which there was something in that directory
23
+ python3 -m venv --copies " ${VENV_DIR} "
23
24
source " ${VENV_DIR} /bin/activate"
24
25
python --version
25
26
@@ -63,13 +64,13 @@ python -m build
63
64
pip wheel --verbose --no-deps --no-clean dist/optax* .tar.gz
64
65
pip install optax* .whl
65
66
66
- # Check types with pytype.
67
+ # # Check types with pytype.
67
68
pip install pytype
68
- pytype ` find optax/_src/ examples optax/contrib -name ' *.py' | xargs` -k -d import-error
69
+ pytype ` find optax/_src examples optax/contrib -name ' *.py' | xargs` -k -d import-error
69
70
70
71
# Run tests using pytest.
71
72
# Change directory to avoid importing the package from repo root.
72
- mkdir _testing && cd _testing
73
+ cd _testing
73
74
python -m pytest -n auto --pyargs optax
74
75
cd ..
75
76
You can’t perform that action at this time.
0 commit comments