Skip to content

Commit ddb551b

Browse files
committed
Initial commit of ToonAPI
1 parent 29ee259 commit ddb551b

31 files changed

+2412
-0
lines changed

.editorconfig

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_style = space
7+
insert_final_newline = true
8+
trim_trailing_whitespace = true
9+
ident_size = 4
10+
11+
[*.md]
12+
ident_size = 2
13+
trim_trailing_whitespace = false
14+
15+
[*.json]
16+
ident_size = 2
17+
18+
[{.gitignore,.gitkeep,.editorconfig}]
19+
ident_size = 2
20+
21+
[Makefile]
22+
ident_style = tab

.flake8

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[flake8]
2+
max-line-length=88
3+
ignore=D202,W503

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
* text eol=lf
2+
*.py whitespace=error

.github/FUNDING.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
github: frenck
3+
patreon: frenck
4+
custom: https://frenck.dev/donate/

.github/workflows/ci.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
name: Continuous Integration
3+
4+
# yamllint disable-line rule:truthy
5+
on: [push, pull_request]
6+
7+
jobs:
8+
linting:
9+
name: Linting
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checking out code from GitHub
13+
uses: actions/checkout@v2
14+
- name: Set up Python 3.7
15+
uses: actions/setup-python@v1
16+
with:
17+
python-version: 3.7
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip setuptools wheel
21+
pip install -r requirements_test.txt
22+
pip install -r requirements.txt
23+
pip install pre-commit
24+
pip list
25+
pre-commit --version
26+
- name: Run pre-commit on all files
27+
run: |
28+
pre-commit run --all-files --show-diff-on-failure
29+
# No tests yet
30+
# test:
31+
# name: Python ${{ matrix.python }} on ${{ matrix.os }}
32+
# runs-on: ${{ matrix.os }}-latest
33+
# strategy:
34+
# matrix:
35+
# os: [ubuntu]
36+
# python: [3.7, 3.8]
37+
# steps:
38+
# - name: Checking out code from GitHub
39+
# uses: actions/checkout@v2
40+
# - name: Set up Python ${{ matrix.python }}
41+
# uses: actions/setup-python@v1
42+
# with:
43+
# python-version: ${{ matrix.python }}
44+
# - name: Install dependencies
45+
# run: |
46+
# python -m pip install --upgrade pip setuptools wheel
47+
# pip install -r requirements_test.txt
48+
# pip install -r requirements.txt
49+
# pip list
50+
# - name: Pytest with coverage reporting
51+
# run: pytest --cov=toonapi --cov-report=xml
52+
# - name: Upload coverage to Codecov
53+
# if: matrix.python == 3.8 && matrix.os == 'ubuntu'
54+
# uses: codecov/codecov-action@v1.0.3
55+
# with:
56+
# token: ${{ secrets.CODECOV_TOKEN }}
57+
# file: ./coverage.xml
58+
# flags: unittests
59+
# name: codecov-umbrella

.gitignore

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# OSX useful to ignore
7+
*.DS_Store
8+
.AppleDouble
9+
.LSOverride
10+
11+
# Thumbnails
12+
._*
13+
14+
# Files that might appear in the root of a volume
15+
.DocumentRevisions-V100
16+
.fseventsd
17+
.Spotlight-V100
18+
.TemporaryItems
19+
.Trashes
20+
.VolumeIcon.icns
21+
.com.apple.timemachine.donotpresent
22+
23+
# Directories potentially created on remote AFP share
24+
.AppleDB
25+
.AppleDesktop
26+
Network Trash Folder
27+
Temporary Items
28+
.apdisk
29+
30+
# C extensions
31+
*.so
32+
33+
# Distribution / packaging
34+
.Python
35+
env/
36+
build/
37+
develop-eggs/
38+
dist/
39+
downloads/
40+
eggs/
41+
.eggs/
42+
lib/
43+
lib64/
44+
parts/
45+
sdist/
46+
var/
47+
*.egg-info/
48+
.installed.cfg
49+
*.egg
50+
51+
# PyInstaller
52+
# Usually these files are written by a python script from a template
53+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
54+
*.manifest
55+
*.spec
56+
57+
# Installer logs
58+
pip-log.txt
59+
pip-delete-this-directory.txt
60+
61+
# Unit test / coverage reports
62+
htmlcov/
63+
.tox/
64+
.coverage
65+
.coverage.*
66+
.cache
67+
nosetests.xml
68+
coverage.xml
69+
*,cover
70+
.hypothesis/
71+
.pytest_cache/
72+
73+
# Translations
74+
*.mo
75+
*.pot
76+
77+
# Django stuff:
78+
*.log
79+
80+
# Sphinx documentation
81+
docs/_build/
82+
83+
# pyenv
84+
.python-version
85+
86+
# virtualenv
87+
.venv
88+
venv/
89+
ENV/
90+
91+
# mypy
92+
.mypy_cache/
93+
94+
# Visual Studio Code
95+
.vscode
96+
97+
# IntelliJ Idea family of suites
98+
.idea
99+
*.iml
100+
101+
## File-based project format:
102+
*.ipr
103+
*.iws
104+
105+
## mpeltonen/sbt-idea plugin
106+
.idea_modules/
107+
108+
# PyBuilder
109+
target/
110+
111+
# Cookiecutter
112+
output/
113+
python_boilerplate/

