Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example of how to change code after deprecated args were removed #365

Merged
merged 1 commit into from
Dec 9, 2024
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
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,21 @@ The API documentation, along with guides, example code, illustrations and exampl

### Removed

* Remove deprecated _in_db args in `Gain`, `AddBackgroundNoise`, `AddGaussianSNR`, `GainTransition`, `LoudnessNormalization` and `AddShortNoises`
* Remove deprecated *_in_db args in [Gain](https://iver56.github.io/audiomentations/waveform_transforms/gain/), [AddBackgroundNoise](https://iver56.github.io/audiomentations/waveform_transforms/add_background_noise/), [AddGaussianSNR](https://iver56.github.io/audiomentations/waveform_transforms/add_gaussian_snr/), [GainTransition](https://iver56.github.io/audiomentations/waveform_transforms/gain_transition/), [LoudnessNormalization](https://iver56.github.io/audiomentations/waveform_transforms/loudness_normalization/) and [AddShortNoises](https://iver56.github.io/audiomentations/waveform_transforms/add_short_noises/). Those args were deprecated since v0.31.0, and now they are gone. For details, check the documentation page of each transform.

For example:

| Old (deprecated since v0.31.0) | New |
|--------------------------------|---------------------------|
| `Gain(min_gain_in_db=-12.0)` | `Gain(min_gain_db=-12.0)` |

### Fixed

* Fix a bug where `AirAbsorption` often chose the wrong humidity bucket
* Fix wrong logic in validation check of relation between `crossfade_duration` and `min_part_duration` in `RepeatPart`
* Fix default value of `max_absolute_rms_db` in `AddBackgroundNoises`. It was incorrectly set to -45.0, but is now -15.0. This bug was introduced in 0.31.0.
* Fix default value of `max_absolute_rms_db` in `AddBackgroundNoises`. It was incorrectly set to -45.0, but is now -15.0. This bug was introduced in v0.31.0.
* Fix various errors in the documentation of `AddShortNoises` and `AirAbsorption`
* Fix a bug where `AddShortNoises` sometimes raised a `ValueError` because of an empty array. This bug was introduced in 0.36.1.
* Fix a bug where `AddShortNoises` sometimes raised a `ValueError` because of an empty array. This bug was introduced in v0.36.1.

For the full changelog, including older versions, see [https://iver56.github.io/audiomentations/changelog/](https://iver56.github.io/audiomentations/changelog/)

Expand Down
12 changes: 9 additions & 3 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Removed

* Remove deprecated _in_db args in `Gain`, `AddBackgroundNoise`, `AddGaussianSNR`, `GainTransition`, `LoudnessNormalization` and `AddShortNoises`
* Remove deprecated *_in_db args in [Gain](../waveform_transforms/gain/), [AddBackgroundNoise](../waveform_transforms/add_background_noise/), [AddGaussianSNR](../waveform_transforms/add_gaussian_snr/), [GainTransition](../waveform_transforms/gain_transition/), [LoudnessNormalization](../waveform_transforms/loudness_normalization/) and [AddShortNoises](../waveform_transforms/add_short_noises/). Those args were deprecated since v0.31.0, and now they are gone. For details, check the documentation page of each transform.

For example:

| Old (deprecated since v0.31.0) | New |
|--------------------------------|---------------------------|
| `Gain(min_gain_in_db=-12.0)` | `Gain(min_gain_db=-12.0)` |

### Fixed

* Fix a bug where `AirAbsorption` often chose the wrong humidity bucket
* Fix wrong logic in validation check of relation between `crossfade_duration` and `min_part_duration` in `RepeatPart`
* Fix default value of `max_absolute_rms_db` in `AddBackgroundNoises`. It was incorrectly set to -45.0, but is now -15.0. This bug was introduced in 0.31.0.
* Fix default value of `max_absolute_rms_db` in `AddBackgroundNoises`. It was incorrectly set to -45.0, but is now -15.0. This bug was introduced in v0.31.0.
* Fix various errors in the documentation of `AddShortNoises` and `AirAbsorption`
* Fix a bug where `AddShortNoises` sometimes raised a `ValueError` because of an empty array. This bug was introduced in 0.36.1.
* Fix a bug where `AddShortNoises` sometimes raised a `ValueError` because of an empty array. This bug was introduced in v0.36.1.

## [0.37.0] - 2024-09-03

Expand Down
Loading