Mmodel

Latest version: v0.6.2

Safety actively analyzes 714815 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 3

0.4.0

------------------------

Handler API is rewritten.

Fixed
^^^^^
- Fix object str label alignment, to the left for the graph and model.
- Fix an H5Handler issue that prevents it from writing objects.
- Fix a bug that intermediate nodes output is not included in the final output.

Changed
^^^^^^^
- The ``set_node_object()`` allows for "inputs" parameters for adjusting node
function input parameters.
- Modifier functions from decorator to closure (both works).
- Modifier list contains the arguments when supplied.
- Handler arguments are supplied with the handler class.
- The draw graph method no longer has a default value.
- Model docstring is tied to the model instead of the graph, use "description"
for long docstring.
- The 'name' attribute is required for Model instances.
- Include note information in node execute exception.


Added
^^^^^

- Add custom dictionary `MemData`` as MemHandler's data instance.
- Add custom class `H5Data` as H5Handler's data instance.
- Add "returns" parameter to Model.

Removed
^^^^^^^

- The 'info' attribute is no longer used in modifiers and handlers.
- the "model" and "node" are no longer appended to the model and node string output.

0.3.1

--------------------
Fixed
^^^^^
- Fix duplicated test name.

Added
^^^^^
- Add Github action as the CI tool.

Changed
^^^^^^^
- Node and model string output.
- Change Python minimum requirement to 3.8

0.3.0

---------------------
Added
^^^^^
- Add ``subgraph_by_returns`` filters graph by node returns.
- Add ``_is_valid_model`` method graph for Model class to validate graph for
building model executable.
- Add ``draw`` method to ``ModelGraph`` and ``Model`` classes.
- Add ``get_node`` and ``get_node_object`` methods to ``Model`` class.
- Add ``view_node``to ``ModelGraph`` and ``Model`` classes.
- Add ``deepcopy`` method to ``ModelGraph`` because ``graph.copy`` method
is a shallow copy.

Changed
^^^^^^^
- Move ``subgraph_by_nodes`` and ``subgraph_by_parameters`` to ``filter``
module
- Change ``Model`` and handlers parameter "model_graph" to "graph".
- Change ``Model`` no longer accept handler arguments (unify behavior of modifiers
and handlers).
- Change ``Model`` instance str now shows modifier information.
- Modifiers with parameters required to have the "info" attribute set to the
wrapper (the closure that takes the function as the first parameter).
The "info" is used to show the modifier information in the model instance.
- The ``modify_subgraph`` no longer store the subgraph information as a node
attribute.
- The ``Model._graph`` is a copy of the original graph and is frozen. The same graph
is used to create the handler object.
- Change graph ``add_node_object`` and ``add_node_objects_from`` to ``set_node_object``
and ``set_node_object_from``.

Fixed
^^^^^
- Fix ``modify_subgraph`` changes original graph attributes.
- Fix ``ModelGraph`` shares the same class attribute across instances.

0.2.2

--------------------------
Added
^^^^^
- Add ``modifiers`` input argument to ``ModelGraph.set_node_object``, allowing
modifiers to be applied to nodes.
- Add ``signature_modifier`` that changes the function signature.
- Add ``signature_binding_modifier`` that adds binding and checking to the wrapped
function.

0.2.1

---------------------
Added
^^^^^
- Add ``add_grouped_edges_from`` that adds edges in groups.
- Add ``add_returns`` as additional input to the model. The parameter is used to
output intermediate values in the returns.
- Add ``tox`` command for different python version test environments: py38,
py39, coverage, and docs. The latter two check test coverage and build
sphinx docs.

Changed
^^^^^^^
- Change node attribute ``rts`` to ``returns``.
- Change ``add_linked_edge`` to ``add_grouped_edge``.
- Change ``add_edge`` and ``add_edges_from`` updates graph edge attributes.
- Move ``mmodel`` build method from ``setuptools`` to ``poetry``.

0.2.0

--------------------

Version 0.2.0 changed the model building from inheritance to composition.
``Model`` class is used to create an executable.

Added
^^^^^
- Add ``zip_loop_modifier`` modifier that zips multiple arguments for loop.

Changed
^^^^^^^

- Change loop construction to a modifier.
- Change ``MGraph`` to ``ModelGraph``.
- Model graph allows node definition without node object.
- Model graph allows linked edges to simplify graph definition
with ``add_linked_edges_from``.
- Model graph node attributes do not need to provide.
key with ``update_node_object`` and ``update_node_objects_from``.

Page 2 of 3

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.