Skip to content

Commit b2d5b70

Browse files
authored
Drop Py35, update guides, Makefile, and CI config (#251)
Copied over some updated guides and CI configuration from Fatiando a Terra. Includes a maintenance guide for review PRs and making releases. Some Makefile rules have changed to make things simpler. Also decided to drop Python 3.5 so we don't have to test against it or be limited by things that are 3.6+ only. Should be OK since most people are on 2.7 or 3.6 and Anaconda now ships with 3.7 by default. Simplified the README as well because PyPI will fail to render the `raw` rst directive. Fixes some lint errors because of an update in pylint. Adds names to the Travis CI builds to make the matrix easier to read.
1 parent 0c19dfb commit b2d5b70

25 files changed

+531
-743
lines changed

.pylintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ confidence=
5050
# --enable=similarities". If you want to run only the classes checker, but have
5151
# no Warning level messages displayed, use"--disable=all --enable=classes
5252
# --disable=W"
53-
disable=print-statement,parameter-unpacking,unpacking-in-except,old-raise-syntax,backtick,long-suffix,old-ne-operator,old-octal-literal,import-star-module-level,raw-checker-failed,bad-inline-option,locally-disabled,locally-enabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,apply-builtin,basestring-builtin,buffer-builtin,cmp-builtin,coerce-builtin,execfile-builtin,file-builtin,long-builtin,raw_input-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,no-absolute-import,old-division,dict-iter-method,dict-view-method,next-method-called,metaclass-assignment,indexing-exception,raising-string,reload-builtin,oct-method,hex-method,nonzero-method,cmp-method,input-builtin,round-builtin,intern-builtin,unichr-builtin,map-builtin-not-iterating,zip-builtin-not-iterating,range-builtin-not-iterating,filter-builtin-not-iterating,using-cmp-argument,eq-without-hash,div-method,idiv-method,rdiv-method,exception-message-attribute,invalid-str-codec,sys-max-int,bad-python3-import,deprecated-string-function,deprecated-str-translate-call,attribute-defined-outside-init,bad-continuation
53+
disable=print-statement,parameter-unpacking,unpacking-in-except,old-raise-syntax,backtick,long-suffix,old-ne-operator,old-octal-literal,import-star-module-level,raw-checker-failed,bad-inline-option,locally-disabled,locally-enabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,apply-builtin,basestring-builtin,buffer-builtin,cmp-builtin,coerce-builtin,execfile-builtin,file-builtin,long-builtin,raw_input-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,no-absolute-import,old-division,dict-iter-method,dict-view-method,next-method-called,metaclass-assignment,indexing-exception,raising-string,reload-builtin,oct-method,hex-method,nonzero-method,cmp-method,input-builtin,round-builtin,intern-builtin,unichr-builtin,map-builtin-not-iterating,zip-builtin-not-iterating,range-builtin-not-iterating,filter-builtin-not-iterating,using-cmp-argument,eq-without-hash,div-method,idiv-method,rdiv-method,exception-message-attribute,invalid-str-codec,sys-max-int,bad-python3-import,deprecated-string-function,deprecated-str-translate-call,attribute-defined-outside-init,bad-continuation,import-error
5454

5555
# Enable the message, report, category or checker with the given id(s). You can
5656
# either give multiple identifier separated by comma (,) or put this option

.travis.yml

Lines changed: 45 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,77 @@
1+
# Configuration file for TravisCI
2+
3+
# We use miniconda for Python so don't need any Python specific tools
14
language: generic
25

6+
# Use the container builds so we don't need sudo priviledges
37
sudo: false
48

9+
# Only build pushes to the master branch and tags. This avoids the double
10+
# builds than happen when working on a branch instead of a fork.
511
branches:
612
only:
713
- master
814
# Regex to build tagged commits with version numbers
915
- /\d+\.\d+(\.\d+)?(\S*)?$/
1016

17+
# Define environment variables common to all builds
1118
env:
1219
global:
13-
# CODACY_PROJECT_TOKEN to upload coverage to codacy
14-
- secure: "neO+GkXP+ohhnfAg+VUh7kPQtaXNASv6levimV8hzj7Cd+nv9xrzPeq56Goh/TAeoYscM/IUB/vK6xwYfJOJeS2c4jsPqzqXZl+LIaxxU+HvvTewLnYNpg/+uKJ6sGVArC67DVTl9M6sJG2+AxoqB/0xJ46YAhH6a2bwXbMl1h/UILxy15oqTtFsgga0NPikVLLra00U5kChVjbkahPOgLuntLTMr62AJ92MZPy3jgCjVQO944KhCs1yy0LiErLTgFu2N8pTl62ZBVK40B6KkLepcJmRBCC6+qrG4ZRCHXIZyp/qs/YYxXVBSTEW/coQmZ9pNVVsPxTC+9x0otMAHeePp5/Nk9zt4m2R6AF+sN2da0NHwBK98JXSIQWi50hFeYaTSYaeaL6vSB3ievLkE+pku22hYEU5h9fBql4pnok4QUbyGSAQdxKDOuUEus1+3+H1PwksLpiwcImHfH0T5z+jxwfNHnjdhtADc/zgpGR0v0FIMMCauknjNCzRoUBBPDbmQyQFzP+0KityySA0SXKP8L9bOUxRcf1BDi5G96i0RWKCYRGet7OaQ5ynt3Z8X4ery2S3nCx4CmSXX3C0NSfeZu3Pkof+fcOdvxh+orOvRCqRJ9hh7lZyyB4kecGjJJbF5JC3rXE5efcWBgDOzhJevU5hDH2lURKeJBpeN1Y="
20+
# Encrypted variables
1521
# Github Token for pushing the built docs (GH_TOKEN)
1622
- secure: "QII0477v0mmCCW3qSNXLCOtqraJaCICtSghiyrxYsuUdJTrXzXBNhX2KLIjcKYXOK1HdwYOFGf8xBVLl44clHlAW7R32ecEGeTJizr0yqTBvT3rNG1Xb7+E6jdXqrIs//PmPRaF8zOZxPl1SJKDK4jJpCx5HnAflg7wl/6tQLD6K3/dQ6FG2s3UKsc8o4qchOiEfxYhOuKo3jt2S0HdsNAQFw3mFHCCrclxDr3llSQtWSY0mirZnta7AI4nMvzxl2nUhdHEpxgzIjWxCWLAwmj3/NxLz0VSgNCtl2bNYk6AYrc5RcANGk2fcYaZr9mTU3Aax60S4389B39Pq95hBN21jYdbw9vCN810dYpTUk2siLysx8gF6r2JWEF8SskXlF79r3phtaFTMOS4GqeiuwjifZeaLAL/H1PTQFDDG/UKEwBpLuzrPMDw/84iRtyWKqWR/f14YdKhH4YAkcOuRglEXiI/1A0qWKiZ1iZfky8Tys+wN5nyss23w/JeYXVgBdTkNzvp3diFWK8+Wl9j3HYpX9LlEHJwASA1wHLL85t4ToymgLjo9gvLvwzB7T+fWNtEbh4ELbvI7jaKrvir8uSGYy4bGbfRclh5CktD//mTLhDyAsQDS8obF/Ri9mVqFzjK6417ORfu8qnpXU+mIHPRBoKvpS2WqnPtSwF8KPv8="
1723
# TWINE_PASSWORD to deploy to PyPI
1824
- secure: "md4fgPt9RC/sCoN5//5PcNHLUd9gWQGewV5hFpWW88MRTjxTng1Zfs8r7SqlF2AkEEepFfyzq0BEe9c3FMAnFbec3KmqdlQen4V8xDbLrcTlvkPlTrYGbAScUvdhhqojB//hMHoTD4KvxAv9CiUwFBO4hCMmj2buWHUbV9Ksu5WCW9mF/gkt/hIuYAU6Mbwt8PiYyMgUpzMHO1vruofcWRaVnvKwmBqHB0ae86D4/drpwn4CWjlM12WUnphT2bssiyPkw24FZtCN6kPVta6bLZKBxu0bZpw2vbXuUG+Yh19Q4mp8wNYT3XSHJf8Hl5LfujF48+cLWu+6rlCkdcelyVylhWLFc3rGOONAv4G8jWW2yNSz/bLQfJnMpd81fQEu5eySmFxB7mdB0uyKpvIG1jMJQ73LlYKakKLAPdYhMFyQAHoX9gvCE3S4QR95DBMi5gM/pZubOCcMLdjPHB5JKpJHSjxbOzyVwgmsUIEgd5Bi2vZvvYQXn1plk4xpQ3PhXc+/gi33bzY89mKcfOn0HJ2pD1vLqDXRCBsMCakoLZ0JB/6bacaz4FngbsGWuQ+I1cz20lJGL/MSi9bW1G7Uoidt3GXXWDmXrWt70vIXlLIxr8XV0Mu/rPbauGgWE+ZSYEfvdM5sP+FNF7vQ5de+Fkvzg5Z3tTfR+O1W+d7+vM4="
1925
- TWINE_USERNAME=Leonardo.Uieda
20-
- COVERAGE=false
26+
# The file with the listed requirements to be installed by conda
27+
- CONDA_REQUIREMENTS=requirements.txt
28+
- CONDA_REQUIREMENTS_DEV=requirements-dev.txt
29+
# Get GMT6 from the development channel
30+
- CONDA_EXTRA_CHANNEL=conda-forge/label/dev
31+
# These variables control which actions are performed in a build
32+
- TEST=false
2133
- CHECK=false
2234
- BUILD_DOCS=false
2335
- DEPLOY_DOCS=false
2436
- DEPLOY_PYPI=false
25-
- CONDA_REQUIREMENTS="requirements.txt"
26-
# Get GMT6 from the development channel
27-
- CONDA_EXTRA_CHANNEL=conda-forge/label/dev
2837

2938
matrix:
3039
# Build under the following configurations
3140
include:
32-
- os: linux
41+
- name: "Style checks"
42+
os: linux
3343
env:
34-
- PYTHON=3.5
44+
- PYTHON=3.6
45+
- CHECK=true
46+
# Don't need to install everything just to run the style checks
47+
- CONDA_INSTALL_EXTRA="black flake8 pylint"
48+
- CONDA_REQUIREMENTS=""
49+
- CONDA_REQUIREMENTS_DEV=""
50+
- name: "Linux - Python 3.7"
51+
os: linux
52+
env:
53+
- PYTHON=3.7
54+
- TEST=true
3555
- BUILD_DOCS=true
36-
- os: linux
56+
- name: "Linux - Python 3.6 (also deploys)"
57+
os: linux
3758
env:
3859
- PYTHON=3.6
39-
- COVERAGE=true
40-
- CHECK=true
60+
- TEST=true
4161
- BUILD_DOCS=true
4262
- DEPLOY_DOCS=true
4363
- DEPLOY_PYPI=true
44-
- os: linux
64+
- name: "Mac - Python 3.7"
65+
os: osx
4566
env:
4667
- PYTHON=3.7
68+
- TEST=true
4769
- BUILD_DOCS=true
48-
- os: osx
49-
env:
50-
- PYTHON=3.5
51-
- BUILD_DOCS=true
52-
- os: osx
70+
- name: "Mac - Python 3.6"
71+
os: osx
5372
env:
5473
- PYTHON=3.6
55-
- COVERAGE=true
56-
- BUILD_DOCS=true
57-
- os: osx
58-
env:
59-
- PYTHON=3.7
74+
- TEST=true
6075
- BUILD_DOCS=true
6176

6277
before_install:
@@ -65,9 +80,6 @@ before_install:
6580
# Download and install miniconda and setup dependencies
6681
# Need to source the script to set the PATH variable globaly
6782
- source continuous-integration/travis/setup-miniconda.sh
68-
- if [ "$COVERAGE" == "true" ]; then
69-
pip install codecov codacy-coverage codeclimate-test-reporter;
70-
fi
7183
# Show installed pkg information for postmortem diagnostic
7284
- conda list
7385

@@ -78,31 +90,27 @@ install:
7890

7991
script:
8092
# Check code for style and lint for code quality
81-
# Black is Python 3.6 only so it can't be in the requirements file.
8293
- if [ "$CHECK" == "true" ]; then
83-
conda install --yes --quiet black python=$PYTHON;
8494
make check;
95+
make lint;
8596
fi
8697
# Run the test suite. Make pytest report any captured output on stdout or stderr.
87-
- if [ "$COVERAGE" == "true" ]; then
88-
make coverage PYTEST_EXTRA="-r P";
89-
else
90-
make test PYTEST_EXTRA="-r P";
98+
- if [ "$TEST" == "true" ]; then
99+
pip install codecov;
100+
make test PYTEST_EXTRA="-r P";
91101
fi
92102
# Build the documentation
93103
- if [ "$BUILD_DOCS" == "true" ]; then
94104
make -C doc all;
95105
fi
96106

107+
# Things to do if the build is successful
97108
after_success:
98-
- if [ "$COVERAGE" == "true" ]; then
109+
# Upload coverage information
110+
- if [ "$TEST" == "true" ]; then
111+
coverage xml;
99112
echo "Uploading coverage to Codecov";
100113
codecov -e PYTHON;
101-
coverage xml;
102-
echo "Uploading coverage to Codacy";
103-
python-codacy-coverage -r coverage.xml;
104-
echo "Uploading coverage to Code Climate";
105-
codeclimate-test-reporter;
106114
fi
107115

108116
deploy:

AUTHORS.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
11
# Project Contributors
22

3-
## History
4-
53
This project was started in 2017 by [Leonardo Uieda](http://www.leouieda.com)
6-
during
7-
[an NSF funded postdoc](http://www.leouieda.com/blog/hawaii-gmt-postdoc.html)
8-
with [Paul Wessel](http://www.soest.hawaii.edu/wessel)
9-
at the University of Hawaii.
10-
11-
## People
4+
during [an NSF funded postdoc](http://www.leouieda.com/blog/hawaii-gmt-postdoc.html)
5+
with [Paul Wessel](http://www.soest.hawaii.edu/wessel) at the University of Hawaii at
6+
Manoa.
127

13-
The following people have contributed code to the project:
8+
The following people have contributed code to the project (alphabetical by last name):
149

15-
* [Leonardo Uieda](http://www.leouieda.com/)
1610
* [Dongdong Tian](https://seisman.info/)
11+
* [Leonardo Uieda](http://www.leouieda.com/)

0 commit comments

Comments
 (0)