Skip to content

Commit 473d104

Browse files
committed
🎉 Initial
0 parents  commit 473d104

29 files changed

+1808
-0
lines changed

.github/FUNDING.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
custom:
3+
- "https://user-images.githubusercontent.com/32936898/199681341-1c5cfa61-4411-4b67-b268-7cd87c5867bb.png"
4+
- "https://user-images.githubusercontent.com/32936898/199681363-1094a0be-85ca-49cf-a410-19b3d7965120.png"
5+
- "https://user-images.githubusercontent.com/32936898/199681368-c34c2be7-e0d8-43ea-8c2c-d3e865da6aeb.png"

.github/workflows/main.yml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
---
2+
"on":
3+
push:
4+
paths-ignore:
5+
- "**.md"
6+
- docs/*
7+
pull_request:
8+
paths-ignore:
9+
- "**.md"
10+
- docs/*
11+
workflow_dispatch:
12+
13+
# https://github.com/softprops/action-gh-release/issues/236
14+
permissions:
15+
contents: write
16+
17+
env:
18+
PYTHONUTF8: "1"
19+
python-version: 3.x
20+
cache: pip
21+
22+
jobs:
23+
test:
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
runs-on:
28+
- ubuntu-latest
29+
- macos-latest
30+
- windows-latest
31+
runs-on: ${{matrix.runs-on}}
32+
steps:
33+
- uses: actions/checkout@v3
34+
- uses: actions/setup-python@v4
35+
with:
36+
python-version: ${{env.python-version}}
37+
cache: ${{env.cache}}
38+
cache-dependency-path: |-
39+
requirements.txt
40+
requirements/dev.txt
41+
- name: Install dependencies
42+
run: |
43+
pip install -e '.[dev]'
44+
- name: Test
45+
run: |
46+
pytest --cov
47+
- uses: codecov/codecov-action@v3
48+
build:
49+
needs: test
50+
strategy:
51+
fail-fast: false
52+
matrix:
53+
runs-on:
54+
- ubuntu-latest
55+
- macos-latest
56+
- windows-latest
57+
runs-on: ${{matrix.runs-on}}
58+
steps:
59+
- uses: actions/checkout@v3
60+
- uses: actions/setup-python@v4
61+
with:
62+
python-version: ${{env.python-version}}
63+
cache: ${{env.cache}}
64+
cache-dependency-path: |-
65+
requirements.txt
66+
requirements/dev.txt
67+
- name: Install dependencies
68+
run: |
69+
pip install build
70+
- name: Build
71+
run: |
72+
pyproject-build
73+
- uses: pypa/gh-action-pypi-publish@release/v1
74+
if: runner.os == 'Linux' && startsWith(github.ref, 'refs/tags/')
75+
with:
76+
password: ${{secrets.PYPI_API_TOKEN}}
77+
- uses: actions/upload-artifact@v3
78+
if: runner.os == 'Linux' && ! startsWith(github.ref, 'refs/tags/')
79+
with:
80+
path: |
81+
dist/*
82+
- uses: softprops/action-gh-release@v1
83+
if: runner.os == 'Linux' && startsWith(github.ref, 'refs/tags/')
84+
with:
85+
# body_path: build/CHANGELOG.md
86+
files: |
87+
dist/*
88+
deploy:
89+
needs: build
90+
runs-on: ubuntu-latest
91+
steps:
92+
- uses: Freed-Wu/[email protected]
93+
if: startsWith(github.ref, 'refs/tags/')
94+
with:
95+
package_name: python-${{github.repository}}
96+
ssh_private_key: ${{secrets.AUR_SSH_PRIVATE_KEY}}

.gitignore

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
/result
2+
_version.py
3+
_metainfo.py
4+
5+
# create by https://github.com/iamcco/coc-gitignore (Sat Jun 17 2023 19:59:16 GMT+0800 (China Standard Time))
6+
# pydev.gitignore:
7+
.pydevproject
8+
9+
# create by https://github.com/iamcco/coc-gitignore (Sat Jun 17 2023 19:59:20 GMT+0800 (China Standard Time))
10+
# Python.gitignore:
11+
# Byte-compiled / optimized / DLL files
12+
__pycache__/
13+
*.py[cod]
14+
*$py.class
15+
16+
# C extensions
17+
*.so
18+
19+
# Distribution / packaging
20+
.Python
21+
build/
22+
develop-eggs/
23+
dist/
24+
downloads/
25+
eggs/
26+
.eggs/
27+
lib/
28+
lib64/
29+
parts/
30+
sdist/
31+
var/
32+
wheels/
33+
pip-wheel-metadata/
34+
share/python-wheels/
35+
*.egg-info/
36+
.installed.cfg
37+
*.egg
38+
MANIFEST
39+
40+
# PyInstaller
41+
# Usually these files are written by a python script from a template
42+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
43+
*.manifest
44+
*.spec
45+
46+
# Installer logs
47+
pip-log.txt
48+
pip-delete-this-directory.txt
49+
50+
# Unit test / coverage reports
51+
htmlcov/
52+
.tox/
53+
.nox/
54+
.coverage
55+
.coverage.*
56+
.cache
57+
nosetests.xml
58+
coverage.xml
59+
*.cover
60+
.hypothesis/
61+
.pytest_cache/
62+
63+
# Translations
64+
*.mo
65+
*.pot
66+
67+
# Django stuff:
68+
*.log
69+
local_settings.py
70+
db.sqlite3
71+
db.sqlite3-journal
72+
73+
# Flask stuff:
74+
instance/
75+
.webassets-cache
76+
77+
# Scrapy stuff:
78+
.scrapy
79+
80+
# Sphinx documentation
81+
docs/_build/
82+
83+
# PyBuilder
84+
target/
85+
86+
# Jupyter Notebook
87+
.ipynb_checkpoints
88+
89+
# IPython
90+
profile_default/
91+
ipython_config.py
92+
93+
# pyenv
94+
.python-version
95+
96+
# pipenv
97+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
98+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
99+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
100+
# install all needed dependencies.
101+
#Pipfile.lock
102+
103+
# celery beat schedule file
104+
celerybeat-schedule
105+
106+
# SageMath parsed files
107+
*.sage.py
108+
109+
# Environments
110+
.env
111+
.venv
112+
env/
113+
venv/
114+
ENV/
115+
env.bak/
116+
venv.bak/
117+
118+
# Spyder project settings
119+
.spyderproject
120+
.spyproject
121+
122+
# Rope project settings
123+
.ropeproject
124+
125+
# mkdocs documentation
126+
/site
127+
128+
# mypy
129+
.mypy_cache/
130+
.dmypy.json
131+
dmypy.json
132+
133+
# Pyre type checker
134+
.pyre/

.gitlint

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env -S gitlint -C
2+
[ignore-by-title]
3+
regex=.*
4+
ignore=body-is-missing
5+
# ex: filetype=dosini

.pre-commit-config.yaml

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
---
2+
exclude: (^templates/.*|.*\.json$)
3+
4+
repos:
5+
- repo: https://github.com/pre-commit/pre-commit-hooks
6+
rev: v4.4.0
7+
hooks:
8+
- id: check-added-large-files
9+
- id: fix-byte-order-marker
10+
- id: check-case-conflict
11+
- id: check-shebang-scripts-are-executable
12+
- id: check-merge-conflict
13+
- id: trailing-whitespace
14+
- id: mixed-line-ending
15+
- id: end-of-file-fixer
16+
- id: detect-private-key
17+
- id: check-symlinks
18+
- id: check-ast
19+
- id: debug-statements
20+
- id: requirements-txt-fixer
21+
- id: check-xml
22+
- id: check-yaml
23+
- id: check-toml
24+
- id: check-json
25+
- repo: https://github.com/Lucas-C/pre-commit-hooks
26+
rev: v1.5.1
27+
hooks:
28+
- id: remove-crlf
29+
- repo: https://github.com/codespell-project/codespell
30+
rev: v2.2.4
31+
hooks:
32+
- id: codespell
33+
additional_dependencies:
34+
- tomli
35+
- repo: https://github.com/jorisroovers/gitlint
36+
rev: v0.19.1
37+
hooks:
38+
- id: gitlint
39+
args:
40+
- --msg-filename
41+
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
42+
rev: 2.7.1
43+
hooks:
44+
- id: editorconfig-checker
45+
- repo: https://github.com/jumanjihouse/pre-commit-hooks
46+
rev: 3.0.0
47+
hooks:
48+
- id: check-mailmap
49+
- repo: https://github.com/rhysd/actionlint
50+
rev: v1.6.25
51+
hooks:
52+
- id: actionlint
53+
- repo: https://github.com/adrienverge/yamllint
54+
rev: v1.32.0
55+
hooks:
56+
- id: yamllint
57+
- repo: https://github.com/executablebooks/mdformat
58+
rev: 0.7.16
59+
hooks:
60+
- id: mdformat
61+
additional_dependencies:
62+
- mdformat-pyproject
63+
- mdformat-gfm
64+
- mdformat-myst
65+
- mdformat-toc
66+
- mdformat-deflist
67+
- mdformat-beautysh
68+
- mdformat-black
69+
- mdformat-config
70+
- repo: https://github.com/DavidAnson/markdownlint-cli2
71+
rev: v0.7.1
72+
hooks:
73+
- id: markdownlint-cli2
74+
additional_dependencies:
75+
76+
- repo: https://github.com/perltidy/perltidy
77+
rev: "20230309.02"
78+
hooks:
79+
- id: perltidy
80+
- repo: https://github.com/psf/black
81+
rev: 23.3.0
82+
hooks:
83+
- id: black
84+
- repo: https://github.com/PyCQA/isort
85+
rev: 5.12.0
86+
hooks:
87+
- id: isort
88+
- repo: https://github.com/pycqa/pydocstyle
89+
rev: 6.3.0
90+
hooks:
91+
- id: pydocstyle
92+
additional_dependencies:
93+
- tomli
94+
- repo: https://github.com/kumaraditya303/mirrors-pyright
95+
rev: v1.1.310
96+
hooks:
97+
- id: pyright
98+
- repo: https://github.com/PyCQA/bandit
99+
rev: 1.7.5
100+
hooks:
101+
- id: bandit
102+
args:
103+
- -cpyproject.toml
104+
additional_dependencies:
105+
- tomli
106+
- repo: https://github.com/nix-community/nixpkgs-fmt
107+
rev: v1.3.0
108+
hooks:
109+
- id: nixpkgs-fmt
110+
111+
ci:
112+
skip:
113+
- pyright

.readthedocs.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# https://docs.readthedocs.io/en/stable/config-file/v2.html
2+
---
3+
version: 2
4+
5+
build:
6+
os: ubuntu-22.04
7+
tools:
8+
python: "3"
9+
10+
formats:
11+
- htmlzip
12+
13+
python:
14+
install:
15+
- requirements: docs/requirements.txt

.yamllint.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env -S yamllint -c
2+
---
3+
extends: default
4+
5+
rules:
6+
comments:
7+
# https://github.com/prettier/prettier/issues/6780
8+
min-spaces-from-content: 1

0 commit comments

Comments
 (0)