Skip to content

Commit

Permalink
Suppress deprecation warnings in plip
Browse files Browse the repository at this point in the history
plip has not updated its code with regard to new numpy versions, and thus the explicit casting `np.uint32(i)` in line 361 of `plip.basic.supplemental` (function `int32_to_negative`) throws thousands of warnings. These are suppressed here, as the warning suppression in our `util.__init__` is not catching these, probably due to setting of the logging level at the top of this module.
  • Loading branch information
AAriam committed Feb 15, 2024
1 parent 4577c80 commit 1e36271
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from enum import Enum # for creating enumeration classes
from pathlib import Path # for creating folders and handling local paths
import logging # for setting logging levels (to disable logging defaults of packages e.g. PLIP)
import warnings

import plip # for changing the logging setting of the package (see bottom of the cell: Settings)
# for calculating protein-ligand interactions
Expand All @@ -15,8 +16,8 @@

# Settings:
# disabling excessive INFO logs of the PLIP package
logging.getLogger(plip.__name__).setLevel(logging.WARNING)

logging.getLogger(plip.__name__).setLevel(logging.ERROR)
warnings.simplefilter("ignore", category=DeprecationWarning)

class Consts:
"""
Expand Down

0 comments on commit 1e36271

Please sign in to comment.