Skip to content

Commit 1d6436a

Browse files
authored
Merge pull request #1 from wfloat/init
Init
2 parents be680bf + 8314489 commit 1d6436a

24 files changed

Lines changed: 1962 additions & 398 deletions

.github/workflows/wheels.yml

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
name: Python
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
push:
7+
branches:
8+
- main
9+
tags:
10+
- "v*"
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Check out repository
21+
uses: actions/checkout@v6
22+
with:
23+
persist-credentials: false
24+
25+
- name: Set up Python
26+
uses: actions/setup-python@v6
27+
with:
28+
python-version: "3.13"
29+
30+
- name: Install build tools
31+
run: python -m pip install --upgrade pip build
32+
33+
- name: Build artifacts
34+
run: python -m build
35+
36+
- name: Upload artifacts
37+
uses: actions/upload-artifact@v4
38+
with:
39+
name: dist
40+
path: dist/*
41+
42+
unit-tests:
43+
needs: build
44+
name: ${{ matrix.name }}
45+
runs-on: ${{ matrix.os }}
46+
strategy:
47+
fail-fast: false
48+
matrix:
49+
include:
50+
- name: linux-x86_64
51+
os: ubuntu-latest
52+
python-version: "3.9"
53+
- name: windows-x86_64
54+
os: windows-latest
55+
python-version: "3.10"
56+
- name: macos-x86_64
57+
os: macos-15-intel
58+
python-version: "3.12"
59+
- name: macos-arm64
60+
os: macos-15
61+
python-version: "3.13"
62+
63+
steps:
64+
- name: Check out repository
65+
uses: actions/checkout@v6
66+
with:
67+
persist-credentials: false
68+
69+
- name: Download artifacts
70+
uses: actions/download-artifact@v4
71+
with:
72+
name: dist
73+
path: dist
74+
75+
- name: Set up Python
76+
uses: actions/setup-python@v6
77+
with:
78+
python-version: ${{ matrix.python-version }}
79+
80+
- name: Install wfloat artifact with dependencies
81+
shell: bash
82+
run: |
83+
python -m pip install --upgrade pip
84+
python -m pip install dist/*.whl
85+
86+
- name: Run unit tests
87+
run: python -m unittest discover -s tests -v
88+
89+
- name: Run integration smoke test
90+
run: python -c "import sherpa_onnx, wfloat; import wfloat._bindings as bindings; print(wfloat.__version__); print(sherpa_onnx.__version__); print(bindings.OfflineTts)"
91+
92+
publish:
93+
name: Publish to PyPI
94+
if: github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/v')
95+
needs:
96+
- build
97+
- unit-tests
98+
runs-on: ubuntu-latest
99+
environment:
100+
name: pypi
101+
url: https://pypi.org/project/wfloat/
102+
permissions:
103+
id-token: write
104+
105+
steps:
106+
- name: Download artifacts
107+
uses: actions/download-artifact@v4
108+
with:
109+
name: dist
110+
path: dist
111+
112+
- name: Publish package distributions to PyPI
113+
uses: pypa/gh-action-pypi-publish@release/v1

.gitignore

Lines changed: 222 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.venv*/
2+
build-*/
23
out/
34

