Skip to content

Commit e72ec2f

Browse files
committed
init
0 parents  commit e72ec2f

27 files changed

+884
-0
lines changed

.coveragerc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[run]
2+
# uncomment the following to omit files during running
3+
#omit =
4+
[report]
5+
exclude_lines =
6+
pragma: no cover
7+
def __repr__
8+
if self.debug:
9+
if settings.DEBUG
10+
raise AssertionError
11+
raise NotImplementedError
12+
if 0:
13+
if __name__ == .__main__.:
14+
def main

.editorconfig

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# http://editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
indent_style = space
7+
indent_size = 4
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
charset = utf-8
11+
end_of_line = lf
12+
13+
[*.bat]
14+
indent_style = tab
15+
end_of_line = crlf
16+
17+
[LICENSE]
18+
insert_final_newline = false
19+
20+
[Makefile]
21+
indent_style = tab

.flake8

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[flake8]
2+
# required by black, https://github.com/psf/black/blob/master/.flake8
3+
max-line-length = 99
4+
max-complexity = 18
5+
ignore = E203, E266, E501, W503, F403, F401
6+
select = B,C,E,F,W,T4,B9
7+
docstring-convention = rst
8+
per-file-ignores =
9+
__init__.py:F401
10+
exclude =
11+
.git,
12+
__pycache__,
13+
setup.py,
14+
build,
15+
dist,
16+
releases,
17+
.venv,
18+
.tox,
19+
.mypy_cache,
20+
.pytest_cache,
21+
.vscode,
22+
.github,
23+
tests

.github/ISSUE_TEMPLATE.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
* Frosting version:
2+
* Python version:
3+
* Operating System:
4+
5+
### Description
6+
7+
Describe what you were trying to get done.
8+
Tell us what happened, what went wrong, and what you expected to happen.
9+
10+
### What I Did
11+
12+
```
13+
Paste the command(s) you ran and the output.
14+
If there was a crash, please include the traceback here.
15+
```

.github/workflows/dev.yml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: dev workflow
4+
5+
# Controls when the action will run.
6+
on:
7+
# Triggers the workflow on push or pull request events but only for the master branch
8+
push:
9+
branches: [ master,main,release ]
10+
pull_request:
11+
branches: [ master,main,release ]
12+
13+
# Allows you to run this workflow manually from the Actions tab
14+
workflow_dispatch:
15+
16+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
17+
jobs:
18+
# This workflow contains a single job called "build"
19+
test:
20+
# The type of runner that the job will run on
21+
strategy:
22+
matrix:
23+
python-versions: [3.6, 3.7, 3.8, 3.9]
24+
os: [ubuntu-18.04, macos-latest, windows-latest]
25+
runs-on: ${{ matrix.os }}
26+
27+
# Steps represent a sequence of tasks that will be executed as part of the job
28+
steps:
29+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
30+
- uses: actions/checkout@v2
31+
- uses: actions/setup-python@v2
32+
with:
33+
python-version: ${{ matrix.python-versions }}
34+
35+
- name: Install dependencies
36+
run: |
37+
python -m pip install --upgrade pip
38+
pip install poetry tox tox-gh-actions
39+
40+
- name: test with tox
41+
run:
42+
tox
43+
44+
- name: list files
45+
run: ls -l .
46+
47+
publish_dev_build:
48+
# if test failed, we should not publish
49+
needs: test
50+
runs-on: ubuntu-latest
51+
steps:
52+
- uses: actions/checkout@v2
53+
- uses: actions/setup-python@v2
54+
with:
55+
python-version: 3.9
56+
57+
- name: Install dependencies
58+
run: |
59+
python -m pip install --upgrade pip
60+
pip install poetry tox tox-gh-actions
61+
62+
- name: test with tox
63+
run:
64+
tox
65+
66+
- name: list files
67+
run: ls -l .
68+
69+
- uses: codecov/codecov-action@v1
70+
with:
71+
fail_ci_if_error: true
72+
files: coverage.xml
73+
74+
- name: Build wheels and source tarball
75+
run: |
76+
poetry version $(poetry version --short)-dev.$GITHUB_RUN_NUMBER
77+
poetry version --short
78+
poetry build
79+
80+
- name: publish to Test PyPI
81+
uses: pypa/gh-action-pypi-publish@master
82+
with:
83+
user: __token__
84+
password: ${{ secrets.TEST_PYPI_API_TOKEN}}
85+
repository_url: https://test.pypi.org/legacy/
86+
skip_existing: true

