Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
repos:
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.35.1
rev: v1.38.0
hooks:
- id: yamllint
args: [-c=.yamllint.yml]

- repo: https://github.com/pycqa/isort
rev: 5.13.2
rev: 9.0.0a3
hooks:
- id: isort

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
- id: trailing-whitespace
exclude: .bumpversion.cfg
Expand All @@ -20,30 +20,30 @@ repos:
- id: check-added-large-files

- repo: https://github.com/asottile/add-trailing-comma
rev: v3.1.0
rev: v4.0.0
hooks:
- id: add-trailing-comma

- repo: https://github.com/asottile/pyupgrade
rev: v3.19.0
rev: v3.21.2
hooks:
- id: pyupgrade

- repo: https://github.com/psf/black
rev: 24.10.0
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 26.5.1
hooks:
- id: black
args: ["--safe"]

- repo: https://github.com/PyCQA/docformatter
rev: eb1df347edd128b30cd3368dddc3aa65edcfac38 # v1.7.5
rev: v1.7.8 # v1.7.5
hooks:
- id: docformatter
name: Format docstring
args: [--in-place, --wrap-summaries, "88", --wrap-descriptions, "80", --blank]

- repo: https://github.com/executablebooks/mdformat
rev: 0.7.19
rev: 1.0.0
hooks:
- id: mdformat
name: Format markdown
Expand Down
3 changes: 2 additions & 1 deletion src/obnb/data/annotation/diseases.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ class DISEASESAnnotation(BaseAnnotationData):
This is the ``integrated`` disease annotation channel from the Jensen Lab
DISEASES annotation database, which combines evidences from *text-mining*,
*knowledge*, and *experiment* channels. See the
`DISEASES <https://diseases.jensenlab.org/About>`_ webpage for more
`DISEASES <https://diseases.jensenlab.org/About>`_
webpage for more
information

"""
Expand Down
10 changes: 5 additions & 5 deletions src/obnb/graph/ontology.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
class OntologyGraph(DirectedSparseGraph):
"""Ontology graph.

An ontology graph is a directed acyclic graph (DAG). Here, we represent
this data type using DirectedSparseGraph, which keeps track of both the
forward direction of edges (``_edge_data``) and the reversed direction of
edges (``_rev_edge_data``). This bidirectional awareness is useful in the
context of propagating information "upwards" or "downloads".
An ontology graph is a directed acyclic graph (DAG). Here, we represent this
data type using DirectedSparseGraph, which keeps track of both the forward
direction of edges (``_edge_data``) and the reversed direction of edges
(``_rev_edge_data``). This bidirectional awareness is useful in the context
of propagating information "upwards" or "downloads".

The ``idmap`` attribute is swapped with a more functional ``IDProp`` object
that allows the storing of node information such as the name and the node
Expand Down
16 changes: 3 additions & 13 deletions test/test_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -1079,21 +1079,11 @@ def test_ancestors(self):
self.assertEqual(graph.ancestors("f"), {"a", "c", "d"})

def test_restrict_to_branch(self):
r"""

a
| \
b d
| | \
c e [z] f [x, y]

|
V
r"""A | \ b d | | \ c e [z] f [x, y]

d
| \
e [z] f [x, y]
| V

d | \ e [z] f [x, y]

"""
graph = OntologyGraph()
Expand Down
Loading