Skip to content

Commit e3b0167

Browse files
committedOct 20, 2019
chore: first commit
1 parent adfdbe5 commit e3b0167

16 files changed

+1133
-1
lines changed
 

‎.pre-commit-config.yaml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
fail_fast: true
3+
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v2.2.1
6+
hooks:
7+
- id: check-ast
8+
- id: check-symlinks
9+
- id: check-executables-have-shebangs
10+
- id: check-merge-conflict
11+
- id: check-json
12+
- id: check-yaml
13+
- id: detect-private-key
14+
- id: double-quote-string-fixer
15+
- id: trailing-whitespace
16+
- id: no-commit-to-branch # No (direct) commits to master
17+
- repo: https://github.com/asottile/add-trailing-comma
18+
rev: v1.0.0
19+
hooks:
20+
- id: add-trailing-comma
21+
- repo: https://github.com/pre-commit/mirrors-isort
22+
rev: v4.3.18
23+
hooks:
24+
- id: isort
25+
- repo: https://github.com/Lucas-C/pre-commit-hooks
26+
rev: v1.1.6
27+
hooks:
28+
- id: forbid-crlf
29+
files: \.md$
30+
- id: remove-crlf
31+
files: \.md$
32+
- repo: local
33+
hooks:
34+
- id: lint
35+
name: tox lint
36+
entry: tox -e lint
37+
language: system
38+
- id: doclint
39+
name: tox doclint
40+
entry: tox -e doclint
41+
language: system
42+
- id: mypy
43+
name: tox mypy
44+
entry: tox -e mypy
45+
language: system
46+
types: [python]
47+
- id: tests
48+
name: tox tests
49+
entry: tox -e tests
50+
language: system
51+
types: [python, yaml]

‎.travis.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
dist: xenial
2+
env:
3+
global:
4+
- CC_TEST_REPORTER_ID=$TEST_REPORTER_ID
5+
language: python
6+
os:
7+
- linux
8+
python:
9+
- '3.7'
10+
install:
11+
- python -m pip install -U pip setuptools pipenv
12+
- pipenv install --dev
13+
- python -m pip install -e .
14+
before_script:
15+
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64
16+
> ./cc-test-reporter
17+
- chmod +x ./cc-test-reporter
18+
- "./cc-test-reporter before-build"
19+
script:
20+
- tox -e lint
21+
- tox -e doclint
22+
- tox -e isort
23+
- tox -e mypy
24+
- tox -e tests
25+
after_script:
26+
- coverage xml -o coverage.xml
27+
- "./cc-test-reporter after-build --coverage-input-type coverage.py --exit-code $TRAVIS_TEST_RESULT"
28+
deploy:
29+
- provider: script
30+
script: ci-scripts/semantic-release.sh
31+
on:
32+
branch: master
33+
notifications:
34+
slack:
35+
rooms:
36+
- secure: XU8s7FeivT74v46HKBHxCeAx/RA+cbVzufJjAtAVvAcuz1/cCySUjLWJCHzsSjPBoff7BKxPO2Sxlxb+FmgTGKEX48rqJM5ZAR3IrVeDseix64030ANOd3KRvnZYTPvqF9ovtV6d0GhbO/BAc4XNfx47RsG31LLRQcZnaAL2x7J2C1KsvmMG1ckQoYVZJgxQszUZm4NTlGRjiCd2EbZIfdeo33Wm0vPSgHprSe8z0Ov0sk5SLDJRSZh1z6TrchfxmXZLmi19oOB+vkEMJtvyDgxF1x/tT3aMmD/jB9qt7RR+11RigLTVrq5ANKQ10NFE+TsOd8ZwjZ3Ng1Ont2HmdExltNsI0goynx1nKlaHOnDmJ8xOp/XF1k8EsVkyWFCTywjZGIV2nNzC60qd4q719l7gnsV11nnaEc2IrfREV43Hq3C5CfhkLwZCm77ePSW0ckzFN1iucjvh8SCPf75p+WwtegAgNHB+jjHWLEA1R1/kcYwHHL2w4MLPxt5y0DdwMxjGYNWW1Eys7rpK6U1qSqhe6z/3b+YRM+YXekvojEnxz9KU51ZbqxqPplkTeiRmYW+GYiks7MXdOwcSFrTDcttEJY/xd9zN71rWNzTmAfzTJgSI51JJpq13uJuUJzTqTXpT7lI5nDjnl2dUZyrQzdUyqzbIoqttFW2TOT8hzKY=
37+
on_success: always # change: send a notification when the build status changes.
38+
on_failure: always # always: always send a notification.
39+
template:
40+
- "Repo `%{repository_slug}` *%{result}* build (<%{build_url}|#%{build_number}>) for commit (<%{compare_url}|%{commit}>) on branch `%{branch}`."
41+
- "Execution time: *%{duration}*"
42+
- "Message: %{message}"

