Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,23 @@ jobs:
run: pip install --editable . --verbose
- name: Run tests
run: python -m pytest

type-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Install requirements
run: pip install numpy pytest pyright
- name: "Workaround: Generate _soundfile.py explicitly"
run: |
pip install cffi>=1.0
python soundfile_build.py
- name: Install editable package
run: pip install --editable . --verbose
- name: Run type check
run: python -m pyright soundfile.py
9 changes: 9 additions & 0 deletions pyrightconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"pythonVersion": "3.9",
"exclude": [
"**/node_modules",
"**/__pycache__",
"**/.venv",
"tests/"
]
}
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def get_tag(self):
zip_safe=zip_safe,
license='BSD 3-Clause License',
setup_requires=["cffi>=1.0"],
install_requires=['cffi>=1.0', 'numpy'],
install_requires=['cffi>=1.0', 'numpy', 'typing-extensions'],
cffi_modules=["soundfile_build.py:ffibuilder"],
extras_require={'numpy': []}, # This option is no longer relevant, but the empty entry must be left in to avoid breaking old build scripts.
platforms='any',
Expand Down
Loading
Loading