File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
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
26
27
# Install dependencies.
27
28
pip install --upgrade pip setuptools wheel
28
- pip install flake8 pytest-xdist pylint pylint-exit
29
+ pip install flake8 pytest pylint pylint-exit
29
30
pip install -e " .[test, examples]"
30
31
31
32
# Dp-accounting specifies exact minor versions as requirements which sometimes
@@ -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
+ mkdir 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