nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: cross-rs/cross
Pull request #881 (2022-06-29 15:44:25)

Update CI tests to use local cross build.
Simplifies testing CI locally, without modifying the system installation.

Emilgardis: ie. `cargo run --bin cross -- `

Patch:
diff --git a/.github/codecov.yml b/.github/codecov.yml
index 4d927d4..3067768 100644
--- a/.github/codecov.yml
+++ b/.github/codecov.yml
@@ -10,5 +10,5 @@ coverage:
       default:
         informational: true
 flag_management:
-  default_rules: # the rules that will be followed for any flag added, generally.
+  default_rules: # the rules that will be followed for any flag added, generally
     carryforward: true
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 37c099c..d7a3341 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -283,7 +283,7 @@ jobs:
           IMAGE: ${{ steps.build-docker-image.outputs.image }}
         shell: bash
       - name: Test Image
-        if: steps.prepare-meta.outputs.has-image
+        if: steps.prepare-meta.outputs.has-image && (github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/trying')
         run: ./ci/test.sh
         env:
           TARGET: ${{ matrix.target }}


Test patch:
diff --git a/ci/test.sh b/ci/test.sh
index b920429..4b9b494 100755
--- a/ci/test.sh
+++ b/ci/test.sh
@@ -8,6 +8,10 @@ set -euo pipefail
 # installed version on macOS. likewise, "${var[@]}" is an unbound
 # error if var is an empty array.
 
+ci_dir=$(dirname "${BASH_SOURCE[0]}")
+ci_dir=$(realpath "${ci_dir}")
+project_home=$(dirname "${ci_dir}")
+
 function retry {
   local tries="${TRIES-5}"
   local timeout="${TIMEOUT-1}"
@@ -41,7 +45,7 @@ main() {
     local td=
 
     retry cargo fetch
-    cargo install --force --path . --debug
+    cargo build
 
     # Unset RUSTFLAGS
     export RUSTFLAGS=""
@@ -49,7 +53,7 @@ main() {
     export QEMU_STRACE=1
 
     # ensure we have the proper toolchain and optional rust flags
-    export CROSS=(cross)
+    export CROSS=("${project_home}/target/debug/cross")
     export CROSS_FLAGS=""
     if (( ${BUILD_STD:-0} )); then
         # use build-std instead of xargo, due to xargo being
Repository: cross-rs/cross
Pull request #925 (2022-07-08 18:22:24)

fix dind test
same as #924

also fixes no subs on variable passthrough


Alexhuszagh: This probably also needs to be done in `test-remote` and `test-bisect`.

Patch:
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index b05fe14..4f91bcd 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -389,6 +389,7 @@ jobs:
       - name: Run Docker-in-Docker Test
         env:
           TARGET: aarch64-unknown-linux-gnu
+          IMAGE: 'ghcr.io/cross-rs/cross/aarch64-unknown-linux-gnu:main'
         run: ./ci/test-docker-in-docker.sh
         shell: bash
 


Test patch:
diff --git a/ci/test-cross-image.sh b/ci/test-cross-image.sh
index b1a970e..a591ba6 100755
--- a/ci/test-cross-image.sh
+++ b/ci/test-cross-image.sh
@@ -20,7 +20,7 @@ fi
 
 main() {
 
-    docker run --rm -e TARGET -e "CROSS_TARGET_${TARGET}_IMAGE" \
+    docker run --rm -e TARGET -e "CROSS_TARGET_${TARGET//-/_}_IMAGE" \
         -v /var/run/docker.sock:/var/run/docker.sock \
         "${CROSS_TARGET_CROSS_IMAGE}" sh -c '
 #!/usr/bin/env sh
diff --git a/ci/test-docker-in-docker.sh b/ci/test-docker-in-docker.sh
index 3057c68..c9a33c0 100755
--- a/ci/test-docker-in-docker.sh
+++ b/ci/test-docker-in-docker.sh
@@ -10,6 +10,11 @@ if [[ -z "${TARGET}" ]]; then
     export TARGET="aarch64-unknown-linux-gnu"
 fi
 
+if [[ "${IMAGE}" ]]; then
+    # shellcheck disable=SC2140
+    export "CROSS_TARGET_${TARGET//-/_}_IMAGE"="${IMAGE}"
+fi
+
 source=$(dirname "${BASH_SOURCE[0]}")
 source=$(realpath "${source}")
 home=$(dirname "${source}")
@@ -18,6 +23,7 @@ main() {
     docker run -v "${home}":"${home}" -w "${home}" \
         --rm -e TARGET -e RUSTFLAGS -e RUST_TEST_THREADS \
         -e LLVM_PROFILE_FILE -e CARGO_INCREMENTAL \
+        -e "CROSS_TARGET_${TARGET//-/_}_IMAGE" \
         -v /var/run/docker.sock:/var/run/docker.sock \
         docker:18.09-dind sh -c '
 #!/usr/bin/env sh
Repository: matchms/matchms
Pull request #339 (2022-04-12 09:12:04)

Update Spectrum.py
Add `.mz` and `.intensities` properties to `Spectrum` to make it more intuitive to access the "peaks". 

`spectrum.mz` returns `spectrum.peaks.mz`


Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8c24f9a6..d41be843 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
 ## [Unreleased]
 
+### Added
+- `Spectrum` objects now also have `.mz` and `.intensities` properties [#339](https://github.com/matchms/matchms/pull/339)
+
 ### Changed
 - metadata filtering: made prefilter check for SMILES and InChI more lenient, eventually resulting in longer runtimes but more accurate checks [#337](https://github.com/matchms/matchms/pull/337)
 
diff --git a/matchms/Spectrum.py b/matchms/Spectrum.py
index 1626811c..5d2211d2 100644
--- a/matchms/Spectrum.py
+++ b/matchms/Spectrum.py
@@ -193,6 +193,14 @@ class Spectrum:
         self._metadata.set(key, value)
         return self
 
+    @property
+    def mz(self):
+        return self.peaks.mz
+
+    @property
+    def intensities(self):
+        return self.peaks.intensities
+
     @property
     def metadata(self):
         return self._metadata.data.copy()
diff --git a/setup.py b/setup.py
index c5c38c77..7b84cbe9 100644
--- a/setup.py
+++ b/setup.py
@@ -43,7 +43,6 @@ setup(
         "Programming Language :: Python :: 3.8",
         "Programming Language :: Python :: 3.9"
     ],
-    test_suite="tests",
     python_requires='>=3.7',
     install_requires=[
         "deprecated",
@@ -64,7 +63,7 @@ setup(
                             "prospector[with_pyroma]",
                             "pytest",
                             "pytest-cov",
-                            "sphinx>=3.0.0,!=3.2.0,!=3.5.0,<4.0.0",
+                            "sphinx>=4.0.0",
                             "sphinx_rtd_theme",
                             "sphinxcontrib-apidoc",
                             "testfixtures",


Test patch:
diff --git a/tests/test_spectrum.py b/tests/test_spectrum.py
index 717c1d9d..c7ffaf9b 100644
--- a/tests/test_spectrum.py
+++ b/tests/test_spectrum.py
@@ -54,6 +54,15 @@ def test_spectrum_getters_return_copies():
     assert spectrum.metadata == {'testdata': 1}, "Expected metadata to remain unchanged"
 
 
+def test_spectrum_getters(spectrum: Spectrum):
+    assert np.all(spectrum.mz == spectrum.peaks.mz)
+    assert np.all(spectrum.intensities == spectrum.peaks.intensities)
+    # Test if true copy
+    mz = spectrum.mz
+    mz[0] = 1111
+    assert np.allclose(spectrum.peaks.mz[0], 100.00003)
+
+
 @pytest.mark.parametrize("input_dict, expected_dict", [
     [{"precursor mass": 400.768, "Some Key": "Whatever.", "NEW\tSTUFF": "XYZ"},
      {"precursor_mz": 400.768, "some_key": "Whatever.", "new_stuff": "XYZ"}],
Repository: matchms/matchms
Pull request #558 (2023-11-14 10:34:43)

Fix repair not matching annotation
Before this filter would still repair the smiles from the inchi, if both would actually be incorrect (not matching parent mass).


Patch:
diff --git a/matchms/filtering/metadata_processing/repair_not_matching_annotation.py b/matchms/filtering/metadata_processing/repair_not_matching_annotation.py
index fbbf3181..ff0451ae 100644
--- a/matchms/filtering/metadata_processing/repair_not_matching_annotation.py
+++ b/matchms/filtering/metadata_processing/repair_not_matching_annotation.py
@@ -109,9 +109,12 @@ def _repair_smiles_inchi(spectrum):
         logger.info("The InChI has been changed from %s to %s. "
                     "The new InChI matches the parent mass, while the old one did not", inchi, inchi_from_smiles)
         spectrum.set("inchi", inchi_from_smiles)
-    else:
+    elif inchi_correct and not smiles_correct:
         # Repair by using SMILES generated from the inchi
         logger.info("The SMILES has been changed from %s to %s to match the InChI. "
                     "The new SMILES matches the parent mass, while the old one did not", smiles, smiles_from_inchi)
         spectrum.set("smiles", smiles_from_inchi)
+    else:
+        logger.warning("Both the Smiles %s and the inchi %s do not match the parent mass %f", smiles, inchi,
+                       parent_mass)
     return spectrum


Test patch:
diff --git a/tests/filtering/test_repair_not_matching_annotation.py b/tests/filtering/test_repair_not_matching_annotation.py
index 71aff25a..32e3cec6 100644
--- a/tests/filtering/test_repair_not_matching_annotation.py
+++ b/tests/filtering/test_repair_not_matching_annotation.py
@@ -32,6 +32,9 @@ def test_repair_not_matching_annotation_repair_inchikey(smile, inchi, inchikey,
      "CCC", "InChI=1S/C3H8/c1-3-2/h3H2,1-2H3", "ATUOYWHBWRKTHZ-UHFFFAOYSA-N"),
     ("C(=O)=O", "InChI=1S/C3H8/c1-3-2/h3H2,1-2H3", "ATUOYWHBWRKTHZ-UHFFFAOYSA-N", 44,  # Both match the parent mass
      "C(=O)=O", "InChI=1S/C3H8/c1-3-2/h3H2,1-2H3", "ATUOYWHBWRKTHZ-UHFFFAOYSA-N"),  # So nothing should be changed
+    # Both don't match the parent mass, so nothing should be changed
+    ("C(=O)=O", "InChI=1S/C3H8/c1-3-2/h3H2,1-2H3", "ATUOYWHBWRKTHZ-UHFFFAOYSA-N", 50,
+     "C(=O)=O", "InChI=1S/C3H8/c1-3-2/h3H2,1-2H3", "ATUOYWHBWRKTHZ-UHFFFAOYSA-N"),
 ])
 def test_repair_not_matching_annotation_repair_smiles_inchi(smile, inchi, inchikey, parent_mass,
                                                      correct_smiles, correct_inchi, correct_inchikey):
Repository: matchms/matchms
Pull request #610 (2024-04-02 12:32:30)

Fix mz boundaries mirror plot
Noticed and fixed by @lionel42 in #607, added test and some linting changes here.

The function plot_spectra_mirror should behave the same as plot_spectrum for the keyword argument min_mz and max_mz.

this pull request provide a quick fix for that.


Patch:
diff --git a/matchms/plotting/spectrum_plots.py b/matchms/plotting/spectrum_plots.py
index 680ebd7a..e236efd2 100644
--- a/matchms/plotting/spectrum_plots.py
+++ b/matchms/plotting/spectrum_plots.py
@@ -122,9 +122,9 @@ def plot_spectra_mirror(spec_top,
 
     Parameters
     ----------
-    spec_top: matchms.Spectrum
+    spec_top: matchms.Spectrum.Spectrum.Spectrum
         The spectrum to be plotted on the top.
-    spec_bottom: matchms.Spectrum
+    spec_bottom: matchms.Spectrum.Spectrum.Spectrum
         The spectrum to be plotted on the bottom.
     ax:
         Axes instance on which to plot the spectrum. If None the current Axes
@@ -167,6 +167,11 @@ def plot_spectra_mirror(spec_top,
             np.ceil(spec_bottom.peaks.mz[-1] / 100 + 1) * 100,
         ]
     )
+
+    # # Enforce min_mz and max_mz if provided
+    max_mz = spectrum_kws.get("max_mz", max_mz)
+    min_mz = spectrum_kws.get("min_mz", min_mz)
+
     ax.set_xlim(min_mz, max_mz)
     ax.yaxis.set_major_locator(mticker.AutoLocator())
     ax.yaxis.set_minor_locator(mticker.AutoMinorLocator())


Test patch:
diff --git a/tests/plotting/test_spectrum_plots.py b/tests/plotting/test_spectrum_plots.py
index 3fe2aad3..89c39668 100644
--- a/tests/plotting/test_spectrum_plots.py
+++ b/tests/plotting/test_spectrum_plots.py
@@ -1,7 +1,8 @@
 import numpy as np
 from matplotlib import pyplot as plt
 from matchms import Spectrum
-from matchms.plotting import plot_spectra_array, plot_spectrum
+from matchms.plotting import (plot_spectra_array, plot_spectra_mirror,
+                              plot_spectrum)
 
 
 def _assert_fig_ok(fig, n_plots, dpi, height):
@@ -22,6 +23,19 @@ def _assert_ax_ok(ax, n_lines, ylim, xlabel, ylabel):
     assert ax.get_ylabel() == ylabel
 
 
+def test_plot_mirror_plot():
+    # Create two random spectrums
+    spec_a = Spectrum(mz=np.array([100, 200, 300, 400.2]),
+                      intensities=np.array([0.5, 0.3, 0.1, 0.05]))
+    spec_b = Spectrum(mz=np.array([10.2, 20.2, 30.2, 40.2, 78.2]),
+                      intensities=np.array([0.5, 0.3, 0.1, 0.05, 3.1]))
+    max_mz = 250
+    min_mz = 60
+    # Boundaries were not applied in the previous coce
+    ax = plot_spectra_mirror(spec_a, spec_b, max_mz=max_mz, min_mz=min_mz)
+    assert ax.get_xlim() == (min_mz, max_mz)
+
+
 def test_plot_spectrum_default():
     n_peaks = 100
     mz = np.random.randint(0, 1000, n_peaks).astype("float")
Repository: matchms/matchms
Pull request #613 (2024-04-04 15:17:29)

Fix issue with single number of rows or columns
plot_spectra_array() breaks when having only a single column or row. 



Patch:
diff --git a/matchms/plotting/spectrum_plots.py b/matchms/plotting/spectrum_plots.py
index e236efd2..50ae7117 100644
--- a/matchms/plotting/spectrum_plots.py
+++ b/matchms/plotting/spectrum_plots.py
@@ -201,7 +201,7 @@ def plot_spectra_array(spectrums,
 
     Parameters
     ----------
-    spectrums: list of matchms.Spectrum
+    spectrums: list of matchms.Spectrum.Spectrum
         List of spectra to be plotted in a single figure.
     n_cols:
         Number of spectra to be plotted per row. Default is 4.
@@ -213,7 +213,7 @@ def plot_spectra_array(spectrums,
     assert isinstance(spectrums, list), "Expected list of Spectrum objects as input."
     n_spectra = len(spectrums)
     n_rows = int(np.ceil(n_spectra / n_cols))
-    fig, axes = plt.subplots(n_rows, n_cols, figsize=(7 * n_cols, 3 * n_rows), dpi=dpi)
+    fig, axes = plt.subplots(n_rows, n_cols, figsize=(7 * n_cols, 3 * n_rows), dpi=dpi, squeeze=False)
 
     if spectrum_kws is None:
         spectrum_kws = {}


Test patch:
diff --git a/tests/plotting/test_spectrum_plots.py b/tests/plotting/test_spectrum_plots.py
index 89c39668..5ee37de4 100644
--- a/tests/plotting/test_spectrum_plots.py
+++ b/tests/plotting/test_spectrum_plots.py
@@ -67,6 +67,19 @@ def test_plot_spectrum_peak_comments():
                   xlabel="m/z", ylabel="Intensity")
 
 
+def test_plot_single_spectrum_plot_spectra_array():
+    """Test that inputing a single spectrum doesn't break plot_spectra_array"""
+    n_peaks = 50
+
+    mz = np.random.randint(0, 1000, n_peaks).astype("float")
+    mz.sort()
+
+    spectrum = Spectrum(mz=mz,
+                        intensities=np.random.random(n_peaks),
+                        metadata={"compound_name": "Spectrum name"})
+    plot_spectra_array([spectrum])
+
+
 def test_plot_spectra_array_default():
     n = 9
     n_peaks = 50
Repository: matchms/matchms
Pull request #655 (2024-05-18 13:20:05)

Fail fast on loading missing mgf
This is my proposed way of addressing #652 . Since generators do not run any code until we `list(...)` them, it's only possible to `raise` anything if we make the generator code a wrapped function. If anyone has a more elegant solution, I'm all ears :D 

Also added a test-case for this.


Patch:
diff --git a/matchms/importing/load_from_mgf.py b/matchms/importing/load_from_mgf.py
index dec6a810..52a4bf58 100644
--- a/matchms/importing/load_from_mgf.py
+++ b/matchms/importing/load_from_mgf.py
@@ -1,3 +1,4 @@
+import os
 from typing import Generator, TextIO, Union
 from pyteomics.mgf import MGF
 from matchms.importing.parsing_utils import parse_spectrum_dict
@@ -33,8 +34,14 @@ def load_from_mgf(filename: Union[str, TextIO],
         Set to False if metadata harmonization to default keys is not desired.
         The default is True.
     """
-    with MGF(filename, convert_arrays=1) as reader:
-        for pyteomics_spectrum in reader:
-            yield parse_spectrum_dict(
-                spectrum=pyteomics_spectrum,
-                metadata_harmonization=metadata_harmonization)
+    if not os.path.isfile(filename):
+        raise FileNotFoundError(f"The specified file: {filename} doesn't exist.") 
+    
+    def parse_file():
+        with MGF(filename, convert_arrays=1) as reader:
+            for pyteomics_spectrum in reader:
+                yield parse_spectrum_dict(
+                    spectrum=pyteomics_spectrum,
+                    metadata_harmonization=metadata_harmonization)
+    
+    return parse_file()


Test patch:
diff --git a/tests/importing/test_load_from_mgf.py b/tests/importing/test_load_from_mgf.py
index 1ea22f95..26596417 100644
--- a/tests/importing/test_load_from_mgf.py
+++ b/tests/importing/test_load_from_mgf.py
@@ -1,4 +1,5 @@
 import os
+import pytest
 from matchms import Spectrum
 from matchms.importing import load_from_mgf
 
@@ -11,3 +12,8 @@ def test_load_from_mgf_using_filepath():
 
     assert len(spectra) > 0
     assert isinstance(spectra[0], Spectrum)
+
+
+def test_load_missing_mgf_raises():
+    with pytest.raises(FileNotFoundError):
+        load_from_mgf('does-not-exist.mgf')
diff --git a/tests/similarity/test_metadata_match.py b/tests/similarity/test_metadata_match.py
index 3bdf7d47..8ea53a39 100644
--- a/tests/similarity/test_metadata_match.py
+++ b/tests/similarity/test_metadata_match.py
@@ -88,7 +88,5 @@ def test_metadata_match_invalid_array_type(spectrums):
 
     similarity_score = MetadataMatch(field="instrument_type")
 
-    try:
+    with pytest.raises(ValueError, match="array_type must be 'numpy' or 'sparse'."):
         calculate_scores(references, queries, similarity_score, array_type = "scipy")
-    except ValueError as e:
-        assert str(e) == "array_type must be 'numpy' or 'sparse'.", "The error message did not match the expected output"
Repository: matchms/matchms
Pull request #660 (2024-05-23 18:04:12)

Allow peaks with many floating types
A tiny quality-of-life addition: I've relaxed the assertion check for `Fragments.mz` and `Fragments.intensitities` dtypes. Now, any "floaty" type is acceptable - including `np.float16`, `np.float32` and `np.float64`. Added tests for this too.


Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a2f67156..bdd30f27 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 ## Unreleased
 ### Added
 - Added remove_profile_spectra filter
+- Allowed peaks to have any floating point dtype
 - Added require_matching_ionmode_and_adduct filter
 
 ### Removed:
diff --git a/matchms/Fragments.py b/matchms/Fragments.py
index 52787605..1badbd3e 100644
--- a/matchms/Fragments.py
+++ b/matchms/Fragments.py
@@ -36,8 +36,8 @@ class Fragments:
         assert isinstance(mz, np.ndarray), "Input argument 'mz' should be a np.array."
         assert isinstance(intensities, np.ndarray), "Input argument 'intensities' should be a np.array."
         assert mz.shape == intensities.shape, "Input arguments 'mz' and 'intensities' should be the same shape."
-        assert mz.dtype == "float", "Input argument 'mz' should be an array of type float."
-        assert intensities.dtype == "float", "Input argument 'intensities' should be an array of type float."
+        assert mz.dtype.kind == "f", "Input argument 'mz' should be an array of type float."
+        assert intensities.dtype.kind == "f", "Input argument 'intensities' should be an array of type float."
 
         self._mz = mz
         self._intensities = intensities


Test patch:
diff --git a/tests/test_fragments.py b/tests/test_fragments.py
index d17b19f7..dd74d4b3 100644
--- a/tests/test_fragments.py
+++ b/tests/test_fragments.py
@@ -3,10 +3,16 @@ import pytest
 from matchms.Fragments import Fragments
 
 
-def test_fragments_init():
-
-    mz = np.array([10, 20, 30], dtype="float")
-    intensities = np.array([100, 20, 300], dtype="float")
+@pytest.mark.parametrize('dtype', [
+    np.float16,
+    np.float32,
+    np.float64,
+    float,
+    "float",
+])
+def test_fragments_init(dtype):
+    mz = np.array([10, 20, 30], dtype=dtype)
+    intensities = np.array([100, 20, 300], dtype=dtype)
 
     peaks = Fragments(mz=mz, intensities=intensities)
Repository: matchms/matchms
Pull request #665 (2024-05-27 13:42:21)

Add check filters handle none
matchms filters should be able to handle spectra set to None. This test checks if this is the case for all filters.


Patch:
diff --git a/matchms/filtering/peak_processing/remove_profiled_spectra.py b/matchms/filtering/peak_processing/remove_profiled_spectra.py
index d28ec51d..4a250c6c 100644
--- a/matchms/filtering/peak_processing/remove_profiled_spectra.py
+++ b/matchms/filtering/peak_processing/remove_profiled_spectra.py
@@ -15,11 +15,12 @@ def remove_profiled_spectra(spectrum: Spectrum, mz_window=0.5):
     Reproduced from MZmine.
     https://github.com/mzmine/mzmine3/blob/master/src/main/java/io/github/mzmine/util/scans/ScanUtils.java#L609
     """
+    if spectrum is None:
+        return None
     peaks_n = spectrum.mz.shape[0]
     if peaks_n < 3:
         return spectrum
 
-    # mz_window = spectrum.mz[-1] - spectrum.mz[0] / 1000
     number_of_high_intensity_surounding_peaks = _get_number_of_high_intensity_surounding_peaks(spectrum.intensities,
                                                                                                spectrum.mz, mz_window)
     if number_of_high_intensity_surounding_peaks < 3:


Test patch:
diff --git a/tests/filtering/test_predefined_pipelines.py b/tests/filtering/test_predefined_pipelines.py
index 1152ec29..56135629 100644
--- a/tests/filtering/test_predefined_pipelines.py
+++ b/tests/filtering/test_predefined_pipelines.py
@@ -6,3 +6,11 @@ def test_run_predefined_filter_sets():
     """Tests if all predefined filter sets can be run"""
     for filter_set in ALL_FILTER_SETS:
         SpectrumProcessor(filter_set)
+
+
+def test_all_filters_can_handle_none():
+    """All filters should be able to take None as input instead of a spectrum object"""
+    for filter_set in ALL_FILTER_SETS:
+        spectrum_processor = SpectrumProcessor(filter_set)
+        for selected_filter in spectrum_processor.filters:
+            assert selected_filter(None) is None, f"The filter {selected_filter.__name__} cannot hande None as input"