Skip to content

Commit 5e913f2

Browse files
committed
Updates the doc in CONTRIBUTING.rst for the new compile system. Adds doc, repo, issues links in pyproject.toml. CHANGELOG.
1 parent 7a462c1 commit 5e913f2

File tree

3 files changed

+65
-67
lines changed

3 files changed

+65
-67
lines changed

CHANGELOG.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,14 @@ adheres to `Semantic Versioning <http://semver.org/spec/v2.0.0.html>`_.
1111
`Unreleased`_
1212
-------------
1313

14-
Nothing yet.
14+
Changed
15+
~~~~~~~
16+
17+
- Modernized the build system to use ``pyproject.toml`` and ``CMake``.
18+
- External dependencies (``Eigen``, ``nanoflann``, ``pybind11``) are now automatically managed via CMake's ``FetchContent``.
19+
- Switched to dynamic versioning using ``setuptools_scm``.
20+
- Relocated the test suite from the source package to a top-level ``tests/`` directory.
21+
- Update the continuous integration to use cibuildwheel to handle all platforms including manylinux.
1522

1623

1724
`0.10.0`_ - 2026-04-01

CONTRIBUTING.rst

Lines changed: 49 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,24 @@ We try to stick to `PEP8 <https://www.python.org/dev/peps/pep-0008/>`__
2424
as much as possible. Variables, functions, modules and packages should
2525
be in lowercase with underscores. Class names in CamelCase.
2626

27-
We use `Black <https://github.com/psf/black>`__ to format the code and `isort <https://pycqa.github.io/isort/>`__ to sort the imports.
28-
The format will be automatically checked when doing a pull request so it is
29-
recommended to regularly run Black on the code.
30-
Please format your code as follows prior to commiting.
27+
We use `pre-commit <https://pre-commit.com/>`__ to manage code quality hooks,
28+
including `Black <https://github.com/psf/black>`__ for formatting and
29+
`isort <https://pycqa.github.io/isort/>`__ for sorting imports.
30+
The hooks will be automatically checked during pull requests.
31+
32+
To set up the pre-commit hooks locally:
33+
34+
.. code-block:: shell
35+
36+
pip install pre-commit
37+
pre-commit install
38+
39+
Once installed, the hooks will run automatically on every commit.
40+
You can also run them manually on all files:
3141

3242
.. code-block:: shell
3343
34-
pip install black isort
35-
black .
36-
isort --profile black .
44+
pre-commit run --all-files
3745
3846
Documentation
3947
~~~~~~~~~~~~~
@@ -51,79 +59,56 @@ We recommend the following steps for generating the documentation:
5159
- Build and view the documentation locally with: ``make html``
5260
- Open in your browser: ``docs/_build/html/index.html``
5361

54-
Develop Locally
55-
~~~~~~~~~~~~~~~
56-
57-
It can be convenient to develop and run tests locally. In contrast to only
62+
It can be convenient to develop and run tests locally. In contrast to only
5863
using the package, you will then also need to compile the C++ extension for
59-
that. On Mac and Linux, GCC is required, while Visual C++ 14.0 is necessary for
60-
`windows <https://wiki.python.org/moin/WindowsCompilers>`__.
61-
62-
1. Get the source code. Use recursive close so that Eigen (a sub-module of this
63-
repository) is also downloaded.
64-
65-
.. code-block:: shell
64+
that.
6665

67-
git clone --recursive git@github.com:LCAV/pyroomacoustics.git
66+
Requirements:
67+
- C++ compiler: GCC or Clang on Mac/Linux, Visual C++ 14.0+ on Windows.
68+
- **CMake** (version 3.10 or higher).
69+
- **pre-commit**
6870

69-
Alternatively, you can clone without the `--recursive` flag and directly
70-
install the Eigen library. For macOS, you can find installation instruction
71-
here: https://stackoverflow.com/a/35658421. After installation you can
72-
create a symbolic link as such:
73-
74-
.. code-block:: shell
75-
76-
ln -s PATH_TO_EIGEN pyroomacoustics/libroom_src/ext/eigen/Eigen
77-
78-
2. Install a few pre-requisites
79-
80-
.. code-block:: shell
81-
82-
pip install numpy Cython pybind11
83-
84-
3. Compile locally
71+
1. Get the source code.
8572

8673
.. code-block:: shell
8774
88-
python setup.py build_ext --inplace
89-
90-
On recent Mac OS (Mojave), it is necessary in some cases to add a
91-
higher deployment target
75+
git clone git@github.com:LCAV/pyroomacoustics.git
9276
93-
.. code-block:: shell
77+
External dependencies (`Eigen`, `nanoflann`, `pybind11`) are automatically
78+
downloaded during the build process using CMake's `FetchContent`.
9479

