Skip to content

Commit 8d2ec33

Browse files
authored
Initial commit (#1)
1 parent 42d9e2d commit 8d2ec33

24 files changed

+11479
-0
lines changed

.github/workflows/CI-test.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: CI-test
2+
3+
env:
4+
GITHUB_ACTIONS: true
5+
6+
on:
7+
push:
8+
branches: ["main"]
9+
paths-ignore:
10+
- "**.md"
11+
- "LICENSE"
12+
13+
pull_request:
14+
branches: ["main"]
15+
paths-ignore:
16+
- "**.md"
17+
- "LICENSE"
18+
19+
workflow_dispatch:
20+
21+
jobs:
22+
CI:
23+
strategy:
24+
matrix:
25+
os-version: ["ubuntu-22.04", "macos-14"]
26+
python-version: ["3.10"]
27+
poetry-version: ["1.8.3"]
28+
29+
runs-on: ${{ matrix.os-version }}
30+
steps:
31+
- uses: actions/checkout@v3
32+
with:
33+
submodules: recursive
34+
35+
- uses: actions/setup-python@v4
36+
with:
37+
python-version: ${{ matrix.python-version }}
38+
39+
- uses: abatilo/actions-poetry@v2
40+
with:
41+
poetry-version: ${{ matrix.poetry-version }}
42+
43+
- name: Setup vapoursynth
44+
uses: deadnews/[email protected]
45+
46+
- name: Test
47+
run: |
48+
poetry install
49+
50+
make lint
51+
make test

.github/workflows/Release.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
6+
push:
7+
tags:
8+
- "v*"
9+
10+
jobs:
11+
pypi:
12+
strategy:
13+
matrix:
14+
python-version: ["3.10"]
15+
poetry-version: ["1.8.3"]
16+
17+
runs-on: ubuntu-22.04
18+
steps:
19+
- uses: actions/checkout@v3
20+
with:
21+
submodules: recursive
22+
23+
- uses: actions/setup-python@v4
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
27+
- uses: abatilo/actions-poetry@v2
28+
with:
29+
poetry-version: ${{ matrix.poetry-version }}
30+
31+
- name: Build package
32+
run: |
33+
make build
34+
35+
- name: Publish a Python distribution to PyPI
36+
uses: pypa/gh-action-pypi-publish@release/v1
37+
with:
38+
password: ${{ secrets.PYPI_API }}
39+
40+
github:
41+
needs: [pypi]
42+
runs-on: ubuntu-22.04
43+
steps:
44+
- uses: actions/checkout@v3
45+
with:
46+
submodules: recursive
47+
48+
- name: Release
49+
uses: softprops/action-gh-release@v2

.gitignore

+166
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
*.DS_Store
7+
8+
# Distribution / packaging
9+
.Python
10+
build/
11+
develop-eggs/
12+
dist/
13+
downloads/
14+
eggs/
15+
.eggs/
16+
lib/
17+
lib64/
18+
parts/
19+
sdist/
20+
var/
21+
wheels/
22+
share/python-wheels/
23+
*.egg-info/
24+
.installed.cfg
25+
*.egg
26+
MANIFEST
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+
.nox/
42+
.coverage
43+
.coverage.*
44+
.cache
45+
nosetests.xml
46+
coverage.xml
47+
*.cover
48+
*.py,cover
49+
.hypothesis/
50+
.pytest_cache/
51+
cover/
52+
53+
# Translations
54+
*.mo
55+
*.pot
56+
57+
# Django stuff:
58+
*.log
59+
local_settings.py
60+
db.sqlite3
61+
db.sqlite3-journal
62+
63+
# Flask stuff:
64+
instance/
65+
.webassets-cache
66+
67+
# Scrapy stuff:
68+
.scrapy
69+
70+
# Sphinx documentation
71+
docs/_build/
72+
73+
# PyBuilder
74+
.pybuilder/
75+
target/
76+
77+
# Jupyter Notebook
78+
.ipynb_checkpoints
79+
80+
# IPython
81+
profile_default/
82+
ipython_config.py
83+
84+
# pyenv
85+
# For a library or package, you might want to ignore these files since the code is
86+
# intended to run in multiple environments; otherwise, check them in:
87+
# .python-version
88+
89+
# pipenv
90+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
91+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
92+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
93+
# install all needed dependencies.
94+
#Pipfile.lock
95+
96+
# poetry
97+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
98+
# This is especially recommended for binary packages to ensure reproducibility, and is more
99+
# commonly ignored for libraries.
100+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
101+
#poetry.lock
102+
103+
# pdm
104+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
105+
#pdm.lock
106+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
107+
# in version control.
108+
# https://pdm.fming.dev/#use-with-ide
109+
.pdm.toml
110+
.pdm-python
111+
.pdm-build/
112+
113+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
114+
__pypackages__/
115+
116+
# Celery stuff
117+
celerybeat-schedule
118+
celerybeat.pid
119+
120+
# SageMath parsed files
121+
*.sage.py
122+
123+
# Environments
124+
.env
125+
.venv
126+
env/
127+
venv/
128+
ENV/
129+
env.bak/
130+
venv.bak/
131+
132+
# Spyder project settings
133+
.spyderproject
134+
.spyproject
135+
136+
# Rope project settings
137+
.ropeproject
138+
139+
# mkdocs documentation
140+
/site
141+
142+
# mypy
143+
.mypy_cache/
144+
.dmypy.json
145+
dmypy.json
146+
147+
# Pyre type checker
148+
.pyre/
149+
150+
# pytype static type analyzer
151+
.pytype/
152+
153+
# Cython debug symbols
154+
cython_debug/
155+
156+
# PyCharm
157+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
158+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
159+
# and can be added to the global gitignore or merged into this file. For a more nuclear
160+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
161+
.idea/
162+
/.ruff_cache/
163+
164+
/assets/*.mkv
165+
/assets/*.srt
166+
/assets/*.ass

.pre-commit-config.yaml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.5.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-json
8+
- id: check-yaml
9+
- id: check-xml
10+
- id: check-toml
11+
12+
# autofix json, yaml, markdown...
13+
- repo: https://github.com/pre-commit/mirrors-prettier
14+
rev: v3.1.0
15+
hooks:
16+
- id: prettier
17+
18+
# autofix toml
19+
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
20+
rev: v2.12.0
21+
hooks:
22+
- id: pretty-format-toml
23+
args: [--autofix]
24+
25+
- repo: https://github.com/astral-sh/ruff-pre-commit
26+
rev: v0.1.6
27+
hooks:
28+
- id: ruff-format
29+
- id: ruff
30+
args: [--fix, --exit-non-zero-on-fix]
31+
32+
- repo: https://github.com/pre-commit/mirrors-mypy
33+
rev: v1.7.1
34+
hooks:
35+
- id: mypy
36+
args: [mbfunc, tests]
37+
pass_filenames: false
38+
additional_dependencies:
39+
- types-requests
40+
- types-certifi
41+
- pytest
42+
- pydantic
43+
- tenacity

Makefile

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
.DEFAULT_GOAL := default
2+
3+
.PHONY: test
4+
test:
5+
poetry run pytest --cov=mbfunc --cov-report=xml --cov-report=html
6+
7+
.PHONY: lint
8+
lint:
9+
poetry run pre-commit install
10+
poetry run pre-commit run --all-files
11+
12+
.PHONY: build
13+
build:
14+
poetry build --format wheel

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# mbfunc
2+
23
mbf's VapourSynth functions

mbfunc/__init__.py

Whitespace-only changes.

mbfunc/dehalo/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from mbfunc.dehalo.dehalo import FineDehalo, DeHalo_alpha # noqa

0 commit comments

Comments
 (0)