Skip to content

Commit 62ffe17

Browse files
committed
REFACT: Rename module OP-->COMPOSITION
1 parent e278926 commit 62ffe17

File tree

12 files changed

+20
-22
lines changed

12 files changed

+20
-22
lines changed

docs/source/arch.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ Architecture
3636

3737
.. autosummary::
3838

39-
graphtik.op.FunctionalOperation
40-
graphtik.op.NetworkOperation
39+
graphtik.composition.FunctionalOperation
40+
graphtik.composition.NetworkOperation
4141
graphtik.network.Network
4242
graphtik.execution.ExecutionPlan
4343
graphtik.execution.Solution

docs/source/plotting.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ in :term:`parallel`::
509509
DEBUG === (3C40) Executing netop(t), in parallel, on inputs[], according to ExecutionPlan(needs=[], provides=['b'], x2 steps: op1, op2)...
510510
DEBUG +++ (3C40) Parallel batch['op1'] on solution[].
511511
DEBUG +++ (3C40) Executing OpTask(FunctionalOperation|(name='op1', needs=[], provides=[sfx: 'b'], fn{}='<lambda>'), sol_keys=[])...
512-
INFO graphtik.op:op.py:534 Results[sfx: 'b'] contained +1 unknown provides[sfx: 'b']
512+
INFO graphtik.composition:op.py:534 Results[sfx: 'b'] contained +1 unknown provides[sfx: 'b']
513513
FunctionalOperation|(name='op1', needs=[], provides=[sfx: 'b'], fn{}='<lambda>')
514514
DEBUG ... (3C40) op(op1) completed in 1.406ms.
515515

@@ -519,7 +519,7 @@ in :term:`parallel`::
519519
DEBUG ... cache-hit key: ((), None, None)
520520
DEBUG === (8697) Executing netop(t), evicting, on inputs[], according to ExecutionPlan(needs=[], provides=['b'], x3 steps: op1, op2, sfx: 'b')...
521521
DEBUG +++ (8697) Executing OpTask(FunctionalOperation(name='op1', needs=[], provides=[sfx: 'b'], fn{}='<lambda>'), sol_keys=[])...
522-
INFO graphtik.op:op.py:534 Results[sfx: 'b'] contained +1 unknown provides[sfx: 'b']
522+
INFO graphtik.composition:op.py:534 Results[sfx: 'b'] contained +1 unknown provides[sfx: 'b']
523523
FunctionalOperation(name='op1', needs=[], provides=[sfx: 'b'], fn{}='<lambda>')
524524
DEBUG ... (8697) op(op1) completed in 0.149ms.
525525
DEBUG +++ (8697) Executing OpTask(FunctionalOperation(name='op2', needs=[sfx: 'b'], provides=['b'], fn='<lambda>'), sol_keys=[sfx: 'b'])...

docs/source/reference.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ API Reference
55
.. autosummary::
66

77
graphtik
8-
graphtik.op
8+
graphtik.composition
99
graphtik.modifiers
1010
graphtik.network
1111
graphtik.execution
@@ -17,10 +17,10 @@ API Reference
1717
.. raw:: html
1818
:file: images/GraphtikModuleDependencies.svg
1919

20-
Module: `op`
21-
====================
20+
Module: `composition`
21+
=====================
2222

23-
.. automodule:: graphtik.op
23+
.. automodule:: graphtik.composition
2424
:members:
2525
:undoc-members:
2626
:private-members:

graphtik/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
vararg,
4949
varargs,
5050
)
51-
from .op import NULL_OP, operation, compose
51+
from .composition import NULL_OP, operation, compose
5252

5353
## SEE ALSO: `.plot.active_plotter_plugged()`, `.plot.set_active_plotter()` &
5454
# `.plot.get_active_plotter()` configs, not imported, unless plot is needed..

graphtik/op.py renamed to graphtik/composition.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
"""
44
.. default-role: term
55
6-
`compose` `operation` & `dependency` into `pipeline`\\s..
7-
8-
and match/zip inputs/outputs during `execution .
6+
`compose` `operation` & `dependency` into `pipeline`\\s match/zip inputs/outputs during `execution`.
97
108
.. default-role:
119
"""

graphtik/execution.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
yield_node_names,
4242
yield_ops,
4343
)
44-
from .op import Operation
44+
from .composition import Operation
4545

4646
#: If this logger is *eventually* DEBUG-enabled,
4747
#: the string-representation of network-objects (network, plan, solution)

graphtik/network.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
from .base import Items, PlotArgs, Plottable, astuple, jetsam
2525
from .config import is_debug, is_skip_evictions
2626
from .modifiers import dep_renamed, is_mapped, is_optional, is_sfx, optional
27-
from .op import FunctionalOperation, Operation
27+
from .composition import FunctionalOperation, Operation
2828

2929
NodePredicate = Callable[[Any, Mapping], bool]
3030

@@ -639,7 +639,7 @@ def build_network(
639639
see same-named param in :func:`.compose`
640640
"""
641641
from boltons.setutils import IndexedSet as iset
642-
from .op import NULL_OP, NetworkOperation
642+
from .composition import NULL_OP, NetworkOperation
643643

644644
def proc_op(op, parent=None):
645645
"""clone FuncOperation with certain props changed"""

graphtik/plot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
is_reschedule_operations,
5353
)
5454
from .modifiers import is_mapped, is_sfx, is_sfxed
55-
from .op import Operation
55+
from .composition import Operation
5656

5757
log = logging.getLogger(__name__)
5858

test/test_base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
import pytest
1010

11-
from graphtik import base, network, op, operation
11+
from graphtik import base, network, composition, operation
1212
from graphtik.execution import ExecutionPlan, Solution, _OpTask
13-
from graphtik.op import NetworkOperation
13+
from graphtik.composition import NetworkOperation, Operation
1414

1515

1616
@pytest.mark.parametrize("locs", [None, (), [], [0], "bad"])
@@ -131,7 +131,7 @@ def outer():
131131
assert excinfo.value.jetsam == {"fn": "inner", "a": 1, "b": 2}
132132

133133

134-
class _ScreamingOperation(op.Operation):
134+
class _ScreamingOperation(Operation):
135135
def __init__(self):
136136
self.name = ("",)
137137
self.needs = ()

test/test_graphtik.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
)
4040
from graphtik.execution import Solution
4141
from graphtik.modifiers import optional, sfx, sfxed, vararg
42-
from graphtik.op import NetworkOperation, Operation
42+
from graphtik.composition import NetworkOperation, Operation
4343

4444
log = logging.getLogger(__name__)
4545

0 commit comments

Comments
 (0)