Skip to content

Commit

Permalink
0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
andreygrechin committed Mar 6, 2018
1 parent 0c22b92 commit 9afbd20
Show file tree
Hide file tree
Showing 54 changed files with 2,286 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .coveragerc
@@ -0,0 +1,24 @@
[run]
source =
umbr_api

# branch = True

[report]
# Regexes for lines to exclude from consideration
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover

# Don't complain about missing debug-only code:
def __repr__
if self\.debug

# Don't complain if non-runnable code isn't run:
if __name__ == .__main__.:

ignore_errors = True

[paths]
source =
umbr_api
14 changes: 14 additions & 0 deletions .gitignore
@@ -0,0 +1,14 @@
.DS_Store
.vscode/
*.code-workspace
__pycache__/
*.pyc
venv/
*.egg-info/
dist/
docs/_build/
.coverage
*.py,cover
.pytest_cache/

customer_key.json
51 changes: 51 additions & 0 deletions .travis.yml
@@ -0,0 +1,51 @@
language: python
env:
- DEV=true
python:
- '3.4'
- '3.5'
- '3.6'
- 3.6-dev
- 3.7-dev
matrix:
fast_finish: true
# include:
# - python: '3.4'
# - python: '3.5'
# - python: '3.6'
# - python: '3.6-dev'
# - python: '3.7-dev'
allow_failures:
- python: '3.6-dev'
env: DEV=true
- python: '3.7-dev'
env: DEV=true
install:
- pip install .
- pip install .[dev]
# branches:
# only:
# - master
# except:
# - develop
before_script:
- pip install coveralls
script:
- make test-offline
- if [[ "$TRAVIS_PYTHON_VERSION" = 3.6 ]]; then coverage run -m pytest -k 'not Online' -q --cache-clear tests/; fi
after_success:
- if [[ "$TRAVIS_PYTHON_VERSION" = 3.6 ]]; then coveralls; fi
notifications:
email:
on_success: change
on_failure: always
deploy:
provider: pypi
user: kolatz
branch: master
on:
python: '3.6'
tags: true
repo: kolatz/umbr_api
password:
secure: nMcJKWznc9fIklmzADjLFaCowlvBL2mTwQ6JDXzNLr0B0l86fqKrAmUpnOa+CdcXpC0qOW46W+h1wPGXb5uSsejtoZEZ/wi3G+eWPCzYmZoKmcpQDYEkgZfPqtK2Ka15TMDCuA681ExWj8tnGarSlSvLjKfy966TBXozbW7g5gPeQANFFgdprj6z0eFciOrXXNM3yj4fTCXyW96ae5yoZ8YxIRVS6OrJ1zhUOp7c7gOTyjeTji42vlRqq8UM955+fI16zvj+XAtMQbiGoxyjCH2ld4+/Vh5Th+rGBd85bKx13g0CvLsWjfm7+sQq/uWPKFT0bvL9+9X31pSSnV+apNgI4C0v0N/Vk/9VH+8wtWEd8xkG0NYdu2FAAKyKn/9wjpTj/OnCoRXQYXtkxOd67h8t1WjOJHG3MFSM4QJd6sAwoE4BVdUbrIZUdWBsY1tVVzCUW3dla7qv7jGEiu95eBN+/Ihihd6ai+LASngLR59gePid3TuKy6O6GsH/oQOA1f6SzrDPAj/DKIjXHTrSjVVFsqDvqbgiFgbgArGe6MIHeXhwVGbcidpGjomGYjnFgojOw//hzSaTfiEM/073KjyclCTcAV25XhrRxoBXNf8CKRvljxN+cNdGnF4TIDlfvjF1Hdhv7O5kC4KejFKNp80skO2X2U2nsOXPNn4mfT4=
6 changes: 6 additions & 0 deletions MANIFEST.in
@@ -0,0 +1,6 @@
include LICENSE
include README.rst
include Makefile
include requirements.txt
include requirements_dev.txt
include umbr_api/data/customer_key_example.json
71 changes: 71 additions & 0 deletions Makefile
@@ -0,0 +1,71 @@
.PHONY: test
test: clear-all install-dev
pytest -q --cache-clear tests/

.PHONY: test-online
test-online: clear-all install-dev
pytest -k 'Online' -q --cache-clear tests/

.PHONY: test-offline
test-offline: clear-all install-dev
pytest -k 'not Online' -q --cache-clear tests/

.PHONY: lint
lint:
pycodestyle -r --statistics --count --show-source umbr_api/ tests/ examples/ setup.py
pep257 -s -e umbr_api/
pep257 -s -e tests/
pep257 -s -e examples/
pep257 -s -e setup.py

.PHONY: install-dev
install-dev:
pip install -q -e .[dev]

.PHONY: coverage-offline
coverage-offline: clear-pyc clear-cov
coverage run -m pytest -k 'not Online' -q --cache-clear tests/
coverage report
coverage annotate

.PHONY: coverage
coverage: clear-pyc clear-cov
coverage run -m pytest
coverage report
coverage annotate

.PHONY: cov
cov: coverage

.PHONY: upload
upload: clear-all built
twine upload dist/*

.PHONY: docs
docs: clear-pyc install-dev
$(MAKE) -C docs html

.PHONY: built
built:
python3 setup.py sdist

.PHONY: clear-all
clear-all: clear-pyc clear-cov clear-build

.PHONY: clear-pyc
clear-pyc:
find . -type d -name '__pycache__' -exec rm -rf {} +
find . -type f -name '*.py[co]' -exec rm -f {} +
find . -type f -name '*~' -exec rm -f {} +

.PHONY: clear-cov
clear-cov:
find . -type f -name '*.py,cover' -exec rm -f {} +
rm -fr .pytest_cache
coverage erase

.PHONY: clear-build
clear-build:
rm -fr docs/_build/
rm -fr dist/
rm -fr *.egg-info

0 comments on commit 9afbd20

Please sign in to comment.