Skip to content

Commit

Permalink
Add isort configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
fitodic committed Nov 26, 2017
1 parent c3287de commit 46b2b2a
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ install:
- "pip install GDAL==$GDALVERSION"
- "pip install -e .[test]"
before_script:
- pip install flake8
- pip install flake8 isort
- flake8
- isort --recursive --check-only
script:
- pytest
after_success:
Expand Down
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

### Added

- `flake8` configuration
- `flake8` checks in the Travis build
- `flake8` and `isort` configuration
- `flake8` and `isort` checks in the Travis build
- `utils` and `io` modules
- `create_centerlines` script and function for creating centerlines that is format agnotic. All OGR vector file formats should be supported.

Expand Down
9 changes: 9 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
[isort]
# Reference: https://github.com/timothycrosley/isort/wiki/isort-Settings
skip=.git,__pycache__,docs,build,dist,*.egg*
atomic=true
multi_line_output=5
known_third_party=numpy,scipy,fiona,osgeo,shapely
known_first_party=centerline
sections=FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER

[flake8]
# Reference: https://flake8.readthedocs.io/en/latest/user/configuration.html
exclude = .git,__pycache__,docs,build,dist,*.egg*
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@
'ipdb',
'ipython[all]',
'notebook',
'jupyter'
'jupyter',
'isort'
],
'test': [
'coverage',
'pytest>=3.0.0',
'pytest-cov',
'pytest-sugar',
'pytest-runner',
'tox'
'pytest-runner'
],
},
scripts=[
Expand Down
1 change: 1 addition & 0 deletions tests/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from unittest import TestCase

import fiona

from centerline.io import create_centerlines

TESTS_DIR = os.path.dirname(os.path.abspath(__file__))
Expand Down
6 changes: 4 additions & 2 deletions tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

from unittest import TestCase

from shapely.geometry import (GeometryCollection, LineString, MultiLineString,
MultiPoint, MultiPolygon, Point, Polygon)
from shapely.geometry import (
GeometryCollection, LineString, MultiLineString, MultiPoint, MultiPolygon,
Point, Polygon
)

from centerline import Centerline

Expand Down

0 comments on commit 46b2b2a

Please sign in to comment.