.github/workflows/release.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Publish package on release branch if it's tagged with 'v*'
2+
3+
name: release & publish workflow
4+
5+
# Controls when the action will run.
6+
on:
7+
# Triggers the workflow on push or pull request events but only for the master branch
8+
push:
9+
branch: release
10+
tags:
11+
- 'v*'
12+
13+
# Allows you to run this workflow manually from the Actions tab
14+
workflow_dispatch:
15+
16+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
17+
jobs:
18+
# This workflow contains a single job called "build"
19+
release:
20+
name: Create Release
21+
runs-on: ubuntu-20.04
22+
23+
strategy:
24+
matrix:
25+
python-versions: [3.8]
26+
27+
# Steps represent a sequence of tasks that will be executed as part of the job
28+
steps:
29+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
30+
- uses: actions/checkout@v2
31+
32+
- name: generate change log
33+
uses: heinrichreimer/[email protected]
34+
with:
35+
token: ${{ secrets.GITHUB_TOKEN }}
36+
issues: true
37+
issuesWoLabels: true
38+
pullRequests: true
39+
prWoLabels: true
40+
unreleased: true
41+
addSections: '{"documentation":{"prefix":"**Documentation:**","labels":["documentation"]}}'
42+
output: CHANGELOG.md
43+
44+
- uses: actions/setup-python@v2
45+
with:
46+
python-version: ${{ matrix.python-versions }}
47+
48+
- name: Install dependencies
49+
run: |
50+
python -m pip install --upgrade pip
51+
pip install tox-gh-actions poetry
52+
53+
- name: pre-publish documentation
54+
run: |
55+
poetry install -E doc
56+
poetry run mkdocs build
57+
58+
- name: publish documentation
59+
uses: peaceiris/actions-gh-pages@v3
60+
with:
61+
personal_token: ${{ secrets.PERSONAL_TOKEN }}
62+
publish_dir: ./site
63+
64+
- name: Build wheels and source tarball
65+
run: >-
66+
poetry build
67+
68+
- name: show temporary files
69+
run: >-
70+
ls -l
71+
72+
- name: create github release
73+
id: create_release
74+
uses: softprops/action-gh-release@v1
75+
env:
76+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77+
with:
78+
body_path: ./CHANGELOG.md
79+
files: dist/*.whl
80+
draft: false
81+
prerelease: false
82+
83+
- name:
84+
uses: pypa/gh-action-pypi-publish@release/v1
85+
with:
86+
user: __token__
87+
password: ${{ secrets.PYPI_API_TOKEN }}
88+
skip_existing: true

.gitignore

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
env/
12+
build/
13+
develop-eggs/
14+
dist/
15+
downloads/
16+
eggs/
17+
.eggs/
18+
lib/
19+
lib64/
20+
parts/
21+
sdist/
22+
var/
23+
wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
28+
# PyInstaller
29+
# Usually these files are written by a python script from a template
30+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
31+
*.manifest
32+
*.spec
33+
34+
# Installer logs
35+
pip-log.txt
36+
pip-delete-this-directory.txt
37+
38+
# Unit test / coverage reports
39+
htmlcov/
40+
.tox/
41+
.coverage
42+
.coverage.*
43+
.cache
44+
nosetests.xml
45+
coverage.xml
46+
*.cover
47+
.hypothesis/
48+
.pytest_cache/
49+
50+
# Translations
51+
*.mo
52+
*.pot
53+
54+
# Django stuff:
55+
*.log
56+
local_settings.py
57+
58+
# Flask stuff:
59+
instance/
60+
.webassets-cache
61+
62+
# Scrapy stuff:
63+
.scrapy
64+
65+
# Sphinx documentation
66+
docs/_build/
67+
68+
# PyBuilder
69+
target/
70+
71+
# Jupyter Notebook
72+
.ipynb_checkpoints
73+
74+
# pyenv
75+
.python-version
76+
77+
# celery beat schedule file
78+
celerybeat-schedule
79+
80+
# SageMath parsed files
81+
*.sage.py
82+
83+
# dotenv
84+
.env
85+
86+
# virtualenv
87+
.venv
88+
venv/
89+
ENV/
90+
91+
# Spyder project settings
92+
.spyderproject
93+
.spyproject
94+
95+
# Rope project settings
96+
.ropeproject
97+
98+
# mkdocs documentation
99+
/site
100+
101+
# mypy
102+
.mypy_cache/
103+
104+
# IDE settings
105+
.vscode/
106+
107+
# mkdocs build dir
108+
site/

.isort.cfg

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[settings]
2+
multi_line_output = 3
3+
include_trailing_comma = True
4+
force_grid_wrap = 0
5+
use_parentheses = True
6+
ensure_newline_before_comments = True
7+
line_length = 99
8+
# you can skip files as below
9+
#skip_glob = docs/conf.py

0 commit comments

Comments
 (0)