Skip to content

Commit

Permalink
Merge pull request #25 from MITLibraries/bumpversion
Browse files Browse the repository at this point in the history
Clean up build/test process
  • Loading branch information
Mike Graves committed May 3, 2017
2 parents eb5dc16 + 0a16f78 commit d82b7fc
Show file tree
Hide file tree
Showing 9 changed files with 174 additions and 70 deletions.
7 changes: 7 additions & 0 deletions .bumpversion.cfg
@@ -0,0 +1,7 @@
[bumpversion]
current_version = 0.1.0
commit = True
tag = True

[bumpversion:file:slingshot/__init__.py]
parse = ^__version__\s*=\s*[\'"](?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)
102 changes: 96 additions & 6 deletions .gitignore
@@ -1,8 +1,98 @@
.coverage
.env
.tox
*.pyc
*.egg-info
.cache
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# dotenv
.env

# virtualenv
.venv
venv/
ENV/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site
19 changes: 11 additions & 8 deletions .travis.yml
@@ -1,13 +1,16 @@
notifications:
email: false
language: python
python:
- "2.7"
- "3.4"
- "3.5"
matrix:
include:
- env: TOX_ENV=py27
- python: 3.5
env: TOX_ENV=py35
- python: 3.5
env: TOX_ENV=setup
- python: 3.5
env: TOX_ENV=coveralls
install:
- make
- pip install tox
script:
- make coverage
after_success:
- pipenv run coveralls
- tox -e $TOX_ENV
31 changes: 24 additions & 7 deletions Makefile
@@ -1,11 +1,28 @@
.PHONY: all clean install release test tests update
SHELL=/bin/bash
RELEASE_TYPE=patch

init:
pip install pipenv
pipenv lock
pipenv install --dev
all: test

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

install:
pip install .

release:
pipenv run bumpversion $(RELEASE_TYPE)
@tput setaf 2
@echo Built release for `git describe --tag`. Make sure to run:
@echo " $$ git push origin <branch> tag `git describe --tag`"
@tput sgr0

test:
pipenv run py.test tests --tb=short
tox

tests: test

coverage:
pipenv run py.test --cov=slingshot --cov-report term-missing tests
update:
pipenv update --dev
1 change: 1 addition & 0 deletions Pipfile
Expand Up @@ -3,6 +3,7 @@ verify_ssl = true
url = "https://pypi.python.org/simple"

[dev-packages]
bumpversion = "*"
coveralls = "*"
pytest = "*"
pytest-cov = "*"
Expand Down
39 changes: 7 additions & 32 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions setup.cfg
@@ -1,2 +1,5 @@
[bdist_wheel]
universal=1

[aliases]
test=pytest
11 changes: 10 additions & 1 deletion setup.py
Expand Up @@ -29,14 +29,23 @@
author_email='mgraves@mit.edu',
packages=find_packages(exclude=['tests']),
install_requires=[
'arrow',
'bagit',
'click',
'geoalchemy2',
'geomet',
'plyplus',
'psycopg2',
'pyshp',
'requests',
],
setup_requires=[
'pytest-runner',
],
tests_require=[
'pytest',
'requests-mock',
],
entry_points={
'console_scripts': [
'slingshot = slingshot.cli:main',
Expand All @@ -50,7 +59,7 @@
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
]
)

0 comments on commit d82b7fc

Please sign in to comment.