Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
fakufaku committed Nov 8, 2024
2 parents 2f65c71 + 1f1d644 commit b51ed82
Show file tree
Hide file tree
Showing 259 changed files with 14,249 additions and 2,248 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,24 @@ jobs:

steps:
- name: Check out Git repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.9

- name: Install Python dependencies
run: pip install black flake8
run: pip install black flake8 isort

- name: Run linters
uses: wearerequired/lint-action@v1
uses: wearerequired/lint-action@v2
with:
black: true
black_args: "--check"
flake8: false

- name: Sort imports
uses: isort/[email protected]
with:
configuration: --check-only --diff --profile black
56 changes: 35 additions & 21 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,55 +10,73 @@ jobs:
fail-fast: false
max-parallel: 12
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.7, 3.8, 3.9]
# switch temporarily to windows-2019 due to a breaking
# change making mutex constexpr
# a crash occurs if python and the extension are built
# with different versions
# over time, this should hopefully resolves itself
# ref: https://github.com/microsoft/STL/issues/4875
os: [ubuntu-latest, macos-13, macos-latest, windows-2019]
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
exclude:
- os: macos-latest
python-version: 3.8
- os: macos-latest
python-version: 3.9
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Checkout submodules
shell: bash
run: |
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
- name: Upgrade pip
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Lint with flake8
- name: Workaround for windows and python 3.8
if: matrix.os == 'windows-2019' && matrix.python-version == 3.8
run: |
pip install netCDF4<=1.5.8
# There is no binary package of netCF4>=1.6.0 for windows and python 3.7
# the largest supported version is 1.5.8
- name: Install dependencies
run: |
# pip install flake8
# stop the build if there are Python syntax errors or undefined names
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
pip install -r requirements.txt
- name: Build package
run: |
python -m pip install -e .
- name: Test with pytest
run: |
pip install pytest
pip install -U pytest setuptools build wheel twine
pytest
- name: Test the universal wheels
if: matrix.os == 'ubuntu-latest'
run: |
python -m build --sdist
twine check dist/*
- name: Test the binary wheels
if: matrix.os != 'ubuntu-latest'
run: |
python -m build --wheel
twine check dist/*
- name: Publish sdist to pypi
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') && matrix.os == 'ubuntu-latest'
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
pip install wheel twine
python setup.py sdist
twine upload --skip-existing dist/*
- name: Publish bdist to pypi
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') && matrix.os != 'ubuntu-latest'
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
pip install wheel twine
python setup.py bdist_wheel
twine upload --skip-existing dist/*
- name: Publish sdist to pypi-test
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/test-') && matrix.os == 'ubuntu-latest'
Expand All @@ -67,8 +85,6 @@ jobs:
TWINE_PASSWORD: ${{ secrets.PYPITEST_PASSWORD }}
TWINE_REPOSITORY_URL: https://test.pypi.org/legacy/
run: |
pip install wheel twine
python setup.py sdist
twine upload --skip-existing dist/*
- name: Publish bdist to pypi-test
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/test-') && matrix.os != 'ubuntu-latest'
Expand All @@ -77,6 +93,4 @@ jobs:
TWINE_PASSWORD: ${{ secrets.PYPITEST_PASSWORD }}
TWINE_REPOSITORY_URL: https://test.pypi.org/legacy/
run: |
pip install wheel twine
python setup.py bdist_wheel
twine upload --skip-existing dist/*
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,14 @@
*.idea
*.DS_Store
*.wav
*.so
build/
docs/_build
dist/
local_examples/
*.ipynb_checkpoints
# files added after editable install (pip install -e . )
pyroomacoustics.egg-info/
pyroomacoustics/build_rir.c
pyroomacoustics/**/*.so
pyroomacoustics/directivities/tests/data/*.pdf
35 changes: 35 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.12"
# You can also specify other tool versions:
# nodejs: "20"
# rust: "1.70"
# golang: "1.20"

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
# builder: "dirhtml"
# Fail on all warnings to avoid broken references
# fail_on_warning: true

# Optionally build your docs in additional formats such as PDF and ePub
# formats:
# - pdf
# - epub

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: docs/requirements.txt
Loading

0 comments on commit b51ed82

Please sign in to comment.