45
__pycache__/
@@ -10,3 +11,224 @@ python/wfloat/lib/*.pyd
1011
python/wfloat/lib/*.dll
1112
python/wfloat/lib/*.dylib
1213
python/wfloat/lib/*.lib
14+
15+
# Byte-compiled / optimized / DLL files
16+
__pycache__/
17+
*.py[codz]
18+
*$py.class
19+
20+
# C extensions
21+
*.so
22+
23+
# Distribution / packaging
24+
.Python
25+
build/
26+
develop-eggs/
27+
dist/
28+
downloads/
29+
eggs/
30+
.eggs/
31+
lib/
32+
lib64/
33+
parts/
34+
sdist/
35+
var/
36+
wheels/
37+
share/python-wheels/
38+
*.egg-info/
39+
.installed.cfg
40+
*.egg
41+
MANIFEST
42+
43+
# PyInstaller
44+
# Usually these files are written by a python script from a template
45+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
46+
*.manifest
47+
*.spec
48+
49+
# Installer logs
50+
pip-log.txt
51+
pip-delete-this-directory.txt
52+
53+
# Unit test / coverage reports
54+
htmlcov/
55+
.tox/
56+
.nox/
57+
.coverage
58+
.coverage.*
59+
.cache
60+
nosetests.xml
61+
coverage.xml
62+
*.cover
63+
*.py.cover
64+
*.lcov
65+
.hypothesis/
66+
.pytest_cache/
67+
cover/
68+
69+
# Translations
70+
*.mo
71+
*.pot
72+
73+
# Django stuff:
74+
*.log
75+
local_settings.py
76+
db.sqlite3
77+
db.sqlite3-journal
78+
79+
# Flask stuff:
80+
instance/
81+
.webassets-cache
82+
83+
# Scrapy stuff:
84+
.scrapy
85+
86+
# Sphinx documentation
87+
docs/_build/
88+
89+
# PyBuilder
90+
.pybuilder/
91+
target/
92+
93+
# Jupyter Notebook
94+
.ipynb_checkpoints
95+
96+
# IPython
97+
profile_default/
98+
ipython_config.py
99+
100+
# pyenv
101+
# For a library or package, you might want to ignore these files since the code is
102+
# intended to run in multiple environments; otherwise, check them in:
103+
# .python-version
104+
105+
# pipenv
106+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
107+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
108+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
109+
# install all needed dependencies.
110+
# Pipfile.lock
111+
112+
# UV
113+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
114+
# This is especially recommended for binary packages to ensure reproducibility, and is more
115+
# commonly ignored for libraries.
116+
# uv.lock
117+
118+
# poetry
119+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
120+
# This is especially recommended for binary packages to ensure reproducibility, and is more
121+
# commonly ignored for libraries.
122+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
123+
# poetry.lock
124+
# poetry.toml
125+
126+
# pdm
127+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
128+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
129+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
130+
# pdm.lock
131+
# pdm.toml
132+
.pdm-python
133+
.pdm-build/
134+
135+
# pixi
136+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
137+
# pixi.lock
138+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
139+
# in the .venv directory. It is recommended not to include this directory in version control.
140+
.pixi/*
141+
!.pixi/config.toml
142+
143+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
144+
__pypackages__/
145+
146+
# Celery stuff
147+
celerybeat-schedule*
148+
celerybeat.pid
149+
150+
# Redis
151+
*.rdb
152+
*.aof
153+
*.pid
154+
155+
# RabbitMQ
156+
mnesia/
157+
rabbitmq/
158+
rabbitmq-data/
159+
160+
# ActiveMQ
161+
activemq-data/
162+
163+
# SageMath parsed files
164+
*.sage.py
165+
166+
# Environments
167+
.env
168+
.envrc
169+
.venv
170+
env/
171+
venv/
172+
ENV/
173+
env.bak/
174+
venv.bak/
175+
176+
# Spyder project settings
177+
.spyderproject
178+
.spyproject
179+
180+
# Rope project settings
181+
.ropeproject
182+
183+
# mkdocs documentation
184+
/site
185+
186+
# mypy
187+
.mypy_cache/
188+
.dmypy.json
189+
dmypy.json
190+
191+
# Pyre type checker
192+
.pyre/
193+
194+
# pytype static type analyzer
195+
.pytype/
196+
197+
# Cython debug symbols
198+
cython_debug/
199+
200+
# PyCharm
201+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
202+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
203+
# and can be added to the global gitignore or merged into this file. For a more nuclear
204+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
205+
# .idea/
206+
207+
# Abstra
208+
# Abstra is an AI-powered process automation framework.
209+
# Ignore directories containing user credentials, local state, and settings.
210+
# Learn more at https://abstra.io/docs
211+
.abstra/
212+
213+
# Visual Studio Code
214+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
215+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
216+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
217+
# you could uncomment the following to ignore the entire vscode folder
218+
# .vscode/
219+
# Temporary file for partial code execution
220+
tempCodeRunnerFile.py
221+
222+
# Ruff stuff:
223+
.ruff_cache/
224+
225+
# PyPI configuration file
226+
.pypirc
227+
228+
# Marimo
229+
marimo/_static/
230+
marimo/_lsp/
231+
__marimo__/
232+
233+
# Streamlit
234+
.streamlit/secrets.toml

0 commit comments

Comments
 (0)