Skip to content

Commit

Permalink
Merge pull request SALib#285 from ConnectedSystems/update-travis-config
Browse files Browse the repository at this point in the history
Update travis and package config
  • Loading branch information
willu47 committed Mar 22, 2020
2 parents 2fc1f2c + ee7536f commit 63ecc17
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ sudo: false
language: python
env:
matrix:
- DISTRIB="conda" PYTHON_VERSION="3.5" COVERAGE="true"
- DISTRIB="conda" PYTHON_VERSION="3.6" COVERAGE="false"
- DISTRIB="conda" PYTHON_VERSION="3.5" COVERAGE="false"
- DISTRIB="conda" PYTHON_VERSION="3.6" COVERAGE="true"
- DISTRIB="conda" PYTHON_VERSION="3.7" COVERAGE="false"
- DISTRIB="conda" PYTHON_VERSION="3.8" COVERAGE="false"
matrix:
allow_failures:
- env: DISTRIB="conda" PYTHON_VERSION="3.5" COVERAGE="false"
- env: DISTRIB="conda" PYTHON_VERSION="3.8" COVERAGE="false"
addons:
apt:
Expand All @@ -19,7 +20,7 @@ install:
- pip install -r test-requirements.txt
script:
- python setup.py develop
- python setup.py test
- pytest
after_success:
- if [[ "$COVERAGE" == "true" ]]; then coveralls || echo "failed"; fi
notifications:
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ First, create a new issue on Github with the label `bug`. Use this to describe t

Then, please create a new branch with the name `bug_xxx` where xxx is the number of the issue.

If possible, write a test which reproduces the bug. The tests are stored in the `SALib/tests/` folder, and are run using `pytest`. You can run the tests with the command `python setup.py test` from the root folder of the library.
If possible, write a test which reproduces the bug. The tests are stored in the `SALib/tests/` folder, and are run using `pytest` from the root folder of the library. You can run the tests with the command `python setup.py test`.

Then, fix the bug in the code so that the test passes.

Expand Down
4 changes: 2 additions & 2 deletions docs/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ To test your installation of SALib, run the following command

::

python setup.py test
pytest

Alternatively, if you’d like also like a taste of what SALib provides,
start a new interactive Python session
Expand Down Expand Up @@ -82,7 +82,7 @@ and copy/paste the code below.
Si = sobol.analyze(problem, Y, print_to_console=True)
# Print the first-order sensitivity indices
print Si['S1']
print(Si['S1'])
If installed correctly, the last line above will print three values, similar
to :code:`[ 0.30644324 0.44776661 -0.00104936]`.
7 changes: 6 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ exclude =
# Add here additional requirements for extra features, to install with:
# `pip install SALib[PDF]` like:
gurobipy = gurobipy
testing =
pytest
pytest-cov

[options.entry_points]
console_scripts =
Expand All @@ -64,7 +67,8 @@ console_scripts =

[test]
# py.test options when running `python setup.py test`
addopts = tests
# addopts = tests
extras = True

[tool:pytest]
# Options for py.test:
Expand All @@ -77,6 +81,7 @@ norecursedirs =
dist
build
.tox
testpaths = tests

[aliases]
release = sdist bdist_wheel upload
Expand Down

0 comments on commit 63ecc17

Please sign in to comment.