diff --git a/.cookietemple.yml b/.cookietemple.yml index 22da5f1..d1ce3d2 100644 --- a/.cookietemple.yml +++ b/.cookietemple.yml @@ -15,5 +15,5 @@ full_name: Mario Picciani email: mario.picciani@tum.de project_name: spectrum_io project_short_description: IO related functionalities for oktoberfest. -version: 0.3.2 +version: 0.3.3 license: MIT diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index f3caebd..d927b44 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -1,5 +1,5 @@ -name-template: "0.3.2 🌈" # <> -tag-template: 0.3.2 # <> +name-template: "0.3.3 🌈" # <> +tag-template: 0.3.3 # <> exclude-labels: - "skip-changelog" diff --git a/.readthedocs.yml b/.readthedocs.yml index d29ead8..0d4960e 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -3,19 +3,20 @@ version: 2 -# Build documentation in the docs/ directory with Sphinx +# Set the OS, Python version and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.10" + +# Build documentation in the "docs/" directory with Sphinx sphinx: configuration: docs/conf.py -# Build documentation with MkDocs -#mkdocs: -# configuration: mkdocs.yml - # Optionally build your docs in additional formats such as PDF and ePub formats: all # Optionally set the version of Python and requirements required to build your docs python: - version: 3.8 install: - requirements: docs/requirements.txt diff --git a/cookietemple.cfg b/cookietemple.cfg index e68513b..b216c78 100644 --- a/cookietemple.cfg +++ b/cookietemple.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.3.2 +current_version = 0.3.3 [bumpversion_files_whitelisted] init_file = spectrum_io/__init__.py diff --git a/docs/conf.py b/docs/conf.py index 1ee140d..c8412b0 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -53,9 +53,9 @@ # the built documents. # # The short X.Y version. -version = "0.3.2" +version = "0.3.3" # The full version, including alpha/beta/rc tags. -release = "0.3.2" +release = "0.3.3" # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/pyproject.toml b/pyproject.toml index 9fb27b3..1ca1acd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "spectrum_io" -version = "0.3.2" # <> +version = "0.3.3" # <> description = "IO related functionalities for oktoberfest." authors = ["Mario Picciani "] license = "MIT" diff --git a/spectrum_io/__init__.py b/spectrum_io/__init__.py index 09adc59..d37409b 100644 --- a/spectrum_io/__init__.py +++ b/spectrum_io/__init__.py @@ -2,7 +2,7 @@ __author__ = "Mario Picciani" __email__ = "mario.picciani@tum.de" -__version__ = "0.3.2" +__version__ = "0.3.3" import logging import logging.handlers diff --git a/spectrum_io/__main__.py b/spectrum_io/__main__.py index 59c34a2..5237ba4 100644 --- a/spectrum_io/__main__.py +++ b/spectrum_io/__main__.py @@ -5,7 +5,7 @@ @click.command() -@click.version_option(version="0.3.2", message=click.style("spectrum_io Version: 0.3.2")) +@click.version_option(version="0.3.3", message=click.style("spectrum_io Version: 0.3.3")) def main() -> None: """spectrum_io.""" diff --git a/spectrum_io/raw/msraw.py b/spectrum_io/raw/msraw.py index c601301..1b1826c 100644 --- a/spectrum_io/raw/msraw.py +++ b/spectrum_io/raw/msraw.py @@ -18,20 +18,19 @@ def check_analyzer(mass_analyzers: Dict[str, str]) -> Dict[str, str]: Convert mass analyzer accession ids to internal format. :param mass_analyzers: dictionary with instrumentConfigurationRef, analyzer accession - :raises AssertionError: if the mass analyzer metadata cannot be found in the file or the search - was conducted with an unsupported mass analyzer. - :return: dictionary with instrumentConfigurationRef, one of (ITMS, FTMS, TOF) + :return: dictionary with instrumentConfigurationRef, one of "ITMS", "FTMS", "TOF" or "unknown", + in case the analyzer accession cannot be mapped to one of the three groups. """ for elem in mass_analyzers.keys(): accession = mass_analyzers[elem] if accession in ["MS:1000079", "MS:1000484"]: # fourier transform ion cyclotron, orbitrap mass_analyzers[elem] = "FTMS" - elif accession in ["MS:1000082", "MS:1000264"]: # quadrupole ion-trap, io-trap + elif accession in ["MS:1000082", "MS:1000264" "MS:1000078"]: # quadrupole ion-trap, ion-trap, linear ion-trap mass_analyzers[elem] = "ITMS" elif accession in ["MS:1000084"]: # TOF mass_analyzers[elem] = "TOF" else: - raise AssertionError(f"The mass analyzer with accession {accession} is not supported.") + mass_analyzers[elem] = "unsupported" return mass_analyzers