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
7 changes: 5 additions & 2 deletions .github/workflows/publish-release-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,21 @@ jobs:
echo "tag=$tag" >> "$GITHUB_OUTPUT"
echo "audiodsp pinned at $tag"

# No distribution name in the requirement: the pinned commit's own
# pyproject.toml names it (pydevices-audiodsp before the rename,
# omnipython-audiodsp after), as in tests.yml.
- name: Install audiodsp at the pin
run: >-
python -m pip install
"pydevices-audiodsp @ git+https://github.com/PyDevices/audiodsp@${{ steps.pin.outputs.tag }}"
"git+https://github.com/PyDevices/audiodsp@${{ steps.pin.outputs.tag }}"

# numpy: two tests need it (test_cpython_asym_table through the ulab
# bridge, test_rig_comparator directly); the packages themselves do not.
# pytest and pytest-xdist run the suite in parallel, as tests.yml does.
- run: python -m pip install numpy pytest pytest-xdist

# --no-deps is load-bearing: without it a floor raised above the pinned
# release re-resolves pydevices-audiodsp from the index and every
# release re-resolves audiodsp from the index and every
# measurement is taken against a core AUDIODSP_PIN does not name -- the
# failure the pin exists to prevent, arriving through packaging. Do not
# drop the flag.
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,19 @@ jobs:
path: .audiodsp-wheel
key: audiodsp-wheel-v1-${{ steps.pin.outputs.tag }}-${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python }}

# The requirement carries no distribution name: audiodsp was renamed
# from pydevices-audiodsp to omnipython-audiodsp, and the name pip
# checks must be the one the pinned commit declares. Without a name,
# pip reads it from that commit's pyproject.toml.
- name: Build the audiodsp wheel at the pin
if: steps.audiodsp-wheel.outputs.cache-hit != 'true'
run: >-
python -m pip wheel --no-deps --wheel-dir .audiodsp-wheel
"pydevices-audiodsp @ git+https://github.com/PyDevices/audiodsp@${{ steps.pin.outputs.tag }}"
"git+https://github.com/PyDevices/audiodsp@${{ steps.pin.outputs.tag }}"

- name: Install audiodsp at the pin
shell: bash
run: python -m pip install .audiodsp-wheel/pydevices_audiodsp-*.whl
run: python -m pip install .audiodsp-wheel/*audiodsp-*.whl

# Editable, so the tests exercise lib/ directly rather than a copy, and
# so each package's own pyproject.toml is exercised too.
Expand All @@ -126,7 +130,7 @@ jobs:
- run: python -m pip install numpy pytest pytest-xdist

# --no-deps is load-bearing: without it a floor raised above the pinned
# release re-resolves pydevices-audiodsp from the index and every
# release re-resolves audiodsp from the index and every
# measurement is taken against a core AUDIODSP_PIN does not name -- the
# failure the pin exists to prevent, arriving through packaging. Do not
# drop the flag.
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ the pin: `AUDIODSP_PIN` may name a commit ahead of it, and the gates use the pin

```bash
python3 -m venv .venv
.venv/bin/pip install "pydevices-audiodsp @ git+https://github.com/PyDevices/audiodsp@v0.6.9"
.venv/bin/pip install "git+https://github.com/PyDevices/audiodsp@v0.6.9"
.venv/bin/pip install -e lib/audioinstruments -e lib/audioeffects
```

Expand Down
2 changes: 1 addition & 1 deletion tools/effect_probes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ the one CI installs. An audiodsp that renders the instruments differently
fails the check, and the message says so; install audiodsp at the pin:

```
pip install "pydevices-audiodsp @ git+https://github.com/PyDevices/audiodsp@<pin>"
pip install "git+https://github.com/PyDevices/audiodsp@<pin>"
```

That failure is the point of the check: it is how a change in the way
Expand Down
16 changes: 11 additions & 5 deletions tools/effect_probes/make_probes.py
Original file line number Diff line number Diff line change
Expand Up @@ -757,10 +757,17 @@ def _audiodsp_pin():

def _audiodsp_installed():
try:
from importlib.metadata import version
return version("pydevices-audiodsp")
except Exception:
from importlib.metadata import PackageNotFoundError, version
except ImportError:
return "not found"
# audiodsp was published as pydevices-audiodsp until it was renamed
# omnipython-audiodsp; a pin may name either side of the rename.
for dist in ("omnipython-audiodsp", "pydevices-audiodsp"):
try:
return version(dist)
except PackageNotFoundError:
pass
return "not found"


def _instrument_advice(name):
Expand All @@ -769,8 +776,7 @@ def _instrument_advice(name):
" probes.json records them at the audiodsp release AUDIODSP_PIN"
" names: install audiodsp at %s (this interpreter has %s), for"
" example"
' pip install "pydevices-audiodsp @'
' git+https://github.com/PyDevices/audiodsp@%s".'
' pip install "git+https://github.com/PyDevices/audiodsp@%s".'
% (pin, _audiodsp_installed(), pin))


Expand Down
2 changes: 1 addition & 1 deletion tools/wheel_gate.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def main():
help="pip requirement for audiodsp (default: the AUDIODSP_PIN commit)")
args = parser.parse_args()
audiodsp = args.audiodsp or (
"pydevices-audiodsp @ git+https://github.com/PyDevices/audiodsp@"
"git+https://github.com/PyDevices/audiodsp@"
+ audiodsp_pin())

failures = []
Expand Down
Loading