Skip to content

Commit 7d64524

Browse files
remove warnings from sqalchemy
1 parent 9cd3ac2 commit 7d64524

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

mumble/mumble.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from functools import lru_cache
1010
import hashlib
1111
import importlib
12+
import warnings
1213

1314
import pandas as pd
1415
import pickle
@@ -20,10 +21,15 @@
2021
from pyteomics.fasta import IndexedFASTA
2122
from rich.progress import Progress, SpinnerColumn, TextColumn, BarColumn, TimeElapsedColumn
2223
from rich.pretty import pretty_repr
24+
from sqlalchemy import exc
25+
2326

2427
# Add a logger
2528
logger = logging.getLogger(__name__)
2629

30+
# suppress warnings from sqlalchemy
31+
warnings.filterwarnings("ignore", category=exc.SAWarning, message=".*will copy column.*")
32+
2733

2834
class PSMHandler:
2935
"""Class that contains all information about the input file"""
@@ -1008,7 +1014,7 @@ def generate_combinations(items, length):
10081014

10091015
def _regenerate_and_save_cache(self) -> None:
10101016
"""Regenerate data and save it to the cache."""
1011-
logger.info("Generating cache data")
1017+
logger.info("Generating new cache data")
10121018
self.get_unimod_database()
10131019
self.monoisotopic_masses, self.modifications_names = (
10141020
self._generate_modifications_combinations_lists(self.combination_length)

0 commit comments

Comments
 (0)