Skip to content

Commit

Permalink
Cleanup (#10)
Browse files Browse the repository at this point in the history
* cleanup, update packaging, add dev targets, fix typos
  • Loading branch information
edaniszewski authored Mar 3, 2018
1 parent 187210a commit 9f719f6
Show file tree
Hide file tree
Showing 19 changed files with 412 additions and 96 deletions.
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache

# Translations
*.mo
Expand Down Expand Up @@ -102,6 +103,3 @@ ENV/

# PyCharm
.idea

# Make
Makefile
45 changes: 16 additions & 29 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,22 @@
language: python
python:
- "3.4"
- "3.5"
- "3.6"

matrix:
include:
# - python: 2.7
# env: TOXENV=py27
# - python: 2.7.6
# env: TOXENV=py27
# - python: 3.3
# env: TOXENV=py33
- python: 3.4
env: TOXENV=py34
- python: 3.5
env: TOXENV=py35
- python: 3.6
env: TOXENV=py36
before_install:
- python --version
- uname -a
- lsb_release -a
# install dependencies
install:
- pip install tox pylint coveralls
- virtualenv --version
- easy_install --version
- pip --version
- tox --version
- pip install coveralls pytest-cov flake8 pylint isort
- pip install -e .

cache: pip

# run tests and linting
script:
- pip install .
- pip install -U setuptools
- tox $TOXENV
- py.test --cov-report term --cov=pylint_quotes
- pylint pylint_quotes
- flake8 --ignore E501 pylint_quotes
- isort pylint_quotes -rc -c --diff

after_success:
- coveralls
after_failure:
- more .tox/log/* | cat
- more .tox/*/log/* | cat
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017 Erick Daniszewski
Copyright (c) 2018 Erick Daniszewski

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
42 changes: 42 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#
# Pylint Quotes
#

PKG_VER := $(shell cat pylint_quotes/__version__.py | grep __version__ | awk '{print $$3}' | tr -d "'")


.PHONY: init
init: ## Initialize the repo for development
pip install pipenv
pipenv install --dev --skip-lock

.PHONY: coverage
coverage: ## Run tests and report on coverage
pipenv run py.test --cov-report term --cov=pylint_quotes tests

.PHONY: lint
lint: ## Lint the source code (pylint, flake8, isort)
pipenv run pylint pylint_quotes
pipenv run flake8 --ignore E501 pylint_quotes
pipenv run isort pylint_quotes -rc -c --diff

.PHONY: publish
publish: ## Publish to PyPi
pip install 'twine>=1.5.0'
python setup.py sdist bdist_wheel
twine upload dist/*
rm -rf build dist .egg pylint_quotes.egg-info

.PHONY: test
test: ## Run unit tests
pipenv run py.test

.PHONY: version
version: ## Print the version of Synse Server
@echo "$(PKG_VER)"

.PHONY: help
help: ## Print Make usage information
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) | sort

.DEFAULT_GOAL := help
19 changes: 19 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[[source]]

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


[packages]

"e1839a8" = {path = ".", editable = true}


[dev-packages]

pytest = ">=3.4.0"
coverage = "*"
pytest-cov = "*"
"flake8" = "*"
isort = "*"
218 changes: 218 additions & 0 deletions Pipfile.lock

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

Loading

0 comments on commit 9f719f6

Please sign in to comment.