.isort.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[settings]
2+
multi_line_output=3
3+
line_length=88
4+
include_trailing_comma=True
5+
project=toonapi

.pre-commit-config.yaml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
repos:
3+
- repo: https://github.com/ambv/black
4+
rev: 19.10b0
5+
hooks:
6+
- id: black
7+
args: [--safe, --quiet, --target-version, py36]
8+
- repo: https://github.com/asottile/blacken-docs
9+
rev: v1.7.0
10+
hooks:
11+
- id: blacken-docs
12+
additional_dependencies: [black==19.10b0]
13+
- repo: https://github.com/pre-commit/pre-commit-hooks
14+
rev: v3.1.0
15+
hooks:
16+
- id: trailing-whitespace
17+
- id: end-of-file-fixer
18+
- id: check-merge-conflict
19+
- id: debug-statements
20+
- id: check-docstring-first
21+
- id: check-json
22+
- id: check-yaml
23+
- id: requirements-txt-fixer
24+
- id: check-byte-order-marker
25+
- id: check-case-conflict
26+
- id: check-executables-have-shebangs
27+
- id: fix-encoding-pragma
28+
args: ["--remove"]
29+
- id: check-ast
30+
- id: detect-private-key
31+
- id: forbid-new-submodules
32+
- repo: https://github.com/pre-commit/pre-commit
33+
rev: v2.5.1
34+
hooks:
35+
- id: validate_manifest
36+
- repo: https://github.com/pre-commit/mirrors-autopep8
37+
rev: v1.5.3
38+
hooks:
39+
- id: autopep8
40+
- repo: https://github.com/pre-commit/mirrors-isort
41+
rev: v4.3.21
42+
hooks:
43+
- id: isort
44+
- repo: https://github.com/pre-commit/mirrors-pylint
45+
rev: v2.5.3
46+
hooks:
47+
- id: pylint
48+
- repo: https://github.com/pre-commit/mirrors-mypy
49+
rev: v0.781
50+
hooks:
51+
- id: mypy
52+
- repo: https://gitlab.com/pycqa/flake8
53+
rev: 3.8.3
54+
hooks:
55+
- id: flake8
56+
additional_dependencies: ["flake8-docstrings"]
57+
- repo: https://github.com/adrienverge/yamllint.git
58+
rev: v1.23.0
59+
hooks:
60+
- id: yamllint
61+
- repo: https://github.com/asottile/pyupgrade
62+
rev: v2.6.1
63+
hooks:
64+
- id: pyupgrade
65+
args: [--py37-plus]

.yamllint

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
rules:
3+
braces:
4+
level: error
5+
min-spaces-inside: 0
6+
max-spaces-inside: 1
7+
min-spaces-inside-empty: -1
8+
max-spaces-inside-empty: -1
9+
brackets:
10+
level: error
11+
min-spaces-inside: 0
12+
max-spaces-inside: 0
13+
min-spaces-inside-empty: -1
14+
max-spaces-inside-empty: -1
15+
colons:
16+
level: error
17+
max-spaces-before: 0
18+
max-spaces-after: 1
19+
commas:
20+
level: error
21+
max-spaces-before: 0
22+
min-spaces-after: 1
23+
max-spaces-after: 1
24+
comments:
25+
level: error
26+
require-starting-space: true
27+
min-spaces-from-content: 2
28+
comments-indentation:
29+
level: error
30+
document-end:
31+
level: error
32+
present: false
33+
document-start:
34+
level: error
35+
present: true
36+
empty-lines:
37+
level: error
38+
max: 1
39+
max-start: 0
40+
max-end: 1
41+
hyphens:
42+
level: error
43+
max-spaces-after: 1
44+
indentation:
45+
level: error
46+
spaces: 2
47+
indent-sequences: true
48+
check-multi-line-strings: false
49+
key-duplicates:
50+
level: error
51+
line-length:
52+
level: warning
53+
max: 120
54+
allow-non-breakable-words: true
55+
allow-non-breakable-inline-mappings: true
56+
new-line-at-end-of-file:
57+
level: error
58+
new-lines:
59+
level: error
60+
type: unix
61+
trailing-spaces:
62+
level: error
63+
truthy:
64+
level: error

0 commit comments

Comments
 (0)