Skip to content

Remove deprecated flavor sampling rate of 22500#579

Merged
hagenw merged 2 commits into
mainfrom
remove-22500
Jul 2, 2026
Merged

Remove deprecated flavor sampling rate of 22500#579
hagenw merged 2 commits into
mainfrom
remove-22500

Conversation

@hagenw

@hagenw hagenw commented Jul 2, 2026

Copy link
Copy Markdown
Member

Closes #484

In #484 we promised to remove the deprecated flavor sampling rate of 22500 Hz in version 1.13.0. As we have now released version 1.13.0, it's time to remove it.

@sourcery-ai

sourcery-ai Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Removes support for the deprecated 22500 Hz flavor sampling rate and its warning, enforcing only the officially supported sampling rates and cleaning up the corresponding test.

Flow diagram for updated sampling_rate validation in flavor init

flowchart TD
    A[sampling_rate passed to __init__] --> B{sampling_rate is not None}
    B -- no --> Z[Return without sampling_rate]
    B -- yes --> C[Cast sampling_rate to int]
    C --> D{sampling_rate in define.SAMPLING_RATES}
    D -- yes --> E[Continue initialization]
    D -- no --> F[raise ValueError]
Loading

File-Level Changes

Change Details Files
Remove special handling and deprecation warning for 22500 Hz sampling rate when constructing a Flavor.
  • Stop importing the warnings module in the flavor implementation.
  • Simplify sampling_rate validation by removing the 22500 Hz special-case branch and treating it as invalid if not in the supported list.
  • Keep raising ValueError for any sampling_rate not in define.SAMPLING_RATES.
audb/core/flavor.py
Delete the test that ensured 22500 Hz emitted a deprecation warning.
  • Remove the test that expected a UserWarning when using sampling_rate=22500 in Flavor initialization.
tests/test_flavor.py

Assessment against linked issues

Issue Objective Addressed Explanation
#484 Remove support for the deprecated sampling rate of 22500 Hz in audb version 1.13.0 (so that 22500 Hz is no longer an allowed flavor sampling rate, and associated deprecation warning behavior/tests are removed).

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@hagenw hagenw self-assigned this Jul 2, 2026
sourcery-ai[bot]

This comment was marked as resolved.

@hagenw hagenw requested a review from frankenjoe July 2, 2026 10:02
@hagenw hagenw merged commit 2f0e6d5 into main Jul 2, 2026
11 checks passed
@hagenw hagenw deleted the remove-22500 branch July 2, 2026 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove deprecated sampling rate of 22500 Hz in version 1.13.0

2 participants