Skip to content

Commit

Permalink
0.3.post1
Browse files Browse the repository at this point in the history
  • Loading branch information
andreygrechin committed Mar 8, 2018
1 parent 0c22b92 commit 23fe765
Show file tree
Hide file tree
Showing 56 changed files with 2,319 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
build: false

environment:
matrix:

- PYTHON: "C:\\Python34"
PYTHON_VERSION: "3.4.4"
PYTHON_ARCH: "32"

- PYTHON: "C:\\Python34-x64"
PYTHON_VERSION: "3.4.4"
PYTHON_ARCH: "64"

- PYTHON: "C:\\Python35"
PYTHON_VERSION: "3.5.3"
PYTHON_ARCH: "32"

- PYTHON: "C:\\Python35-x64"
PYTHON_VERSION: "3.5.3"
PYTHON_ARCH: "64"

- PYTHON: "C:\\Python36"
PYTHON_VERSION: "3.6.4"
PYTHON_ARCH: "32"

- PYTHON: "C:\\Python36-x64"
PYTHON_VERSION: "3.6.4"
PYTHON_ARCH: "64"

init:
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
- "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%"
- "python --version"
- "python -c \"import struct; print(struct.calcsize('P') * 8)\""
install:
- "pip install --disable-pip-version-check --user --upgrade pip"
- "pip install -e ."
- "pip install -e .[dev]"
- "%PYTHON%/Scripts/pip.exe install pytest"
- "%PYTHON%/Scripts/pip.exe install coverage"

test_script:
- "%CMD_IN_ENV% python setup.py tests"
24 changes: 24 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -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
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.DS_Store
.vscode/
*.code-workspace
__pycache__/
*.pyc
venv/
.eggs/
*.egg-info/
dist/
docs/_build/
.coverage
*.py,cover
.pytest_cache/

customer_key.json
51 changes: 51 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
76 changes: 76 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
.PHONY: all
all: clear-all install-dev test-offline docs built upload coverage-offline

.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
# flake8 --statistics --count --exclude venv

.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 .eggs/
rm -fr *.egg-info/

0 comments on commit 23fe765

Please sign in to comment.