-
Notifications
You must be signed in to change notification settings - Fork 210
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add test_i304_regulates.py * update version * minor * update __init__.py
- Loading branch information
1 parent
60479ca
commit 2dfb6af
Showing
2 changed files
with
22 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
from datetime import datetime | ||
from pkg_resources import get_distribution, DistributionNotFound | ||
from importlib.metadata import version, PackageNotFoundError | ||
|
||
__author__ = ("Haibao Tang", "DV Klopfenstein") | ||
__copyright__ = "Copyright (C) 2009-{}, Haibao Tang, DV Klopfenstein".format( | ||
datetime.now().year | ||
__copyright__ = ( | ||
f"Copyright (C) 2009-{datetime.now().year}, Haibao Tang, DV Klopfenstein" | ||
) | ||
__email__ = "[email protected]" | ||
__license__ = "BSD" | ||
__status__ = "Development" | ||
|
||
try: | ||
VERSION = get_distribution(__name__).version | ||
except DistributionNotFound: # pragma: no cover | ||
VERSION = version(__name__) | ||
except PackageNotFoundError: # pragma: no cover | ||
try: | ||
from .version import version as VERSION # noqa | ||
except ImportError: # pragma: no cover | ||
except ImportError as exc: # pragma: no cover | ||
raise ImportError( | ||
"Failed to find (autogenerated) version.py. " | ||
"This might be because you are installing from GitHub's tarballs, " | ||
"use the PyPI ones." | ||
) | ||
) from exc | ||
__version__ = VERSION |
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,15 @@ | ||
from goatools.gosubdag.gosubdag import GoSubDag | ||
from goatools.obo_parser import GODag | ||
|
||
|
||
def test_i304_regulates(): | ||
godag = GODag("go-basic.obo", optional_attrs=["relationship"]) | ||
optional_relationships = { | ||
"regulates", | ||
"negatively_regulates", | ||
"positively_regulates", | ||
} | ||
anc = GoSubDag( | ||
["GO:0019222"], godag, optional_relationships, prt=None | ||
).rcntobj.go2ancestors["GO:0019222"] | ||
assert len(anc) == 4 |