95-
MACOSX_DEPLOYMENT_TARGET=10.9 python setup.py build_ext --inplace
80+
2. Install in editable mode.
9681

97-
4. Update ``$PYTHONPATH`` so that python knows where to find the local package
82+
Editable mode is recommended for local development as it correctly links
83+
the source files and compiled extensions.
9884

9985
.. code-block:: shell
10086
101-
# Linux/Mac
102-
export PYTHONPATH=<path_to_pyroomacoustics>:$PYTHONPATH
87+
pip install -U -e .
10388
104-
For windows, see `this question <https://stackoverflow.com/questions/3701646/how-to-add-to-the-pythonpath-in-windows>`__
105-
on stackoverflow.
89+
The build process uses CMake to compile the C++ extensions.
90+
The ``-U`` flag ensures that the package is upgraded to the latest version.
91+
Make sure to re-run this command when changing the C++ code.
10692

107-
5. Install the dependencies listed in ``requirements.txt``
93+
On macOS, if necessary, you can set the deployment target:
10894

10995
.. code-block:: shell
11096
111-
pip install -r requirements.txt
97+
MACOSX_DEPLOYMENT_TARGET=11.0 pip install -U -e .
11298
113-
6. Now fire up ``python`` or ``ipython`` and check that the package can be
114-
imported
99+
3. Verify the installation.
115100

116-
.. code-block:: python
101+
.. code-block:: shell
117102
118-
import pyroomacoustics as pra
103+
python -c "import pyroomacoustics as pra; print(pra.__version__)"
119104
120105
Unit Tests
121106
~~~~~~~~~~
122107

123108
As much as possible, for every new function added to the code base, add
124-
a short test script in ``pyroomacoustics/tests``. The names of the
109+
a short test script in the top-level ``tests/`` directory. The names of the
125110
script and the functions running the test should be prefixed by
126-
``test_``. The tests are started by running ``nosetests`` at the root of
111+
``test_``. The tests are started by running ``pytest`` at the root of
127112
the package.
128113

129114
How to make a clean pull request
@@ -167,18 +152,18 @@ How to deploy a new version to pypi
167152

168153
1. git checkout pypi-release
169154
2. git merge master
170-
3. Change version number in ``pyroomacoustics/version.py`` to new version number vX.Y.Z
171-
4. Edit ``CHANGELOG.rst`` as follows
155+
3. Edit ``CHANGELOG.rst`` as follows
172156

173157
- Add new title ``X.Y.Z_ - YEAR-MONTH-DAY`` under ``Unreleased``, add "Nothing yet" in the unreleased section.
174-
- Edit appropriately the lists of links at the bottom of the file.
175-
5. git commit
176-
6. git tag vX.Y.Z
177-
7. git push origin vX.Y.Z
178-
8. git push
179-
9. git checkout master
180-
10. git merge pypi-release
181-
11. git push origin master
158+
- Edit appropriately the list of links at the bottom of the file.
159+
4. git commit
160+
5. Tag the new version (e.g., vX.Y.Z). Version strings are automatically
161+
generated from git tags using `setuptools_scm`.
162+
6. git push origin vX.Y.Z
163+
7. git push
164+
8. git checkout master
165+
9. git merge pypi-release
166+
10. git push origin master
182167

183168
Reference
184169
---------

pyproject.toml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,27 @@ classifiers = [
1919
"Topic :: Scientific/Engineering :: Physics",
2020
"Topic :: Multimedia :: Sound/Audio :: Speech",
2121
"Topic :: Multimedia :: Sound/Audio :: Analysis",
22-
"Programming Language :: Python :: 3.8",
2322
"Programming Language :: Python :: 3.9",
2423
"Programming Language :: Python :: 3.10",
2524
"Programming Language :: Python :: 3.11",
2625
"Programming Language :: Python :: 3.12",
26+
"Programming Language :: Python :: 3.13",
27+
"Programming Language :: Python :: 3.14",
2728
]
2829
dependencies = [
2930
"Cython",
3031
"numpy>=1.13.0",
3132
"scipy>=0.18.0",
3233
]
33-
requires-python = ">=3.8"
34+
requires-python = ">=3.9"
3435

3536
[project.urls]
3637
Homepage = "https://github.com/LCAV/pyroomacoustics"
38+
Repository = "https://github.com/LCAV/pyroomacoustics.git"
39+
Documentation = "https://pyroomacoustics.readthedocs.io/en/pypi-release/"
40+
Issues = "https://github.com/LCAV/pyroomacoustics/issues"
41+
Changelog = "https://github.com/LCAV/pyroomacoustics/blob/master/CHANGELOG.rst"
42+
3743

3844
[tool.setuptools.dynamic]
3945
readme = { file = ["README.rst"], content-type = "text/x-rst" }

0 commit comments

Comments
 (0)