Skip to content

Commit c23cd0e

Browse files
committed
CHORE(VER): bump v2.3.0-->3.0.0; CHANGES
1 parent 903f08b commit c23cd0e

File tree

3 files changed

+63
-2
lines changed

3 files changed

+63
-2
lines changed

CHANGES.rst

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,66 @@ TODO
77
See :gg:`1`.
88

99

10+
v3.0.0 (27 Nov 2019, @ankostis): UNVARYING NetOperations, narrowed, API refact
11+
===============================================================================
12+
+ NetworkOperations:
13+
14+
+ BREAK(NET): RAISE if the graph is UNSOLVABLE for the given `needs` & `provides`!
15+
(see "raises" list of :meth:`~.NetworkOperation.compute()`).
16+
17+
+ BREAK: :meth:`.NetworkOperation.__call__()` accepts solution as keyword-args,
18+
to mimic API of :meth:`Operation.__call__()`. ``outputs`` keyword has been dropped.
19+
20+
.. Tip::
21+
Use :meth:`.NetworkOperation.compute()` when you ask different `outputs`,
22+
or set the ``recompile`` flag if just different `inputs` are given.
23+
24+
Read the next change-items for the new behavior of the ``compute()`` method.
25+
26+
+ UNVARYING NetOperations:
27+
28+
+ BREAK: calling method :meth:`.NetworkOperation.compute()` with a single argument
29+
is now *UNVARYING*, meaning that all `needs` are demaned, and hence,
30+
all `provides` are produced, unless the ``recompile`` flag is true or ``outputs`` asked.
31+
32+
+ BREAK: net-operations behave like regular operations when nested inside another netop,
33+
and always produce all their `provides`, or scream if less `inputs` than `needs`
34+
are given.
35+
36+
+ ENH: a newly created or cloned netop can be :meth:`~.NetworkOperation.narrow()`\ed
37+
to specific `needs` & `provides`, so as not needing to pass `outputs` on every call
38+
to :meth:`~.NetworkOperation.compute()`.
39+
40+
+ feat: implemented based on the new "narrowed" :attr:`.NetworkOperation.plan` attribute.
41+
42+
+ FIX: netop `needs` are not all *optional* by default; optionality applied
43+
only if all underlying operations have a certain need as optional.
44+
45+
+ FEAT: support function ``**args`` with 2 new modifiers :class:`.vararg` & :class:`.varargs`,
46+
acting like :class:`.optional` (but without feeding into underlying functions
47+
like keywords).
48+
49+
+ BREAK(:gh:`12`): simplify ``compose`` API by turning it from class --> function;
50+
all args and operations are now given in a single ``compose()`` call.
51+
52+
+ REFACT(net, netop): make Network IMMUTABLE by appending all operations together,
53+
in :class:`NetworkOperation` constructor.
54+
55+
+ ENH(net): public-size ``_prune_graph()`` --> :meth:`.Network.prune()``
56+
which can be used to interogate `needs` & `provides` for a given graph.
57+
It accepts `None` `inputs` & `outputs` to auto-derrive them.
58+
59+
+ FIX(SITE): autodocs `API` chapter were not generated in at all,
60+
due to import errors, fixed by using `autodoc_mock_imports
61+
<http://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#confval-autodoc_mock_imports>`_
62+
on `networkx`, `pydot` & `boltons` libs.
63+
64+
+ enh(op): polite error-,msg when calling an operation with missing needs
65+
(instead of an abrupt ``KeyError``).
66+
67+
+ FEAT(CI): test also on Python-3.8
68+
69+
1070
v2.3.0 (24 Nov 2019, @ankostis): Zoomable SVGs & more op jobs
1171
=============================================================
1272
+ FEAT(plot): render Zoomable SVGs in jupyter(lab) notebooks.

graphtik/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"""Lightweight computation graphs for Python."""
44

55
__author__ = "hnguyen"
6-
__version__ = "2.3.0"
7-
__release_date__ = "24 Nov 2019, 14:48"
6+
__version__ = "3.0.0"
7+
__release_date__ = "2 Dec 2019, 17:25"
88
__license__ = "Apache-2.0"
99
__title__ = "graphtik"
1010
__summary__ = __doc__.splitlines()[0]

graphtik/op.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ def reparse_operation_data(name, needs, provides):
3939
return name, needs, provides
4040

4141

42+
# TODO: immutable `Operation` by inheriting from `namedtuple`.
4243
class Operation(abc.ABC):
4344
"""An abstract class representing a data transformation by :meth:`.compute()`."""
4445

0 commit comments

Comments
 (0)