acoustic-spaces 3.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- acoustic_spaces-3.2.0/.clang-format +5 -0
- acoustic_spaces-3.2.0/.editorconfig +15 -0
- acoustic_spaces-3.2.0/.github/workflows/ci.yml +278 -0
- acoustic_spaces-3.2.0/.gitignore +31 -0
- acoustic_spaces-3.2.0/CHANGELOG.md +1043 -0
- acoustic_spaces-3.2.0/CMakeLists.txt +45 -0
- acoustic_spaces-3.2.0/CONTRIBUTING.md +108 -0
- acoustic_spaces-3.2.0/LICENSE +674 -0
- acoustic_spaces-3.2.0/PKG-INFO +201 -0
- acoustic_spaces-3.2.0/README.md +135 -0
- acoustic_spaces-3.2.0/cpp/bindings/native_module.cpp +682 -0
- acoustic_spaces-3.2.0/cpp/include/acoustic_spaces/bvh.hpp +400 -0
- acoustic_spaces-3.2.0/cpp/include/acoustic_spaces/convolver.hpp +253 -0
- acoustic_spaces-3.2.0/cpp/include/acoustic_spaces/direct_convolution.hpp +63 -0
- acoustic_spaces-3.2.0/cpp/include/acoustic_spaces/fdtd.hpp +891 -0
- acoustic_spaces-3.2.0/cpp/include/acoustic_spaces/fft.hpp +159 -0
- acoustic_spaces-3.2.0/cpp/include/acoustic_spaces/ray_tracer.hpp +1015 -0
- acoustic_spaces-3.2.0/cpp/include/acoustic_spaces/vec3.hpp +47 -0
- acoustic_spaces-3.2.0/docs/api.md +197 -0
- acoustic_spaces-3.2.0/docs/changelog.md +2 -0
- acoustic_spaces-3.2.0/docs/conf.py +33 -0
- acoustic_spaces-3.2.0/docs/coverage-maps.md +62 -0
- acoustic_spaces-3.2.0/docs/development.md +47 -0
- acoustic_spaces-3.2.0/docs/editor.md +174 -0
- acoustic_spaces-3.2.0/docs/examples.md +28 -0
- acoustic_spaces-3.2.0/docs/getting-started.md +165 -0
- acoustic_spaces-3.2.0/docs/images/church_paths.png +0 -0
- acoustic_spaces-3.2.0/docs/images/coverage.png +0 -0
- acoustic_spaces-3.2.0/docs/images/diffraction.png +0 -0
- acoustic_spaces-3.2.0/docs/images/directions.png +0 -0
- acoustic_spaces-3.2.0/docs/images/directivity.png +0 -0
- acoustic_spaces-3.2.0/docs/images/editor.png +0 -0
- acoustic_spaces-3.2.0/docs/images/editor_map.png +0 -0
- acoustic_spaces-3.2.0/docs/images/measured.png +0 -0
- acoustic_spaces-3.2.0/docs/images/orchestra_video.png +0 -0
- acoustic_spaces-3.2.0/docs/images/particles.gif +0 -0
- acoustic_spaces-3.2.0/docs/images/plan.png +0 -0
- acoustic_spaces-3.2.0/docs/images/response.png +0 -0
- acoustic_spaces-3.2.0/docs/images/wave.png +0 -0
- acoustic_spaces-3.2.0/docs/index.md +24 -0
- acoustic_spaces-3.2.0/docs/measurements.md +219 -0
- acoustic_spaces-3.2.0/docs/roadmap.md +70 -0
- acoustic_spaces-3.2.0/docs/scenes.md +532 -0
- acoustic_spaces-3.2.0/docs/screenshots.py +145 -0
- acoustic_spaces-3.2.0/docs/simulation.md +540 -0
- acoustic_spaces-3.2.0/docs/spatial-audio.md +283 -0
- acoustic_spaces-3.2.0/docs/validation/bras_CR2_fitted.png +0 -0
- acoustic_spaces-3.2.0/docs/validation/bras_CR2_initial.png +0 -0
- acoustic_spaces-3.2.0/docs/validation/bras_CR2_initial_calibrated.png +0 -0
- acoustic_spaces-3.2.0/docs/validation/bras_CR3_fitted.png +0 -0
- acoustic_spaces-3.2.0/docs/validation/bras_CR3_initial.png +0 -0
- acoustic_spaces-3.2.0/docs/validation/bras_CR3_initial_calibrated.png +0 -0
- acoustic_spaces-3.2.0/docs/validation/crosscheck_diffuse.png +0 -0
- acoustic_spaces-3.2.0/docs/validation/crosscheck_example.png +0 -0
- acoustic_spaces-3.2.0/docs/validation/crosscheck_hall.png +0 -0
- acoustic_spaces-3.2.0/docs/validation/crosscheck_specular.png +0 -0
- acoustic_spaces-3.2.0/docs/validation.md +916 -0
- acoustic_spaces-3.2.0/examples/apartment/apartment.obj +65 -0
- acoustic_spaces-3.2.0/examples/apartment/make_model.py +82 -0
- acoustic_spaces-3.2.0/examples/apartment/scene.yaml +68 -0
- acoustic_spaces-3.2.0/examples/archway/scene.yaml +54 -0
- acoustic_spaces-3.2.0/examples/bim_office/make_model.py +223 -0
- acoustic_spaces-3.2.0/examples/bim_office/office.ifc +332 -0
- acoustic_spaces-3.2.0/examples/bim_office/scene.yaml +43 -0
- acoustic_spaces-3.2.0/examples/church/scene.yaml +54 -0
- acoustic_spaces-3.2.0/examples/concert_hall/concert_hall.obj +49 -0
- acoustic_spaces-3.2.0/examples/concert_hall/scene.yaml +60 -0
- acoustic_spaces-3.2.0/examples/fitting/make_measurements.py +59 -0
- acoustic_spaces-3.2.0/examples/fitting/scene.yaml +66 -0
- acoustic_spaces-3.2.0/examples/gallery/scene.yaml +44 -0
- acoustic_spaces-3.2.0/examples/gallery_walk/scene.yaml +42 -0
- acoustic_spaces-3.2.0/examples/leaky_classroom/classroom.obj +39 -0
- acoustic_spaces-3.2.0/examples/leaky_classroom/scene.yaml +44 -0
- acoustic_spaces-3.2.0/examples/lecture_hall/scene.yaml +46 -0
- acoustic_spaces-3.2.0/examples/listening_room/bass.py +63 -0
- acoustic_spaces-3.2.0/examples/listening_room/scene.yaml +39 -0
- acoustic_spaces-3.2.0/examples/material_libraries/catt_materials.geo +5 -0
- acoustic_spaces-3.2.0/examples/material_libraries/odeon_materials.li8 +6 -0
- acoustic_spaces-3.2.0/examples/material_libraries/scene.yaml +40 -0
- acoustic_spaces-3.2.0/examples/measurement/virtual_recording.py +52 -0
- acoustic_spaces-3.2.0/examples/orchestra/auralize.sh +105 -0
- acoustic_spaces-3.2.0/examples/orchestra/concert_hall.obj +49 -0
- acoustic_spaces-3.2.0/examples/orchestra/make_images.py +373 -0
- acoustic_spaces-3.2.0/examples/orchestra/make_video.sh +23 -0
- acoustic_spaces-3.2.0/examples/orchestra/scene.yaml +310 -0
- acoustic_spaces-3.2.0/examples/rehearsal_room/make_model.py +129 -0
- acoustic_spaces-3.2.0/examples/rehearsal_room/room.dae +181 -0
- acoustic_spaces-3.2.0/examples/rehearsal_room/scene.yaml +33 -0
- acoustic_spaces-3.2.0/examples/room_modes/scene.yaml +43 -0
- acoustic_spaces-3.2.0/examples/shoebox/scene.yaml +47 -0
- acoustic_spaces-3.2.0/examples/shoebox/shoebox.obj +28 -0
- acoustic_spaces-3.2.0/examples/studio/scene.yaml +54 -0
- acoustic_spaces-3.2.0/examples/town_hall_pa/delays.py +41 -0
- acoustic_spaces-3.2.0/examples/town_hall_pa/scene.yaml +95 -0
- acoustic_spaces-3.2.0/examples/workshop/scene.yaml +62 -0
- acoustic_spaces-3.2.0/pyproject.toml +130 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/__init__.py +46 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/_extras.py +12 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/_version.py +3 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/air.py +75 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/audio.py +117 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/calibration.py +535 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/cli.py +2464 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/compare.py +345 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/directivity.py +633 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/engine/__init__.py +53 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/engine/coherent.py +338 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/engine/coverage.py +801 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/engine/diffraction.py +1441 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/engine/early.py +412 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/engine/gpu.py +513 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/engine/gpu_rays.py +357 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/engine/gpu_tracer.py +1041 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/engine/grazing.py +152 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/engine/impedance.py +253 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/engine/late.py +679 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/engine/leaks.py +481 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/engine/model.py +354 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/engine/particles.py +173 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/engine/ray_device.py +352 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/engine/response.py +402 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/engine/reweight.py +163 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/engine/simulate.py +607 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/engine/tuning.py +477 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/engine/wave.py +528 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/examples.py +130 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/geometry/__init__.py +46 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/geometry/builders.py +121 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/geometry/cells.py +256 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/geometry/checks.py +370 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/geometry/io.py +803 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/geometry/mesh.py +82 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/geometry/triangulate.py +106 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/gltf.py +429 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/gui/__init__.py +29 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/gui/app.py +1571 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/gui/document.py +580 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/gui/inspector.py +1827 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/gui/levels.py +37 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/gui/map_view.py +184 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/gui/plan_view.py +895 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/gui/results_view.py +490 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/gui/tips.py +64 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/gui/tree.py +173 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/gui/tune_dialog.py +120 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/gui/viewport.py +461 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/gui/worker.py +106 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/headtracking.py +385 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/materials/__init__.py +28 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/materials/bands.py +211 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/materials/data/LICENSE-pyroomacoustics.txt +19 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/materials/data/pyroomacoustics_materials.json +439 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/materials/database.py +91 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/materials/files.py +44 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/materials/libraries.py +217 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/measurement.py +283 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/parameters.py +1105 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/py.typed +0 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/render.py +355 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/results.py +162 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/room.py +499 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/scene/__init__.py +37 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/scene/model.py +1119 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/spatial/__init__.py +48 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/spatial/ambisonics.py +84 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/spatial/decoder.py +64 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/spatial/directions.py +48 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/spatial/hrtf.py +336 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/spatial/loudspeakers.py +306 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/spatial/render.py +301 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/spatial/rotation.py +133 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/synthesis.py +220 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/viz.py +1266 -0
- acoustic_spaces-3.2.0/src/acoustic_spaces/walkthrough.py +367 -0
- acoustic_spaces-3.2.0/tests/conftest.py +67 -0
- acoustic_spaces-3.2.0/tests/reference/tracer.npz +0 -0
- acoustic_spaces-3.2.0/tests/test_air.py +31 -0
- acoustic_spaces-3.2.0/tests/test_arrays.py +261 -0
- acoustic_spaces-3.2.0/tests/test_audio.py +33 -0
- acoustic_spaces-3.2.0/tests/test_bands.py +264 -0
- acoustic_spaces-3.2.0/tests/test_bras.py +33 -0
- acoustic_spaces-3.2.0/tests/test_calibration.py +247 -0
- acoustic_spaces-3.2.0/tests/test_cli.py +998 -0
- acoustic_spaces-3.2.0/tests/test_coherent.py +193 -0
- acoustic_spaces-3.2.0/tests/test_collada.py +153 -0
- acoustic_spaces-3.2.0/tests/test_compare.py +230 -0
- acoustic_spaces-3.2.0/tests/test_coverage.py +314 -0
- acoustic_spaces-3.2.0/tests/test_diffraction.py +500 -0
- acoustic_spaces-3.2.0/tests/test_directivity.py +418 -0
- acoustic_spaces-3.2.0/tests/test_engine.py +489 -0
- acoustic_spaces-3.2.0/tests/test_examples.py +95 -0
- acoustic_spaces-3.2.0/tests/test_geometry.py +489 -0
- acoustic_spaces-3.2.0/tests/test_gltf.py +325 -0
- acoustic_spaces-3.2.0/tests/test_gpu.py +389 -0
- acoustic_spaces-3.2.0/tests/test_grazing.py +159 -0
- acoustic_spaces-3.2.0/tests/test_gui.py +1784 -0
- acoustic_spaces-3.2.0/tests/test_headtracking.py +309 -0
- acoustic_spaces-3.2.0/tests/test_ifc.py +230 -0
- acoustic_spaces-3.2.0/tests/test_late_device.py +292 -0
- acoustic_spaces-3.2.0/tests/test_leaks.py +154 -0
- acoustic_spaces-3.2.0/tests/test_libraries.py +174 -0
- acoustic_spaces-3.2.0/tests/test_materials.py +147 -0
- acoustic_spaces-3.2.0/tests/test_measurement.py +162 -0
- acoustic_spaces-3.2.0/tests/test_more_parameters.py +374 -0
- acoustic_spaces-3.2.0/tests/test_native.py +399 -0
- acoustic_spaces-3.2.0/tests/test_parameters.py +257 -0
- acoustic_spaces-3.2.0/tests/test_render.py +194 -0
- acoustic_spaces-3.2.0/tests/test_results.py +72 -0
- acoustic_spaces-3.2.0/tests/test_room.py +251 -0
- acoustic_spaces-3.2.0/tests/test_scattering.py +218 -0
- acoustic_spaces-3.2.0/tests/test_scene.py +164 -0
- acoustic_spaces-3.2.0/tests/test_sketchup.py +59 -0
- acoustic_spaces-3.2.0/tests/test_sources.py +317 -0
- acoustic_spaces-3.2.0/tests/test_spatial.py +433 -0
- acoustic_spaces-3.2.0/tests/test_synthesis.py +91 -0
- acoustic_spaces-3.2.0/tests/test_tracer_reference.py +532 -0
- acoustic_spaces-3.2.0/tests/test_transmission.py +344 -0
- acoustic_spaces-3.2.0/tests/test_viz.py +387 -0
- acoustic_spaces-3.2.0/tests/test_walkthrough.py +419 -0
- acoustic_spaces-3.2.0/tests/test_wave.py +868 -0
- acoustic_spaces-3.2.0/validation/bras/CR2/CR2.obj +703 -0
- acoustic_spaces-3.2.0/validation/bras/CR2/materials/fitted/mat_CR2_ceiling.csv +3 -0
- acoustic_spaces-3.2.0/validation/bras/CR2/materials/fitted/mat_CR2_concrete.csv +3 -0
- acoustic_spaces-3.2.0/validation/bras/CR2/materials/fitted/mat_CR2_floor.csv +3 -0
- acoustic_spaces-3.2.0/validation/bras/CR2/materials/fitted/mat_CR2_plaster.csv +3 -0
- acoustic_spaces-3.2.0/validation/bras/CR2/materials/fitted/mat_CR2_windows.csv +3 -0
- acoustic_spaces-3.2.0/validation/bras/CR2/materials/initial/mat_CR2_ceiling.csv +3 -0
- acoustic_spaces-3.2.0/validation/bras/CR2/materials/initial/mat_CR2_concrete.csv +3 -0
- acoustic_spaces-3.2.0/validation/bras/CR2/materials/initial/mat_CR2_floor.csv +3 -0
- acoustic_spaces-3.2.0/validation/bras/CR2/materials/initial/mat_CR2_plaster.csv +3 -0
- acoustic_spaces-3.2.0/validation/bras/CR2/materials/initial/mat_CR2_windows.csv +3 -0
- acoustic_spaces-3.2.0/validation/bras/CR2/measured.json +128 -0
- acoustic_spaces-3.2.0/validation/bras/CR2/scene.yaml +34 -0
- acoustic_spaces-3.2.0/validation/bras/CR3/CR3.obj +3503 -0
- acoustic_spaces-3.2.0/validation/bras/CR3/materials/fitted/mat_CR3_ceiling.csv +3 -0
- acoustic_spaces-3.2.0/validation/bras/CR3/materials/fitted/mat_CR3_floor.csv +3 -0
- acoustic_spaces-3.2.0/validation/bras/CR3/materials/fitted/mat_CR3_plaster.csv +3 -0
- acoustic_spaces-3.2.0/validation/bras/CR3/materials/fitted/mat_CR3_seating.csv +3 -0
- acoustic_spaces-3.2.0/validation/bras/CR3/materials/fitted/mat_CR3_stagePanels.csv +3 -0
- acoustic_spaces-3.2.0/validation/bras/CR3/materials/fitted/mat_CR3_structuredPlaster.csv +3 -0
- acoustic_spaces-3.2.0/validation/bras/CR3/materials/fitted/mat_CR3_windows.csv +3 -0
- acoustic_spaces-3.2.0/validation/bras/CR3/materials/initial/mat_CR3_ceiling.csv +3 -0
- acoustic_spaces-3.2.0/validation/bras/CR3/materials/initial/mat_CR3_floor.csv +3 -0
- acoustic_spaces-3.2.0/validation/bras/CR3/materials/initial/mat_CR3_plaster.csv +3 -0
- acoustic_spaces-3.2.0/validation/bras/CR3/materials/initial/mat_CR3_seating.csv +3 -0
- acoustic_spaces-3.2.0/validation/bras/CR3/materials/initial/mat_CR3_stagePanels.csv +3 -0
- acoustic_spaces-3.2.0/validation/bras/CR3/materials/initial/mat_CR3_structuredPlaster.csv +3 -0
- acoustic_spaces-3.2.0/validation/bras/CR3/materials/initial/mat_CR3_windows.csv +3 -0
- acoustic_spaces-3.2.0/validation/bras/CR3/measured.json +128 -0
- acoustic_spaces-3.2.0/validation/bras/CR3/scene.yaml +38 -0
- acoustic_spaces-3.2.0/validation/bras/README.md +72 -0
- acoustic_spaces-3.2.0/validation/bras/convert_skp.py +136 -0
- acoustic_spaces-3.2.0/validation/bras/prepare.py +183 -0
- acoustic_spaces-3.2.0/validation/bras_validation.py +377 -0
- acoustic_spaces-3.2.0/validation/convolver_benchmark.py +92 -0
- acoustic_spaces-3.2.0/validation/edge_diffraction.py +507 -0
- acoustic_spaces-3.2.0/validation/late_gpu.py +166 -0
- acoustic_spaces-3.2.0/validation/pyroomacoustics_crosscheck.py +560 -0
- acoustic_spaces-3.2.0/validation/rays_gpu.py +200 -0
- acoustic_spaces-3.2.0/validation/wave_gpu.py +149 -0
- acoustic_spaces-3.2.0/validation/wave_solver.py +891 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
root = true
|
|
2
|
+
|
|
3
|
+
[*]
|
|
4
|
+
charset = utf-8
|
|
5
|
+
end_of_line = lf
|
|
6
|
+
insert_final_newline = true
|
|
7
|
+
trim_trailing_whitespace = true
|
|
8
|
+
indent_style = space
|
|
9
|
+
indent_size = 4
|
|
10
|
+
|
|
11
|
+
[*.{yml,yaml,toml,md}]
|
|
12
|
+
indent_size = 2
|
|
13
|
+
|
|
14
|
+
[CMakeLists.txt]
|
|
15
|
+
indent_size = 2
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
tags: ["v*"]
|
|
7
|
+
pull_request:
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
concurrency:
|
|
11
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
12
|
+
cancel-in-progress: true
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
lint:
|
|
16
|
+
name: Lint
|
|
17
|
+
runs-on: ubuntu-24.04
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v6
|
|
20
|
+
- uses: actions/setup-python@v6
|
|
21
|
+
with:
|
|
22
|
+
python-version: "3.12"
|
|
23
|
+
- run: python -m pip install ruff
|
|
24
|
+
- run: ruff check .
|
|
25
|
+
- run: ruff format --check .
|
|
26
|
+
|
|
27
|
+
test:
|
|
28
|
+
name: Test (${{ matrix.os }}, Python ${{ matrix.python }})
|
|
29
|
+
runs-on: ${{ matrix.os }}
|
|
30
|
+
strategy:
|
|
31
|
+
fail-fast: false
|
|
32
|
+
matrix:
|
|
33
|
+
os: [ubuntu-24.04, macos-latest, windows-latest]
|
|
34
|
+
python: ["3.10", "3.14"]
|
|
35
|
+
steps:
|
|
36
|
+
- uses: actions/checkout@v6
|
|
37
|
+
- uses: actions/setup-python@v6
|
|
38
|
+
with:
|
|
39
|
+
python-version: ${{ matrix.python }}
|
|
40
|
+
- name: Software Vulkan driver (Mesa's lavapipe), for the wave solver on a GPU
|
|
41
|
+
if: runner.os == 'Linux'
|
|
42
|
+
run: sudo apt-get update && sudo apt-get install -y mesa-vulkan-drivers
|
|
43
|
+
- name: Build and install
|
|
44
|
+
run: python -m pip install ".[test,sketchup,gpu,ifc]"
|
|
45
|
+
- name: Test
|
|
46
|
+
timeout-minutes: 30 # a hung GPU test would otherwise hold the runner for 6 hours
|
|
47
|
+
run: python -m pytest -q -W error
|
|
48
|
+
- name: Smoke-test the command line
|
|
49
|
+
shell: bash # stops at the first failing command on every platform
|
|
50
|
+
run: |
|
|
51
|
+
acoustic-spaces info
|
|
52
|
+
acoustic-spaces examples
|
|
53
|
+
acoustic-spaces validate examples/shoebox/scene.yaml
|
|
54
|
+
acoustic-spaces inspect examples/shoebox/scene.yaml
|
|
55
|
+
acoustic-spaces simulate examples/shoebox/scene.yaml --out sim --rays 5000 --length 0.8 --seed 1
|
|
56
|
+
acoustic-spaces sweep sweep.wav --duration 2 --silence 1 --repeats 2
|
|
57
|
+
python examples/measurement/virtual_recording.py sweep.wav sim/talker__seat-a.wav rec.wav
|
|
58
|
+
acoustic-spaces deconvolve rec.wav --sweep sweep.json --out ir.wav --loopback 2
|
|
59
|
+
acoustic-spaces analyze ir.wav --reference-energy 0.01
|
|
60
|
+
acoustic-spaces convolve sweep.wav sim/talker__seat-a.binaural.wav --out wet.wav --normalize
|
|
61
|
+
acoustic-spaces auralize sim talker=sweep.wav --format ambix3 --out mix.wav --normalize
|
|
62
|
+
|
|
63
|
+
uv:
|
|
64
|
+
# The setup docs/getting-started.md gives for a source checkout: `uv sync` with its dev group.
|
|
65
|
+
name: Source checkout with uv
|
|
66
|
+
runs-on: ubuntu-24.04
|
|
67
|
+
steps:
|
|
68
|
+
- uses: actions/checkout@v6
|
|
69
|
+
- uses: actions/setup-python@v6
|
|
70
|
+
with:
|
|
71
|
+
python-version: "3.12"
|
|
72
|
+
- run: python -m pip install uv
|
|
73
|
+
- name: Build and install with the test tools
|
|
74
|
+
run: uv sync
|
|
75
|
+
- name: Test
|
|
76
|
+
run: uv run pytest -q -W error
|
|
77
|
+
- run: uv run acoustic-spaces info
|
|
78
|
+
|
|
79
|
+
viz:
|
|
80
|
+
name: 3D view (off-screen)
|
|
81
|
+
runs-on: ubuntu-24.04
|
|
82
|
+
env:
|
|
83
|
+
# Render through OSMesa directly instead of trying (and warning about) an X display.
|
|
84
|
+
VTK_DEFAULT_OPENGL_WINDOW: vtkOSOpenGLRenderWindow
|
|
85
|
+
steps:
|
|
86
|
+
- uses: actions/checkout@v6
|
|
87
|
+
- uses: actions/setup-python@v6
|
|
88
|
+
with:
|
|
89
|
+
python-version: "3.12"
|
|
90
|
+
- name: Install off-screen OpenGL
|
|
91
|
+
run: sudo apt-get update && sudo apt-get install -y libosmesa6 libegl1 libgl1 libxrender1
|
|
92
|
+
- name: Build and install
|
|
93
|
+
run: python -m pip install ".[test,viz]"
|
|
94
|
+
- name: Test
|
|
95
|
+
run: python -m pytest -q -W error tests/test_viz.py
|
|
96
|
+
- name: Render the example scene
|
|
97
|
+
run: |
|
|
98
|
+
acoustic-spaces view examples/shoebox/scene.yaml --screenshot shoebox.png
|
|
99
|
+
acoustic-spaces view examples/shoebox/scene.yaml --paths --max-order 2 --screenshot paths.png
|
|
100
|
+
acoustic-spaces view examples/leaky_classroom/scene.yaml --leaks --screenshot leaks.png
|
|
101
|
+
acoustic-spaces simulate examples/shoebox/scene.yaml --out sim --plot --seed 1
|
|
102
|
+
acoustic-spaces sweep sweep.wav --duration 4 --silence 3 --repeats 2
|
|
103
|
+
python examples/measurement/virtual_recording.py sweep.wav sim/talker__seat-a.wav rec.wav --noise-db -70
|
|
104
|
+
acoustic-spaces deconvolve rec.wav --sweep sweep.json --out ir.wav --loopback 2
|
|
105
|
+
acoustic-spaces analyze ir.wav --reference-energy 0.01 --plot ir.png
|
|
106
|
+
acoustic-spaces animate examples/lecture_hall/scene.yaml --out particles.gif --frames 50
|
|
107
|
+
- uses: actions/upload-artifact@v6
|
|
108
|
+
with:
|
|
109
|
+
name: scene-view
|
|
110
|
+
path: |
|
|
111
|
+
shoebox.png
|
|
112
|
+
paths.png
|
|
113
|
+
leaks.png
|
|
114
|
+
ir.png
|
|
115
|
+
particles.gif
|
|
116
|
+
sim/
|
|
117
|
+
|
|
118
|
+
editor:
|
|
119
|
+
name: Editor (${{ matrix.os }})
|
|
120
|
+
runs-on: ${{ matrix.os }}
|
|
121
|
+
strategy:
|
|
122
|
+
fail-fast: false
|
|
123
|
+
matrix:
|
|
124
|
+
os: [ubuntu-24.04, macos-latest, windows-latest]
|
|
125
|
+
env:
|
|
126
|
+
# Qt without a display; the 3D view shows a note instead, and the Xvfb step below
|
|
127
|
+
# covers it on Linux.
|
|
128
|
+
QT_QPA_PLATFORM: offscreen
|
|
129
|
+
steps:
|
|
130
|
+
- uses: actions/checkout@v6
|
|
131
|
+
- uses: actions/setup-python@v6
|
|
132
|
+
with:
|
|
133
|
+
python-version: "3.13"
|
|
134
|
+
- name: Install the libraries Qt and its X11 platform load
|
|
135
|
+
if: runner.os == 'Linux'
|
|
136
|
+
run: >-
|
|
137
|
+
sudo apt-get update && sudo apt-get install -y xvfb libegl1 libgl1 libopengl0
|
|
138
|
+
libfontconfig1 libdbus-1-3 libxkbcommon0 libxkbcommon-x11-0 libxcb-cursor0
|
|
139
|
+
libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0
|
|
140
|
+
libxcb-shape0 libxcb-xfixes0 libxcb-xinerama0 libxcb-xkb1
|
|
141
|
+
- name: Build and install
|
|
142
|
+
run: python -m pip install ".[test,gui,ifc]"
|
|
143
|
+
- name: Test
|
|
144
|
+
run: python -m pytest -q -W error tests/test_gui.py
|
|
145
|
+
- name: Test with a display and the 3D view (Xvfb)
|
|
146
|
+
if: runner.os == 'Linux'
|
|
147
|
+
env:
|
|
148
|
+
QT_QPA_PLATFORM: xcb
|
|
149
|
+
run: xvfb-run -a -s "-screen 0 1600x1200x24" python -m pytest -q -W error tests/test_gui.py
|
|
150
|
+
|
|
151
|
+
wheels:
|
|
152
|
+
name: Wheel (${{ matrix.os }})
|
|
153
|
+
runs-on: ${{ matrix.os }}
|
|
154
|
+
strategy:
|
|
155
|
+
fail-fast: false
|
|
156
|
+
matrix:
|
|
157
|
+
os: [ubuntu-24.04, macos-latest, windows-latest]
|
|
158
|
+
steps:
|
|
159
|
+
- uses: actions/checkout@v6
|
|
160
|
+
- uses: actions/setup-python@v6
|
|
161
|
+
with:
|
|
162
|
+
python-version: "3.13"
|
|
163
|
+
- run: python -m pip install cibuildwheel==4.3.1
|
|
164
|
+
- name: Build and test wheels
|
|
165
|
+
run: python -m cibuildwheel --output-dir wheelhouse
|
|
166
|
+
env:
|
|
167
|
+
# Pull requests build one CPython per platform; tags build the full set from pyproject.toml.
|
|
168
|
+
CIBW_BUILD: ${{ startsWith(github.ref, 'refs/tags/') && 'cp310-* cp311-* cp312-* cp313-* cp314-*' || 'cp314-*' }}
|
|
169
|
+
- uses: actions/upload-artifact@v6
|
|
170
|
+
with:
|
|
171
|
+
name: wheels-${{ matrix.os }}
|
|
172
|
+
path: wheelhouse/*.whl
|
|
173
|
+
|
|
174
|
+
sdist:
|
|
175
|
+
name: Source distribution
|
|
176
|
+
runs-on: ubuntu-24.04
|
|
177
|
+
steps:
|
|
178
|
+
- uses: actions/checkout@v6
|
|
179
|
+
- uses: actions/setup-python@v6
|
|
180
|
+
with:
|
|
181
|
+
python-version: "3.13"
|
|
182
|
+
- run: python -m pip install build
|
|
183
|
+
- run: python -m build --sdist
|
|
184
|
+
- name: Build and import the package from the source distribution
|
|
185
|
+
shell: bash
|
|
186
|
+
run: |
|
|
187
|
+
python -m pip install dist/*.tar.gz
|
|
188
|
+
cd "$RUNNER_TEMP" && python -c "import acoustic_spaces as a; assert a.native_available(); print(a.__version__)"
|
|
189
|
+
acoustic-spaces examples --copy examples
|
|
190
|
+
acoustic-spaces validate examples/concert_hall/scene.yaml
|
|
191
|
+
- name: Check that the tag names the package's version
|
|
192
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
193
|
+
shell: bash
|
|
194
|
+
run: test -f "dist/acoustic_spaces-${GITHUB_REF_NAME#v}.tar.gz"
|
|
195
|
+
- name: Check that the description for PyPI links to GitHub, not to relative paths
|
|
196
|
+
shell: bash
|
|
197
|
+
run: |
|
|
198
|
+
tar -xzf dist/*.tar.gz --wildcards --to-stdout '*/PKG-INFO' > "$RUNNER_TEMP/PKG-INFO"
|
|
199
|
+
grep -q '](https://raw.githubusercontent.com/naelolaiz/acoustic-spaces/main/docs/images/' "$RUNNER_TEMP/PKG-INFO"
|
|
200
|
+
if grep -n '](docs/' "$RUNNER_TEMP/PKG-INFO"; then exit 1; fi
|
|
201
|
+
- uses: actions/upload-artifact@v6
|
|
202
|
+
with:
|
|
203
|
+
name: sdist
|
|
204
|
+
path: dist/*.tar.gz
|
|
205
|
+
|
|
206
|
+
docs:
|
|
207
|
+
name: Documentation
|
|
208
|
+
runs-on: ubuntu-24.04
|
|
209
|
+
steps:
|
|
210
|
+
- uses: actions/checkout@v6
|
|
211
|
+
- uses: actions/setup-python@v6
|
|
212
|
+
with:
|
|
213
|
+
python-version: "3.12"
|
|
214
|
+
- name: Build and install
|
|
215
|
+
run: python -m pip install ".[docs]"
|
|
216
|
+
- name: Build the documentation (warnings are errors)
|
|
217
|
+
run: python -m sphinx -W --keep-going -b html docs docs/_build/html
|
|
218
|
+
- uses: actions/upload-artifact@v6
|
|
219
|
+
with:
|
|
220
|
+
name: docs
|
|
221
|
+
path: docs/_build/html
|
|
222
|
+
|
|
223
|
+
# Releases: a tag vX.Y.Z (matching src/acoustic_spaces/_version.py), pushed or made on the
|
|
224
|
+
# Releases page, attaches the wheels and source distribution to a GitHub release and, once
|
|
225
|
+
# PyPI trusted publishing is set up and the repository variable PYPI_PUBLISH is "true",
|
|
226
|
+
# uploads them to PyPI.
|
|
227
|
+
# See "Releasing" in CONTRIBUTING.md.
|
|
228
|
+
github-release:
|
|
229
|
+
name: GitHub release
|
|
230
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
231
|
+
needs: [lint, test, uv, viz, editor, wheels, sdist, docs]
|
|
232
|
+
runs-on: ubuntu-24.04
|
|
233
|
+
permissions:
|
|
234
|
+
contents: write
|
|
235
|
+
steps:
|
|
236
|
+
- uses: actions/checkout@v6
|
|
237
|
+
- uses: actions/download-artifact@v8
|
|
238
|
+
with:
|
|
239
|
+
path: dist
|
|
240
|
+
pattern: "{wheels-*,sdist}"
|
|
241
|
+
merge-multiple: true
|
|
242
|
+
- name: Release notes from CHANGELOG.md
|
|
243
|
+
shell: bash
|
|
244
|
+
run: |
|
|
245
|
+
awk -v v="## ${GITHUB_REF_NAME#v}" '$0 == v {on = 1; next} /^## / {on = 0} on' CHANGELOG.md > notes.md
|
|
246
|
+
test -s notes.md
|
|
247
|
+
- name: Create the release, or add the files to one made on the Releases page
|
|
248
|
+
env:
|
|
249
|
+
GH_TOKEN: ${{ github.token }}
|
|
250
|
+
shell: bash
|
|
251
|
+
run: |
|
|
252
|
+
tag="$GITHUB_REF_NAME"
|
|
253
|
+
if gh release view "$tag" > /dev/null 2>&1; then
|
|
254
|
+
gh release upload "$tag" dist/* --clobber
|
|
255
|
+
if [ -z "$(gh release view "$tag" --json body --jq .body)" ]; then
|
|
256
|
+
gh release edit "$tag" --notes-file notes.md
|
|
257
|
+
fi
|
|
258
|
+
else
|
|
259
|
+
gh release create "$tag" dist/* --title "$tag" --notes-file notes.md
|
|
260
|
+
fi
|
|
261
|
+
|
|
262
|
+
pypi:
|
|
263
|
+
name: Publish to PyPI
|
|
264
|
+
if: startsWith(github.ref, 'refs/tags/v') && vars.PYPI_PUBLISH == 'true'
|
|
265
|
+
needs: [lint, test, uv, viz, editor, wheels, sdist, docs]
|
|
266
|
+
runs-on: ubuntu-24.04
|
|
267
|
+
environment:
|
|
268
|
+
name: pypi
|
|
269
|
+
url: https://pypi.org/p/acoustic-spaces
|
|
270
|
+
permissions:
|
|
271
|
+
id-token: write # trusted publishing: no token or password stored anywhere
|
|
272
|
+
steps:
|
|
273
|
+
- uses: actions/download-artifact@v8
|
|
274
|
+
with:
|
|
275
|
+
path: dist
|
|
276
|
+
pattern: "{wheels-*,sdist}"
|
|
277
|
+
merge-multiple: true
|
|
278
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Build
|
|
2
|
+
build/
|
|
3
|
+
dist/
|
|
4
|
+
wheelhouse/
|
|
5
|
+
*.egg-info/
|
|
6
|
+
*.so
|
|
7
|
+
*.pyd
|
|
8
|
+
*.dylib
|
|
9
|
+
_skbuild/
|
|
10
|
+
|
|
11
|
+
# Python
|
|
12
|
+
__pycache__/
|
|
13
|
+
*.py[cod]
|
|
14
|
+
.pytest_cache/
|
|
15
|
+
.ruff_cache/
|
|
16
|
+
.venv/
|
|
17
|
+
uv.lock
|
|
18
|
+
venv/
|
|
19
|
+
|
|
20
|
+
# Editors and OS
|
|
21
|
+
.vscode/
|
|
22
|
+
.idea/
|
|
23
|
+
.DS_Store
|
|
24
|
+
|
|
25
|
+
# Simulation outputs
|
|
26
|
+
*.wav
|
|
27
|
+
*.sofa
|
|
28
|
+
!examples/**/*.wav
|
|
29
|
+
|
|
30
|
+
# Documentation
|
|
31
|
+
docs/_build/
|