-
Notifications
You must be signed in to change notification settings - Fork 123
Add CI Build & Deployment pipeline #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
.travis.yml
Outdated
addons: | ||
apt: | ||
packages: | ||
- libgdal-dev | ||
|
||
language: python | ||
python: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add configuration to cache pip
packages:
cache: pip
.travis.yml
Outdated
secure: kjKWOTwTm2eaa10Pp4/ll480TfFxP5Lb+/9cuxC1gZNZ1JuuJ/y11RQTXCKKP5CxQV0JQ8zs1RAeg0ODXsX4f1edC714oWQx/2dl3BMb5rLo2Pbk5AkVQ50gN/P9d6cSVQrlv6U+CClr8w9FNWTZ/yIeL6bs2AbK9dUyTGx/i7GBOfkAcyW23kY4vYcemonwiTKtql1Pez9rPcwX3Q+3hyiU9rX0psK3H9vdH+VzrFR4+R9URtXoaYBrNDkO3IBy62qBLhMUOwrTDkV2IGjZ3O0w9sGmON3KieuwmbII4P40FRx5OLUnmSYXhQTkhXQ1OU4LnU62y4QYCw0B94tbM4gKJdLapOVO4SjqdCmVqBLV84A+DqdMxhYQYgtP8dUwDmmyOr4jS3AVpZY75Vgmd4V1tpMxaAJwBKAcXOueXExg4GaoT/1cSpZcPPojWcujNnJX2AnrTDHctJiKPWpkV9a0MQyQ3szgwgetl4YVbUoiyKjTPwQyoeTG+gCI5czwPZj35mqFeO+OCkJq3vvkIJ4K1f1sHcO541AJa24v8Akdp/VXPxQOG75/kK3EXoH/BfWkyJF4QH8GA+dksTQGozv9dtpTa7zpNh7FkJ8VFjxSvMcB3LjfzggvQ5N1CZNnWDIZ8JWbwMbNNCdn/mWEfMZ0/ChXt+U5BGdQUeqnCe0= | ||
on: | ||
tags: true | ||
distributions: "sdist bdist_wheel" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be at the same level as provider
and user
; it should not be under on
.
.travis.yml
Outdated
user: rasterfoundry | ||
password: | ||
secure: kjKWOTwTm2eaa10Pp4/ll480TfFxP5Lb+/9cuxC1gZNZ1JuuJ/y11RQTXCKKP5CxQV0JQ8zs1RAeg0ODXsX4f1edC714oWQx/2dl3BMb5rLo2Pbk5AkVQ50gN/P9d6cSVQrlv6U+CClr8w9FNWTZ/yIeL6bs2AbK9dUyTGx/i7GBOfkAcyW23kY4vYcemonwiTKtql1Pez9rPcwX3Q+3hyiU9rX0psK3H9vdH+VzrFR4+R9URtXoaYBrNDkO3IBy62qBLhMUOwrTDkV2IGjZ3O0w9sGmON3KieuwmbII4P40FRx5OLUnmSYXhQTkhXQ1OU4LnU62y4QYCw0B94tbM4gKJdLapOVO4SjqdCmVqBLV84A+DqdMxhYQYgtP8dUwDmmyOr4jS3AVpZY75Vgmd4V1tpMxaAJwBKAcXOueXExg4GaoT/1cSpZcPPojWcujNnJX2AnrTDHctJiKPWpkV9a0MQyQ3szgwgetl4YVbUoiyKjTPwQyoeTG+gCI5czwPZj35mqFeO+OCkJq3vvkIJ4K1f1sHcO541AJa24v8Akdp/VXPxQOG75/kK3EXoH/BfWkyJF4QH8GA+dksTQGozv9dtpTa7zpNh7FkJ8VFjxSvMcB3LjfzggvQ5N1CZNnWDIZ8JWbwMbNNCdn/mWEfMZ0/ChXt+U5BGdQUeqnCe0= | ||
on: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to add python: "3.6"
under on
so that only the 3.6 wheel gets published.
MANIFEST.in
Outdated
@@ -3,9 +3,12 @@ include CONTRIBUTING.rst | |||
include HISTORY.rst | |||
include LICENSE | |||
include README.rst | |||
include Makefile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure this file needs to be included in the distribution.
MANIFEST.in
Outdated
@@ -3,9 +3,12 @@ include CONTRIBUTING.rst | |||
include HISTORY.rst | |||
include LICENSE | |||
include README.rst | |||
include Makefile | |||
|
|||
exclude .editorconfig requirements_dev.txt | |||
|
|||
recursive-include tests * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See graft
comment in azavea/django-amazon-ses@f4903b2.
setup.py
Outdated
join(dirname(__file__), *names), | ||
encoding=kwargs.get('encoding', 'utf8') | ||
).read() | ||
|
||
requirements = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this should just be inline below with install_requires
.
setup.py
Outdated
'Click>=6.0', | ||
'geojson==2.3.0', | ||
'requests==2.18.0', | ||
'typing==3.6.2;python_version<"3.5"' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting; was not aware of this conditional syntax.
setup.py
Outdated
'Click>=6.0', | ||
'geojson==2.3.0', | ||
'requests==2.18.0', | ||
'typing==3.6.2;python_version<"3.5"' | ||
] | ||
|
||
setup_requirements = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should just get rid of this variable.
setup.py
Outdated
] | ||
|
||
setup_requirements = [ | ||
# TODO(notthatbreezy): put setup requirements (distutils extensions, etc.) here | ||
# NOQA TODO(notthatbreezy): put setup requirements (distutils extensions, etc.) here | ||
] | ||
|
||
test_requirements = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
long_description=readme + '\n\n' + history, | ||
author="Raster Foundry", | ||
author_email='[email protected]', | ||
url='https://github.com/notthatbreezy/pystac', | ||
url='https://github.com/rasterfoundry/pystac', | ||
packages=find_packages(), | ||
py_modules=[splitext(basename(path))[0] for path in glob('pystac/*.py')], | ||
entry_points={ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't comment on the appropriate line, but I think that it would be good to ask in the channel for some appropriate keywords
before publishing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as keywords go, not sure really what would be good, maybe the following:
- imagery
- raster
- catalog
At least as a start.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
tox.ini
Outdated
commands = | ||
check-manifest --ignore tox.ini | ||
{envpython} setup.py check -m -r -s | ||
# flake8 . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that we should edit this command (even if left commented-out) to:
flake8 --exclude ".svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg,docs"
This helps remove a bunch of stuff that has little to do with the project source code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as improving this, I would add __init__.py
and build
as well (at least helps reduce issues for local development):
flake8 --exclude "__init__.py,build,.svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg,docs"
tox.ini
Outdated
; -r{toxinidir}/requirements.txt | ||
[flake8] | ||
exclude = .tox,*.egg,build,data | ||
select = E,W,F |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add max-line-length: 100
-- the default is pretty small (80) and as a team that's what we default too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me -- I think you can re-enable flake8 again -- I pushed a commit that fixes it once you add the options @hectcastro and I suggested
0a74be5
to
6958e14
Compare
- Build with python 3.4-4.6 - Deploy to PyPi
6958e14
to
38ca085
Compare
Overview
Add a TravisCI pipeline that runs
tox
tests and builds/deploys packages topypi
.Notes
rasterio
dependency issues: due to example on numpy.histogram2d is broken (Trac #1830) numpy/numpy#2423,numpy
must already be installed in thevirtualenv
before trying to buildpystac
distributions, or setting uprasterio
will fail. This is also true when installingpystac
from source. Numpy doesn't need to be pre-installed when installing via wheel.numpy
andtox
: since tox uses separatevirtualenv
from Travis, i also had to includenumpy
as a dependency intox.ini
.flake8
errors: I took care of some of the most obvious flake8 errors, butflake8
still fails in CI. I disabled that testing step in order to force builds to pass.Testing
pystac==0.1.1
viapip
Fixes azavea/raster-foundry-platform#206