Skip to content

Commit

Permalink
Use requirements.txt and pin black version
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonwillard committed Aug 27, 2020
1 parent 7f1ab2a commit 771eb47
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 22 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.coverage
*.linkinfo
*.o
*.orig
Expand Down
22 changes: 6 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,16 @@ before_install:
install:
- conda create --yes -q -n pyenv python=$TRAVIS_PYTHON_VERSION
- conda activate pyenv
- conda install --yes -q mkl numpy scipy pip flake8 six pep8 pyflakes sphinx mkl-service graphviz cython
- python -m pip install -q pydot-ng sphinx_rtd_theme pytest pytest-cov>=2.6.1 coveralls sympy
- python -m pip install --no-deps --upgrade -e .
- conda install --yes -q mkl numpy scipy pip mkl-service graphviz cython libgpuarray pygpu
- pip install -q -r requirements.txt
- conda list && pip freeze
- python -c 'import theano; print(theano.config.__str__(print_doc=False))'
- python -c 'import theano; assert(theano.config.blas.ldflags != "")'

jobs:
include:
- stage: lint
script:
- pip install black
- black -t py36 --check theano/ tests/ setup.py
- flake8
- &normaltest
Expand All @@ -92,19 +93,8 @@ script:
- export MKL_THREADING_LAYER=GNU
- export MKL_NUM_THREADS=1
- export OMP_NUM_THREADS=1
- which python
- python --version
- uname -a
- free -m
- df -h
- ulimit -a
- echo "$PART"
# Print information to help debug problems
- python -c 'import numpy; print(numpy.__version__)'
- python -c 'import theano; print(theano.__version__)'
- python -c 'import theano; print(theano.config.__str__(print_doc=False))'
- python -c 'import theano; assert(theano.config.blas.ldflags != "")'
- pytest -x -r A --verbose --runslow --cov=theano/ --cov-append --no-cov-on-fail $PART || travis_terminate 1
- pytest -x -r A --verbose --runslow --cov=theano/ --cov-append --no-cov-on-fail $PART

after_success:
- coveralls
Expand Down
4 changes: 2 additions & 2 deletions doc/install_generic.inc
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ Install the latest stable version of Theano with:

- Use :blue:`user` for a user installation without admin rights. It will install Theano in your local site-packages.

- [test] will install the requirements for testing.
- Use `pip install -r requirements.txt` to install the requirements for testing.

- [doc] will install the requirements in order to generate the documentation.
- Use `pip install -r requirements-rtd.txt` install the requirements for generating the documentation.

If you encountered any trouble, head to the :ref:`troubleshooting` page.

Expand Down
3 changes: 3 additions & 0 deletions requirement-rtd.txt → requirements-rtd.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
-e ./
sphinx>=1.3.0
sphinx_rtd_theme
pygments
pytest
numpy
gnumpy
pydot
pydot2
pydot-ng
Cython
scipy==0.13
12 changes: 12 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
-e ./
flake8
pep8
pyflakes
black==20.8b1
pytest-cov>=2.6.1
coverage>=5.1
pytest
coveralls
cython
sympy
versioneer
4 changes: 0 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,6 @@ def do_setup():
packages=find_packages(),
cmdclass=versioneer.get_cmdclass(),
install_requires=["numpy>=1.9.1", "scipy>=0.14", "six>=1.9.0"],
extras_require={
"test": ["pytest", "flake8", "black"],
"doc": ["Sphinx>=0.5.1", "pygments"],
},
package_data={
"": [
"*.txt",
Expand Down

0 comments on commit 771eb47

Please sign in to comment.