-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update versions and add default_signalling
- Loading branch information
Showing
5 changed files
with
54 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from __future__ import annotations | ||
|
||
import signal | ||
from signal import SIGINT, SIGTERM, Signals, SIG_DFL | ||
from typing import List | ||
|
||
__all__ = ["default_signalling"] | ||
|
||
|
||
class default_signalling: | ||
def __init__(self, signals: List[Signals] = [SIGTERM, SIGINT]): | ||
self._signals = signals | ||
self._handlers: List[signal._HANDLER] = [] | ||
|
||
def __enter__(self): | ||
for x in self._signals: | ||
self._handlers.append(signal.getsignal(x)) | ||
signal.signal(x, SIG_DFL) | ||
return self | ||
|
||
def __exit__(self, *_): | ||
for x, y in zip(self._signals, self._handlers): | ||
signal.signal(x, y) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "deciphon" | ||
version = "0.11.4" | ||
version = "0.11.5" | ||
description = "Individually annotate long, error-prone nucleotide sequences into proteins" | ||
authors = ["Danilo Horta <[email protected]>"] | ||
license = "MIT" | ||
|
@@ -10,7 +10,7 @@ packages = [{ include = "deciphon" }] | |
[tool.poetry.dependencies] | ||
python = "^3.9" | ||
cffi = "^1.15.1" | ||
deciphon-core = ">=0.20.12" | ||
deciphon-core = ">=0.20.14" | ||
deciphon-snap = ">=0.8.2" | ||
fasta-reader = "^3" | ||
h3daemon = ">=0.13.8" | ||
|