Skip to content
This repository has been archived by the owner on Jan 21, 2025. It is now read-only.

Commit

Permalink
Fix imports to get tests passing.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 274002692
  • Loading branch information
adarob authored and copybara-github committed Oct 10, 2019
1 parent 127bfc9 commit 00f112f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 27 deletions.
16 changes: 0 additions & 16 deletions oss_scripts/oss_pip_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,6 @@
set -v # print commands as they're executed
set -e # fail and exit on any command erroring

: "${TF_VERSION:?}"

if [[ "$TF_VERSION" == "tf-nightly" ]]
then
pip install tf-nightly;
else
pip install -q "tensorflow==$TF_VERSION"
fi

# Make sure we have the latest version of numpy - avoid problems we were
# seeing with Python 3
pip install -q -U numpy

# First ensure that the base dependencies are sufficient for a full import
pip install -q -e .
python -c "import mesh_tensorflow as mtf"

# Then install the test dependencies
pip install -q -e .[tests]
2 changes: 1 addition & 1 deletion oss_scripts/oss_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function set_status() {
}

# Run tests
pytest --ignore=mesh_tensorflow/experimental
python setup.py test
set_status

exit $STATUS
5 changes: 5 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[aliases]
test=pytest

[tool:pytest]
addopts=--ignore=mesh_tensorflow/experimental
19 changes: 9 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,19 @@
},
scripts=[],
install_requires=[
'absl-py',
'future',
'gin-config',
'ortools',
'six',
'tensorflow',
'tensorflow-datasets',
],
extras_require={
'auto_mtf': ['ortools>=7.0.6546'],
'tensorflow': ['tensorflow>=1.9.0'],
'tensorflow_gpu': ['tensorflow-gpu>=1.9.0'],
'tests': [
'absl-py',
'pytest',
'ortools>=7.0.6546',
],
},
extras_require={},
tests_require=[
'pytest'
],
setup_requires=['pytest-runner'],
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
Expand Down

0 comments on commit 00f112f

Please sign in to comment.