2017-11-21 03:27:26 +00:00
|
|
|
language: python
|
|
|
|
|
|
|
|
# Version used for jobs that don't override it (e.g. the one-off jobs):
|
|
|
|
python: "3.6"
|
|
|
|
|
2018-01-16 01:34:18 +00:00
|
|
|
sudo: false
|
2016-01-13 16:54:29 +00:00
|
|
|
|
2016-06-28 04:05:22 +00:00
|
|
|
env:
|
|
|
|
global:
|
2017-11-18 03:35:40 +00:00
|
|
|
- VENV_ROOT="$HOME/venv"
|
2018-04-07 04:39:32 +00:00
|
|
|
- LINT_SRC="$(ls bidict/*.py tests/*.py setup.py)"
|
strengthen too-weak assume(..) in test_eq_ne_hash, use "max_examples=5000" for nightly CI jobs, add .readthedocs.yml
The `assume(init_items != init_unequal)` was not sufficient
because it would allow cases like:
bi_cls=bidict, other_cls=bidict, init_items=[(1, 0), (0, 1)], init_unequal=[(0, 1), (1, 0)]
causing the resulting bidicts' item sets to still be equal,
so assertions like
assert items_match(some_bidict, other_unequal, relation=ne)
would fail.
Changing the assume to
assume(set(init_items) != set(init_unequal))
fixes the issue.
Surprisingly, hypothesis only just found a failing example for this
for the first time (in https://travis-ci.org/jab/bidict/jobs/363962257)
despite having numerous opportunities to find it before.
Using a new max_examples=5000 hypothesis profile, only on nightly CI,
should help surface any remaining issues that hypothesis hasn't found yet,
without slowing commit-triggered tests with too much example generation.
Also improve Travis config:
- ditch ALLOW_FAIL=1, for some reason it didn't work
- comment out python 3.7-dev job while Travis is stuck on an old 3.7 alpha
- don't use "- |" command block where we want to see output after each command
- prefix more network-dependent commands with travis_retry
Finally, improve docs building setup:
- Factor out sphinx from "dev" extras_require to its own "docs" extras_require.
- Add a .readthedocs.yml to customize the readthedocs build.
Use pip and the "docs" extras_require to get an up-to-date Sphinx version.
Fixes some broken :ref:`addendum:...` autosectionlabel links in learning-from-bidict.
2018-04-10 04:31:29 +00:00
|
|
|
- HYPOTHESIS_PROFILE=$([[ $TRAVIS_EVENT_TYPE = cron ]] && echo max_examples_5000 || echo default)
|
2017-11-21 03:27:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
before_install:
|
strengthen too-weak assume(..) in test_eq_ne_hash, use "max_examples=5000" for nightly CI jobs, add .readthedocs.yml
The `assume(init_items != init_unequal)` was not sufficient
because it would allow cases like:
bi_cls=bidict, other_cls=bidict, init_items=[(1, 0), (0, 1)], init_unequal=[(0, 1), (1, 0)]
causing the resulting bidicts' item sets to still be equal,
so assertions like
assert items_match(some_bidict, other_unequal, relation=ne)
would fail.
Changing the assume to
assume(set(init_items) != set(init_unequal))
fixes the issue.
Surprisingly, hypothesis only just found a failing example for this
for the first time (in https://travis-ci.org/jab/bidict/jobs/363962257)
despite having numerous opportunities to find it before.
Using a new max_examples=5000 hypothesis profile, only on nightly CI,
should help surface any remaining issues that hypothesis hasn't found yet,
without slowing commit-triggered tests with too much example generation.
Also improve Travis config:
- ditch ALLOW_FAIL=1, for some reason it didn't work
- comment out python 3.7-dev job while Travis is stuck on an old 3.7 alpha
- don't use "- |" command block where we want to see output after each command
- prefix more network-dependent commands with travis_retry
Finally, improve docs building setup:
- Factor out sphinx from "dev" extras_require to its own "docs" extras_require.
- Add a .readthedocs.yml to customize the readthedocs build.
Use pip and the "docs" extras_require to get an up-to-date Sphinx version.
Fixes some broken :ref:`addendum:...` autosectionlabel links in learning-from-bidict.
2018-04-10 04:31:29 +00:00
|
|
|
- echo 'TRAVIS_PULL_REQUEST_SHA:' $TRAVIS_PULL_REQUEST_SHA
|
|
|
|
- echo 'TRAVIS_COMMIT:' $TRAVIS_COMMIT
|
|
|
|
- git --no-pager log -n2
|
|
|
|
# Travis does a shallow (--depth=50) clone by default.
|
|
|
|
# Clone the full history as requested by setuptools_scm.
|
|
|
|
- travis_retry git fetch --unshallow
|
|
|
|
# https://github.com/python-trio/trio/issues/487#issuecomment-377931587
|
|
|
|
- echo 'Installing latest pip...'
|
|
|
|
- travis_retry curl https://bootstrap.pypa.io/get-pip.py | python
|
|
|
|
- pip --version
|
2017-11-21 03:27:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
install: # Install our test dependencies.
|
2018-04-19 08:22:07 +00:00
|
|
|
- export EXTRAS="test"
|
|
|
|
- if [[ -n $COVERAGE ]]; then export EXTRAS="${EXTRAS},coverage"; fi
|
2017-11-21 03:27:26 +00:00
|
|
|
- travis_retry pip install .[$EXTRAS]
|
2018-04-19 08:22:07 +00:00
|
|
|
- pip list
|
2017-11-21 03:27:26 +00:00
|
|
|
|
|
|
|
|
|
|
|
script: # Run our test suite.
|
2017-11-21 04:07:46 +00:00
|
|
|
- if [[ -n $COVERAGE ]]; then export PYTEST_ADDOPTS="--cov=bidict --cov-config=.coveragerc"; fi
|
2017-11-21 03:27:26 +00:00
|
|
|
- python setup.py test
|
|
|
|
|
2016-06-28 04:05:22 +00:00
|
|
|
|
2017-11-21 04:07:46 +00:00
|
|
|
after_script:
|
|
|
|
- |
|
|
|
|
if [[ -n $COVERAGE ]]; then
|
|
|
|
echo "Installing codecov..."
|
|
|
|
travis_retry pip install codecov || exit 1
|
|
|
|
echo
|
2018-04-19 08:22:07 +00:00
|
|
|
echo "Uploading coverage report to codecov..."
|
|
|
|
travis_retry codecov
|
2017-11-21 04:07:46 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
2016-01-13 16:54:29 +00:00
|
|
|
matrix:
|
|
|
|
include:
|
2017-11-18 03:35:40 +00:00
|
|
|
# Each job performs a single task, and sets a "TASK" var so it's evident in the build matrix.
|
2017-11-16 20:44:51 +00:00
|
|
|
|
2017-11-21 03:27:26 +00:00
|
|
|
# Run the test suite with various Python versions.
|
|
|
|
# Only run these tests for commits to master to save time waiting for Travis.
|
|
|
|
# Also don't bother testing Python 3.4; if we work on 3.5+, we should work on 3.4 too.
|
2017-11-16 20:44:51 +00:00
|
|
|
|
2017-11-21 03:27:26 +00:00
|
|
|
## Linux
|
strengthen too-weak assume(..) in test_eq_ne_hash, use "max_examples=5000" for nightly CI jobs, add .readthedocs.yml
The `assume(init_items != init_unequal)` was not sufficient
because it would allow cases like:
bi_cls=bidict, other_cls=bidict, init_items=[(1, 0), (0, 1)], init_unequal=[(0, 1), (1, 0)]
causing the resulting bidicts' item sets to still be equal,
so assertions like
assert items_match(some_bidict, other_unequal, relation=ne)
would fail.
Changing the assume to
assume(set(init_items) != set(init_unequal))
fixes the issue.
Surprisingly, hypothesis only just found a failing example for this
for the first time (in https://travis-ci.org/jab/bidict/jobs/363962257)
despite having numerous opportunities to find it before.
Using a new max_examples=5000 hypothesis profile, only on nightly CI,
should help surface any remaining issues that hypothesis hasn't found yet,
without slowing commit-triggered tests with too much example generation.
Also improve Travis config:
- ditch ALLOW_FAIL=1, for some reason it didn't work
- comment out python 3.7-dev job while Travis is stuck on an old 3.7 alpha
- don't use "- |" command block where we want to see output after each command
- prefix more network-dependent commands with travis_retry
Finally, improve docs building setup:
- Factor out sphinx from "dev" extras_require to its own "docs" extras_require.
- Add a .readthedocs.yml to customize the readthedocs build.
Use pip and the "docs" extras_require to get an up-to-date Sphinx version.
Fixes some broken :ref:`addendum:...` autosectionlabel links in learning-from-bidict.
2018-04-10 04:31:29 +00:00
|
|
|
### Enable coverage for the most recent available CPython 2 and 3 releases and PyPy 3.
|
|
|
|
#### Latest stable CPython 2 available -> enable coverage.
|
2017-11-21 03:27:26 +00:00
|
|
|
- python: "2.7"
|
|
|
|
env: TASK=test COVERAGE=1
|
2017-11-18 03:35:40 +00:00
|
|
|
if: branch = master
|
strengthen too-weak assume(..) in test_eq_ne_hash, use "max_examples=5000" for nightly CI jobs, add .readthedocs.yml
The `assume(init_items != init_unequal)` was not sufficient
because it would allow cases like:
bi_cls=bidict, other_cls=bidict, init_items=[(1, 0), (0, 1)], init_unequal=[(0, 1), (1, 0)]
causing the resulting bidicts' item sets to still be equal,
so assertions like
assert items_match(some_bidict, other_unequal, relation=ne)
would fail.
Changing the assume to
assume(set(init_items) != set(init_unequal))
fixes the issue.
Surprisingly, hypothesis only just found a failing example for this
for the first time (in https://travis-ci.org/jab/bidict/jobs/363962257)
despite having numerous opportunities to find it before.
Using a new max_examples=5000 hypothesis profile, only on nightly CI,
should help surface any remaining issues that hypothesis hasn't found yet,
without slowing commit-triggered tests with too much example generation.
Also improve Travis config:
- ditch ALLOW_FAIL=1, for some reason it didn't work
- comment out python 3.7-dev job while Travis is stuck on an old 3.7 alpha
- don't use "- |" command block where we want to see output after each command
- prefix more network-dependent commands with travis_retry
Finally, improve docs building setup:
- Factor out sphinx from "dev" extras_require to its own "docs" extras_require.
- Add a .readthedocs.yml to customize the readthedocs build.
Use pip and the "docs" extras_require to get an up-to-date Sphinx version.
Fixes some broken :ref:`addendum:...` autosectionlabel links in learning-from-bidict.
2018-04-10 04:31:29 +00:00
|
|
|
#### Latest stable CPython 3 available -> enable coverage.
|
2017-11-21 03:27:26 +00:00
|
|
|
- python: "3.6"
|
|
|
|
env: TASK=test COVERAGE=1
|
2017-11-18 03:35:40 +00:00
|
|
|
if: branch = master
|
strengthen too-weak assume(..) in test_eq_ne_hash, use "max_examples=5000" for nightly CI jobs, add .readthedocs.yml
The `assume(init_items != init_unequal)` was not sufficient
because it would allow cases like:
bi_cls=bidict, other_cls=bidict, init_items=[(1, 0), (0, 1)], init_unequal=[(0, 1), (1, 0)]
causing the resulting bidicts' item sets to still be equal,
so assertions like
assert items_match(some_bidict, other_unequal, relation=ne)
would fail.
Changing the assume to
assume(set(init_items) != set(init_unequal))
fixes the issue.
Surprisingly, hypothesis only just found a failing example for this
for the first time (in https://travis-ci.org/jab/bidict/jobs/363962257)
despite having numerous opportunities to find it before.
Using a new max_examples=5000 hypothesis profile, only on nightly CI,
should help surface any remaining issues that hypothesis hasn't found yet,
without slowing commit-triggered tests with too much example generation.
Also improve Travis config:
- ditch ALLOW_FAIL=1, for some reason it didn't work
- comment out python 3.7-dev job while Travis is stuck on an old 3.7 alpha
- don't use "- |" command block where we want to see output after each command
- prefix more network-dependent commands with travis_retry
Finally, improve docs building setup:
- Factor out sphinx from "dev" extras_require to its own "docs" extras_require.
- Add a .readthedocs.yml to customize the readthedocs build.
Use pip and the "docs" extras_require to get an up-to-date Sphinx version.
Fixes some broken :ref:`addendum:...` autosectionlabel links in learning-from-bidict.
2018-04-10 04:31:29 +00:00
|
|
|
#### Other CPython versions -> no coverage.
|
2018-04-19 08:22:07 +00:00
|
|
|
##### Supported previous stable releases:
|
2017-11-21 03:27:26 +00:00
|
|
|
- python: "3.5"
|
|
|
|
env: TASK=test
|
2017-11-18 03:35:40 +00:00
|
|
|
if: branch = master
|
2018-04-19 08:22:07 +00:00
|
|
|
- python: "3.4"
|
|
|
|
env: TASK=test
|
|
|
|
if: branch = master
|
strengthen too-weak assume(..) in test_eq_ne_hash, use "max_examples=5000" for nightly CI jobs, add .readthedocs.yml
The `assume(init_items != init_unequal)` was not sufficient
because it would allow cases like:
bi_cls=bidict, other_cls=bidict, init_items=[(1, 0), (0, 1)], init_unequal=[(0, 1), (1, 0)]
causing the resulting bidicts' item sets to still be equal,
so assertions like
assert items_match(some_bidict, other_unequal, relation=ne)
would fail.
Changing the assume to
assume(set(init_items) != set(init_unequal))
fixes the issue.
Surprisingly, hypothesis only just found a failing example for this
for the first time (in https://travis-ci.org/jab/bidict/jobs/363962257)
despite having numerous opportunities to find it before.
Using a new max_examples=5000 hypothesis profile, only on nightly CI,
should help surface any remaining issues that hypothesis hasn't found yet,
without slowing commit-triggered tests with too much example generation.
Also improve Travis config:
- ditch ALLOW_FAIL=1, for some reason it didn't work
- comment out python 3.7-dev job while Travis is stuck on an old 3.7 alpha
- don't use "- |" command block where we want to see output after each command
- prefix more network-dependent commands with travis_retry
Finally, improve docs building setup:
- Factor out sphinx from "dev" extras_require to its own "docs" extras_require.
- Add a .readthedocs.yml to customize the readthedocs build.
Use pip and the "docs" extras_require to get an up-to-date Sphinx version.
Fixes some broken :ref:`addendum:...` autosectionlabel links in learning-from-bidict.
2018-04-10 04:31:29 +00:00
|
|
|
#### Next (in-development) version:
|
|
|
|
##### Ditch while stuck on old 3.7-alpha pending https://github.com/travis-ci/travis-ci/issues/9069
|
|
|
|
#####- python: 3.7-dev
|
|
|
|
##### env: TASK=test
|
|
|
|
##### if: branch = master
|
|
|
|
#### Latest stable PyPy 3 available -> enable coverage.
|
2017-11-21 03:27:26 +00:00
|
|
|
- python: pypy3
|
2017-11-21 04:07:46 +00:00
|
|
|
env: TASK=test COVERAGE=1
|
2017-11-18 03:35:40 +00:00
|
|
|
if: branch = master
|
strengthen too-weak assume(..) in test_eq_ne_hash, use "max_examples=5000" for nightly CI jobs, add .readthedocs.yml
The `assume(init_items != init_unequal)` was not sufficient
because it would allow cases like:
bi_cls=bidict, other_cls=bidict, init_items=[(1, 0), (0, 1)], init_unequal=[(0, 1), (1, 0)]
causing the resulting bidicts' item sets to still be equal,
so assertions like
assert items_match(some_bidict, other_unequal, relation=ne)
would fail.
Changing the assume to
assume(set(init_items) != set(init_unequal))
fixes the issue.
Surprisingly, hypothesis only just found a failing example for this
for the first time (in https://travis-ci.org/jab/bidict/jobs/363962257)
despite having numerous opportunities to find it before.
Using a new max_examples=5000 hypothesis profile, only on nightly CI,
should help surface any remaining issues that hypothesis hasn't found yet,
without slowing commit-triggered tests with too much example generation.
Also improve Travis config:
- ditch ALLOW_FAIL=1, for some reason it didn't work
- comment out python 3.7-dev job while Travis is stuck on an old 3.7 alpha
- don't use "- |" command block where we want to see output after each command
- prefix more network-dependent commands with travis_retry
Finally, improve docs building setup:
- Factor out sphinx from "dev" extras_require to its own "docs" extras_require.
- Add a .readthedocs.yml to customize the readthedocs build.
Use pip and the "docs" extras_require to get an up-to-date Sphinx version.
Fixes some broken :ref:`addendum:...` autosectionlabel links in learning-from-bidict.
2018-04-10 04:31:29 +00:00
|
|
|
#### Latest stable PyPy 2 -> no coverage.
|
2017-11-21 03:27:26 +00:00
|
|
|
- python: pypy
|
|
|
|
env: TASK=test
|
2017-11-18 03:35:40 +00:00
|
|
|
if: branch = master
|
|
|
|
|
2017-11-16 20:44:51 +00:00
|
|
|
|
2017-11-21 03:27:26 +00:00
|
|
|
## macOS
|
2018-02-13 01:34:33 +00:00
|
|
|
### Commented out pending https://github.com/travis-ci/travis-ci/issues/2312
|
2017-12-18 02:42:46 +00:00
|
|
|
####- python: "2.7"
|
|
|
|
#### env: TASK=test
|
|
|
|
#### if: branch = master
|
|
|
|
#### os: osx
|
|
|
|
#### osx_image: xcode9.2
|
2014-09-23 14:08:21 +00:00
|
|
|
|
2017-11-21 03:27:26 +00:00
|
|
|
# One-off jobs. Override "install", "before_install", and "script" to do each of these instead.
|
|
|
|
- env: TASK=pydocstyle
|
2018-03-27 09:40:42 +00:00
|
|
|
before_install: skip
|
2017-11-21 03:27:26 +00:00
|
|
|
install: travis_retry pip install pydocstyle
|
2018-04-07 04:39:32 +00:00
|
|
|
script: pydocstyle $LINT_SRC
|
2017-11-21 03:27:26 +00:00
|
|
|
- env: TASK=build-docs
|
2018-03-27 09:40:42 +00:00
|
|
|
before_install: skip
|
2017-11-21 03:27:26 +00:00
|
|
|
install: travis_retry pip install Sphinx
|
2018-04-06 04:28:44 +00:00
|
|
|
script:
|
|
|
|
- ./build-docs.sh
|
|
|
|
- cd docs
|
|
|
|
- travis_retry make linkcheck
|
2017-11-21 03:27:26 +00:00
|
|
|
- env: TASK=flake8
|
2018-03-27 09:40:42 +00:00
|
|
|
before_install: skip
|
2017-11-21 03:27:26 +00:00
|
|
|
install: travis_retry pip install flake8
|
2018-04-07 04:39:32 +00:00
|
|
|
script: flake8 $LINT_SRC
|
2017-11-21 03:27:26 +00:00
|
|
|
- env: TASK=pylint
|
|
|
|
before_install: travis_retry pip install .[test]
|
|
|
|
install: travis_retry pip install pylint
|
2018-04-07 05:22:36 +00:00
|
|
|
script: pylint --jobs=0 $LINT_SRC
|
2017-11-21 03:27:26 +00:00
|
|
|
- env: TASK=test-with-optimization-flag # make sure there are no relied-on side effects in assert statements
|
2018-03-27 09:40:42 +00:00
|
|
|
before_install: skip
|
|
|
|
install: skip
|
2017-11-21 03:27:26 +00:00
|
|
|
script: python -O -m doctest -o IGNORE_EXCEPTION_DETAIL -o ELLIPSIS tests/*.txt
|
2014-09-23 14:08:21 +00:00
|
|
|
|
2018-03-27 09:40:42 +00:00
|
|
|
- stage: deploy-if-tag
|
|
|
|
env: TASK=deploy-if-tag
|
|
|
|
before_install: skip
|
|
|
|
install: skip
|
|
|
|
script: skip
|
|
|
|
deploy:
|
|
|
|
- provider: pypi
|
|
|
|
user: jab
|
|
|
|
password:
|
|
|
|
secure: B9LLgXkTbtjeC/IbH4wh9PEBzvKEAuYo3EBNW5f1xuLqVqtsysIyxJa5ar/FQ4qwUCBwZPFAXFurN3lLzRhb2Tc04YQ0GYVv6f8lkzwrjoWau4iB9Qt/nnvdRa7KryEJvtenHCAnwoEUaADCjkZjwo6fIA0hEOLB6/AYfhfgXYA=
|
|
|
|
on:
|
|
|
|
tags: true
|
|
|
|
|
2017-11-20 15:01:49 +00:00
|
|
|
|
2017-11-16 20:44:51 +00:00
|
|
|
before_cache:
|
|
|
|
- rm -rf $HOME/.cache/pip/log
|
2016-01-13 16:54:29 +00:00
|
|
|
|
2018-01-16 01:34:18 +00:00
|
|
|
|
2016-01-13 16:54:29 +00:00
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- $HOME/.cache/pip
|
2016-06-28 04:05:22 +00:00
|
|
|
- $HOME/.hypothesis
|
2014-12-17 23:47:48 +00:00
|
|
|
|
2015-03-22 18:21:15 +00:00
|
|
|
|
|
|
|
notifications:
|
|
|
|
webhooks:
|
|
|
|
urls:
|
|
|
|
- https://webhooks.gitter.im/e/bf64fb45a633c0935b9b
|
2017-11-16 20:44:51 +00:00
|
|
|
email:
|
|
|
|
recipients: jab@math.brown.edu
|