File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717set -xeuo pipefail
1818
1919# Install deps in a virtual env.
20- readonly VENV_DIR=/tmp/optax-env
21- rm -rf " ${VENV_DIR} "
20+ rm -rf _testing
21+ mkdir -p _testing
22+ readonly VENV_DIR=" $( mktemp -d -p ` pwd` /_testing optax-env.XXXXXXXX) "
23+ # in the unlikely case in which there was something in that directory
2224python3 -m venv " ${VENV_DIR} "
2325source " ${VENV_DIR} /bin/activate"
2426python --version
@@ -65,11 +67,11 @@ pip install optax*.whl
6567
6668# Check types with pytype.
6769pip install pytype
68- pytype ` find optax/_src/ examples optax/contrib -name ' *.py' | xargs` -k -d import-error
70+ pytype ` find optax/_src examples optax/contrib -name ' *.py' | xargs` -k -d import-error
6971
7072# Run tests using pytest.
7173# Change directory to avoid importing the package from repo root.
72- mkdir _testing && cd _testing
74+ cd _testing
7375python -m pytest -n auto --pyargs optax
7476cd ..
7577
You can’t perform that action at this time.
0 commit comments