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

Commit

Permalink
CI template
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed Aug 7, 2018
1 parent aba20dd commit 5e5db51
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 35 deletions.
11 changes: 0 additions & 11 deletions .coveragerc

This file was deleted.

20 changes: 10 additions & 10 deletions .travis.yml
Expand Up @@ -8,11 +8,11 @@ git:
quiet: true

python:
- 3.6
- 3.7
- 3.6
- 3.7

os:
- linux
- linux

addons:
apt:
Expand All @@ -22,13 +22,13 @@ addons:
install: pip install -e .[tests]

script:
- pytest -sv
- flake8
- mypy . --ignore-missing-imports
- pytest -rsv
- flake8
- mypy . --ignore-missing-imports

after_success:
- if [[ $TRAVIS_PYTHON_VERSION == 3.6* ]]; then
pytest --cov;
coveralls;
fi
- if [[ $TRAVIS_PYTHON_VERSION == 3.6* ]]; then
pytest --cov;
coveralls;
fi

27 changes: 15 additions & 12 deletions setup.cfg
@@ -1,9 +1,9 @@
[metadata]
name = demof2py
version = 0.5.0
url = https://github.com/scivision/f2pyExamples
description = demo Python wrap of Fortran
author = Michael Hirsch, Ph.D.
description = demo Python wrap of Fortran
url = https://github.com/scivision/f2pyExamples
keywords =
fortran
f2py
Expand All @@ -12,6 +12,7 @@ classifiers =
Environment :: Console
Intended Audience :: End Users/Desktop
Operating System :: OS Independent
Programming Language :: Fortran
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
license_file = LICENSE
Expand All @@ -20,16 +21,17 @@ long_description_content_type = text/markdown

[options]
python_requires = >= 2.7
setup_requires =
setup_requires =
setuptools >= 38.6
pip >= 10
twine >= 1.11
include_package_data = True
packages = find:
install_requires =
numpy

[options.extras_require]
tests =
tests =
pytest
pytest-cov
coveralls
Expand All @@ -49,17 +51,18 @@ omit =
/home/travis/virtualenv/*
*/site-packages/*
*/bin/*
*/build/*

[coverage:report]
exclude_lines =
pragma: no cover
def __repr__
RuntimeError
NotImplementedError
ImportError
KeyError
FileNotFoundError
CalledProcessError
except RuntimeError
except NotImplementedError
except ImportError
except FileNotFoundError
except CalledProcessError
logging.warning
ValueError
TypeError
logging.error
logging.critical
if __name__ == .__main__.:
5 changes: 3 additions & 2 deletions tests/test_all.py
Expand Up @@ -2,6 +2,7 @@
import numpy as np
from pyprod import prod
import pytest
from pytest import approx


def test_main():
Expand All @@ -16,7 +17,7 @@ def test_main():
znointent = prod.prodnointent(x, y, znoint)
assert znointent is None
# unmodified due to f2py intent(in) by default
assert np.isclose(znoint, 12345.)
assert znoint == approx(12345.)
# %%
zpure = prod.prodpure(x, y)
assert zpure == x*y
Expand All @@ -28,4 +29,4 @@ def test_main():


if __name__ == '__main__':
pytest.main()
pytest.main(['-x', __file__])

0 comments on commit 5e5db51

Please sign in to comment.