-
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.
[docs] added description of top level package elements
- Loading branch information
1 parent
f79777f
commit a645273
Showing
2 changed files
with
32 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,33 @@ | ||
from . import abc | ||
from .types import adjacency_graph | ||
from .abc import Graph as _GraphABC | ||
from .types.adjacency_graph import AdjacencyGraph as _AdjacencyGraph | ||
|
||
#: default graph implementation | ||
graph = adjacency_graph.AdjacencyGraph | ||
#: Default graph type implementation | ||
#: | ||
#: An implementation of the :py:class:`~graphi.abc.Graph` interface, | ||
#: suitable for most purposes. | ||
#: Support of all graph interfaces for both reading and writing is | ||
#: provided. | ||
#: The implementation is adequate for most use-cases, and provides | ||
#: a balance of complexity, performance and storage. | ||
#: | ||
#: :see: The corresponding class | ||
#: :py:class:`~graphi.types.adjacency_graph.AdjacencyGraph` | ||
#: for details. | ||
graph = _AdjacencyGraph | ||
|
||
#: graph ABC/type | ||
Graph = abc.Graph | ||
#: Graph :term:`abstract base class` for type checks and virtual subclasses | ||
#: | ||
#: The ABC is primarily needed for two cases: | ||
#: | ||
#: * Type checking to find graph classes via :py:func:`isinstance`, as in | ||
#: ``isinstance(candidate, GraphABC)``. | ||
#: | ||
#: * Actual or virtual subclasses acting as implementations of the :py:mod:`graphi` | ||
#: interface for type checks. | ||
#: | ||
#: :see: The corresponding class | ||
#: :py:class:`~graphi.abc.Graph` | ||
#: for details. | ||
GraphABC = _GraphABC | ||
|
||
__all__ = ['graph', 'Graph'] | ||
__all__ = ['graph', 'GraphABC'] |