Skip to content

Commit

Permalink
Merge 79bab7c into f3cc399
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Graves committed Apr 19, 2019
2 parents f3cc399 + 79bab7c commit 9240881
Show file tree
Hide file tree
Showing 53 changed files with 1,263 additions and 2,284 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -96,3 +96,5 @@ ENV/

# mkdocs documentation
/site

.pytest_cache
37 changes: 28 additions & 9 deletions .travis.yml
Expand Up @@ -3,32 +3,51 @@ notifications:
language: python
services:
- postgresql
dist: xenial
python:
- "3.7"

## This is necessary because of https://github.com/travis-ci/travis-ci/issues/6972
addons:
postgresql: 9.6
apt:
packages:
postgresql-9.6-postgis-2.3
##
postgresql-9.6-postgis-2.4

##
# moto has a problem with credentials (https://github.com/spulec/moto/issues/1924)
# and the solution is to just set the AWS creds to anything. They will have
# to be set individually for each environment in the job matrix that runs
# tests (i.e. py37 and coveralls) rather than globally because they would
# overwrite the real AWS creds set through the Travis UI. Those will be
# needed for deployment.
##
env:
global:
POSTGIS_DB="postgresql://postgres@localhost/slingshot_test"
PG_DATABASE="postgresql://postgres@localhost/slingshot_test"
matrix:
include:
- python: 3.6
env: TOX_ENV=py36-integration
- python: 3.6
- python: 3.7
env:
- TOX_ENV=py37
- AWS_SECRET_ACCESS_KEY=secret
- AWS_ACCESS_KEY_ID=key
- python: 3.7
env: TOX_ENV=flake8
- python: 3.6
- python: 3.7
env: TOX_ENV=safety
- python: 3.6
env: TOX_ENV=coveralls
- python: 3.7
env:
- TOX_ENV=coveralls
- AWS_SECRET_ACCESS_KEY=secret
- AWS_ACCESS_KEY_ID=key
before_script:
- psql -U postgres -c "CREATE DATABASE slingshot_test;"
- psql -U postgres -d slingshot_test -c "CREATE EXTENSION postgis;"
- psql -U postgres -d slingshot_test -c "CREATE SCHEMA geodata;"
before_install:
## This is necessary because of https://github.com/travis-ci/travis-ci/issues/7940
- sudo rm -f /etc/boto.cfg
install:
- pip install tox
script:
Expand Down
28 changes: 14 additions & 14 deletions Makefile
@@ -1,28 +1,28 @@
.PHONY: all clean install release test tests update
.PHONY: clean install wheel test tests update
SHELL=/bin/bash
RELEASE_TYPE=patch

all: test

clean:
help: ## Print this message
@awk 'BEGIN { FS = ":.*##"; print "Usage: make <target>\n\nTargets:" } \
/^[-_[:alpha:]]+:.?*##/ { printf " %-15s%s\n", $$1, $$2 }' $(MAKEFILE_LIST)


clean: ## Remove build artifacts
find . -name "*.pyc" -print0 | xargs -0 rm -f
find . -name '__pycache__' -print0 | xargs -0 rm -rf
rm -rf .coverage .tox *.egg-info .eggs build dist

install:
pip install .
install: ## Install project and dev depenedencies
pipenv install --dev

release:
pipenv run bumpversion $(RELEASE_TYPE)
@tput setaf 2
@echo Built release for `git describe --tag`. Make sure to run:
@echo " $$ git push origin `git rev-parse --abbrev-ref HEAD` tag `git describe --tag`"
@tput sgr0
wheel: ## Build Python wheel
pipenv run python setup.py bdist_wheel

test:
test: ## Run tests
tox

tests: test

update:
update: ## Update all Python dependencies
pipenv clean
pipenv update --dev
10 changes: 4 additions & 6 deletions Pipfile
@@ -1,12 +1,11 @@
[[source]]

verify_ssl = true
url = "https://pypi.python.org/simple"

[requires]
python_version = "3.7"

[packages]

bagit = "*"
click = "*"
geomet = "*"
"psycopg2-binary" = "*"
Expand All @@ -16,12 +15,11 @@ requests = "*"
plyplus = "*"
attrs = "*"
pymarc = "*"

boto3 = "*"

[dev-packages]

bumpversion = "*"
coveralls = "*"
pytest = "*"
pytest-cov = "*"
requests-mock = "*"
moto = "*"

0 comments on commit 9240881

Please sign in to comment.