Skip to content

Commit

Permalink
ci template
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed Jan 28, 2019
1 parent f099aca commit e6ad968
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 154 deletions.
4 changes: 2 additions & 2 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
image:
- Visual Studio 2017
- Ubuntu
- Ubuntu1804

stack: python 3

Expand All @@ -19,7 +19,7 @@ init:
install:
- pip install -e .[tests]

- cd bin
- cd build
- cmd: cmake -G "MinGW Makefiles" -DCMAKE_SH="CMAKE_SH-NOTFOUND" ..
- sh: cmake ..
- cmake --build .
Expand Down
20 changes: 20 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[run]
cover_pylib = false
omit =
/home/travis/virtualenv/*
*/site-packages/*
*/bin/*

[report]
exclude_lines =
pragma: no cover
def __repr__
except RuntimeError
except NotImplementedError
except ImportError
except FileNotFoundError
except CalledProcessError
logging.warning
logging.error
logging.critical
if __name__ == .__main__.:
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@

build/
.pytest_cache/
bin/

Expand Down
17 changes: 5 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
language: python
group: travis_latest
dist: xenial

git:
depth: 3
Expand All @@ -19,23 +20,15 @@ addons:
packages: gfortran-6


before_install:
- if [[ $TRAVIS_OS_NAME == osx ]]; then
brew update > /dev/null;
brew install gcc > /dev/null || brew link --overwrite gcc > /dev/null;
export FC=gfortran;
brew install opencoarrays > /dev/null;
fi

install:
- pip install -e .[tests]
- pip install -e .[tests,cov]

- cd bin
- cd build
- cmake ..
- cmake --build .

script:
- ctest -V
- ctest --output-on-failure
- cd ..

- pytest -rsv
Expand All @@ -44,7 +37,7 @@ script:

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

14 changes: 3 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
[![Coverage Status](https://coveralls.io/repos/github/scivision/lineclipping-python-fortran/badge.svg?branch=master)](https://coveralls.io/github/scivision/lineclipping-python-fortran?branch=master)
[![AppVeyor](https://ci.appveyor.com/api/projects/status/cr0omkhjvgwcyxiy?svg=true)](https://ci.appveyor.com/project/scivision/lineclipping-python-fortran)
[![PyPi versions](https://img.shields.io/pypi/pyversions/pylineclip.svg)](https://pypi.python.org/pypi/pylineclip)
[![PyPi wheels](https://img.shields.io/pypi/format/pylineclip.svg)](https://pypi.python.org/pypi/pylineclip)
[![PyPi Download stats](http://pepy.tech/badge/pylineclip)](http://pepy.tech/project/pylineclip)

# Line clipping

- `lineClipping.jl` Cohen-Sutherland line clipping algorithm for Julia.
Input scalars, output intersection length, or `None` if no intersection.
- `lineclipping.f90` Cohen-Sutherland line clipping algorithm for
massively parallel coarray modern Fortran. Input scalars or arrays,
output intersections or `NaN` if no intersection.
- `lineClipping.py` Cohen-Sutherland line clipping algorithm for Python.
Input scalars, output intersection length, or `None` if no intersection.


Julia line clipping is at https://github.com/scivision/lineclipping-julia

## Install

Expand Down Expand Up @@ -71,11 +71,3 @@ The arguments are:
in - endpoints of line
out - intersection points with box. If no intersection, all NaN

### Julia

Simliar to Python, except `nothing` is returned if no intersection
found.

```julia
cohensutherland(xmin, ymax, xmax, ymin, x1, y1, x2, y2)
```
File renamed without changes.
109 changes: 0 additions & 109 deletions lineClipping.jl

This file was deleted.

21 changes: 1 addition & 20 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ install_requires =
[options.extras_require]
tests =
pytest
cov =
pytest-cov
coveralls
flake8
Expand All @@ -49,23 +50,3 @@ console_scripts =
max-line-length = 132
exclude = .git,__pycache__,.eggs/,doc/,docs/,build/,dist/,archive/

[coverage:run]
cover_pylib = false
omit =
/home/travis/virtualenv/*
*/site-packages/*
*/bin/*

[coverage:report]
exclude_lines =
pragma: no cover
def __repr__
except RuntimeError
except NotImplementedError
except ImportError
except FileNotFoundError
except CalledProcessError
logging.warning
logging.error
logging.critical
if __name__ == .__main__.:

0 comments on commit e6ad968

Please sign in to comment.