‎MANIFEST.in

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
include README.md
2+
include CHANGELOG.md
3+
recursive-exclude tests *

‎Makefile

+96
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
.PHONY: help clean clean-pyc clean-build list test test-dbg test-cov test-all coverage docs release sdist install install-dev install-ci lint mypy isort isort-check
2+
3+
project-name = pycon-schemas
4+
5+
version-var := "__version__ = "
6+
version-string := $(shell grep $(version-var) $(project-name)/version.py)
7+
version := $(subst __version__ = ,,$(version-string))
8+
9+
help:
10+
@echo "install - install"
11+
@echo "install-dev - install also development dependencies"
12+
@echo "clean - clean all below"
13+
@echo "clean-build - remove build artifacts"
14+
@echo "clean-pyc - remove Python file artifacts"
15+
@echo "clean-tox - clean tox cache"
16+
@echo "lint - check style with flake8"
17+
@echo "test - run tests quickly with the default Python"
18+
@echo "test-cov - run tests with the default Python and report coverage"
19+
@echo "test-dbg - run tests and debug with pdb"
20+
@echo "develop - run tests in loop mode"
21+
@echo "deploy - deploy"
22+
@echo "mypy - check type hinting with mypy"
23+
@echo "isort - sort imports"
24+
@echo "isort-check - check if your imports are correctly sorted"
25+
@echo "build - create the distribution package"
26+
@echo "release - package a release in wheel and tarball, requires twine"
27+
28+
install:
29+
python -m pip install pipenv
30+
pipenv install
31+
python -m pip install .
32+
33+
install-ci:
34+
python -m pip install pipenv
35+
pipenv install --dev
36+
python -m pip install -e .
37+
38+
install-dev: install-ci
39+
pre-commit install
40+
41+
clean: clean-build clean-pyc clean-caches
42+
43+
clean-build:
44+
rm -fr build/
45+
rm -fr dist/
46+
rm -fr .eggs/
47+
rm -fr *.egg-info
48+
rm -fr *.spec
49+
50+
clean-pyc:
51+
pyclean $(project-name)
52+
find . -name '*~' -exec rm -f {} +
53+
find . -name __pycache__ -exec rm -rf {} +
54+
find . -name '*.log*' -delete
55+
find . -name '*_cache' -exec rm -rf {} +
56+
find . -name '*.egg-info' -exec rm -rf {} +
57+
58+
clean-caches:
59+
rm -rf .tox
60+
rm -rf .pytest_cache
61+
62+
lint:
63+
tox -e lint
64+
65+
test:
66+
tox -e tests
67+
68+
mypy:
69+
tox -e mypy
70+
71+
isort-check:
72+
tox -e isort
73+
74+
isort:
75+
isort -rc lambda_handlers/
76+
77+
test-cov:
78+
py.test --cov-report term-missing --cov=$(project-name)
79+
80+
test-dbg:
81+
py.test --pdb
82+
83+
develop:
84+
py.test --color=yes -f
85+
86+
coverage:
87+
pytest --cov=hansel
88+
coverage report -m
89+
90+
build:
91+
python setup.py sdist bdist_wheel
92+
93+
pypi:
94+
twine upload dist/*
95+
96+
release: clean build pypi

‎Pipfile

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
[[source]]
2+
url = "https://pypi.python.org/simple"
3+
verify_ssl = true
4+
name = "pypi"
5+
6+
[packages]
7+
jsonschema = "==3.1.1"
8+
9+
[dev-packages]
10+
flake8 = "*"
11+
flake8-bugbear = "*"
12+
autopep8 = "*"
13+
pre-commit = "*"
14+
pytest = "*"
15+
pytest-cov = "*"
16+
pytest-xdist = "*"
17+
pytest-only = "*"
18+
watchdog = "*"
19+
mypy = "*"
20+
isort = "*"
21+
tox = ">=3.13.2"
22+
coverage = "*"
23+
wily = "*"
24+
jsonschema = "==3.0.2"
25+
pyclean-py = "*"
26+
pytest-mock = "*"
27+
rope = "*"
28+
twine = "*"
29+
pydocstyle = "*"
30+
tox-pipenv-install = "*"

0 commit comments

Comments
 (0)
Please sign in to comment.