Older modelx releases#
v0.0.25 (19 October 2019)#
This release introduces a feature to trace the call stack of formula calculations in response to user’s feature request. The tracing is useful when the user wants to get the information on the execution of cells formulas, such as how much time each formula takes from start to finish, or what formulas are called in what order to identify performance bottlenecks.
Enhancements#
The API functions blow are introduce for the stack tracing feature (GH13).
Bug Fixes#
Error when writing models containing non-ascii strings as refs.
v0.0.24 (4 October 2019)#
Code around implementing inheritance is extensively refactored in this release, and a couple of small enhancements are incorporated in response to user’s feature requests.
Enhancements#
Models with modules included in them as references can now be saved with
save()method (GH8 Comment).
nameparameter is added toread_model()to overwrite the opened model name (GH8).
Bug Fixes#
Getting cells values from the shell iteratively was too slow (GH12)
v0.0.23 (9 August 2019)#
New Features#
This release introduces methods to create Space and Cells from Pandas objects or CSV files.
When the model is written out, the data source Pandas objects are saved as files in the folder of the parent space. The CSV files are copied in the parent space folder.
Methods to Create Cells
The first method above creates one or more cells in the parent space from a Pandas DataFrame or Series object passed as an argument. If a DataFrame is passed, created cells correspond to the DataFrame’s columns. The second method creates cells from a CSV file. In either case, the created cells are populated with values read from the date source.
Methods to Create a Space and Cells
Those methods above create a UserSpace in the parent object (Model or UserSpace) from the data source (DataFrame/Series or CSV file) and then creates one or more Cells in the created space. The created UserSpace can have parameters by specifying which parameters should be interpreted as Space parameters in stead of Cells parameters. When the UserSpace has parameters, DynamicSpaces are also created in the UserSpace, and Cells in the DynamicSpaces are also populated with values from the data source.
Other Enhancements#
write_model()andread_model()now supports writing/reading models with multiple cells created together by the same execution ofnew_cells_from_excel()method.Added
modelx.modelsattribute, an alias forget_models()
Backward Incompatible Changes#
StaticSpaceis now renamed toUserSpace.
Bug Fixes#
Fix the default values of
names_rowandparam_colsparameters ofnew_cells_from_excel()Fix an error when passing a lambda function whose definition spans across multiple lines in a function call.
v0.0.22 (4 June 2019)#
Overview#
The most notable improvement among others in this release is the introduction of a new feature to write/read models to/from text files for better version control experience.
Prior to this release, models could only be saved(“pickled”) into a binary file. Maintaining models as binary files is not ideal for version control, as it disables the use of rich features offered by modern version control systems such as git. When you wanted to save a model as text, you needed to write the entire python script to build the model from the source files. Changes made to the models interactively through IPython console could not be saved as human-readable text.
This release introduces write_model() function
(or equivalent write() method) and
read_model() function,
to write/read a model to/from a tree of folders containing text files.
The text files created by write_model() function are written
as syntactically correct Python scripts with some literals expressed
in JSON.
However, in most cases they are not semantically correct. These
files can only be interpreted through read_model() function.
Another notable improvement is the extended depth of formula recursion. Previously the maximum depth of formula recursion was set to 1000 by default. With this release the maximum depth is extended to 65000.
Enhancements#
Add
write_model()function,write()method andread_model()function.The maximum depth of formula recursion is extended from 1000 to 65000 by default.
new_space_from_excel()can now create a static space whenspace_param_orderis not given.
Backward Incompatible Changes#
Remove
_self_cellsand_derived_cellsfromUserSpace
Bug Fixes#
Fix
add_bases()andset_formula().
v0.0.21 (23 March 2019)#
Updates include refactoring to separate static and dynamic space classes, use tuple for CellNode implementation, gaining approximately 20% performance improvement.
Backwards Incompatible Changes#
Space class is now split into two separate concrete classes,
UserSpace,DynamicSpaceand one base classBaseSpace.module_parameter of the methods below are renamed tomodule.Methods and properties below on Space classes are renamed to be private, as these are expected not to be used directly by users for normal usage.
_is_base()_is_sub()_is_static()_is_derived()_is_defined()_is_root()_is_dynamic()_self_cells_derived_cells_self_spaces_derived_spaces
Enhancements#
IPython error traceback message is not suppressed by default.
setup_ipython()is added to suppress the default message.set_recursion()is added to change the maximum depth of formula recursion.
Bug Fixes#
Fix
formulaas setter by assignment expression i.e. alias toset_formula().Fix
refs.
v0.0.20 (2 February 2019)#
Enhancements#
CellNoderepr to show “parameter=arguments”.Add
formulaproperty.
Bug Fixes#
Fix duplicate multiple bases of a dynamic space.
v0.0.19 (13 January 2019)#
Enhancements / bug fixes for defining and using dynamics spaces whose base includes dynamics spaces.
Enhancements#
Add
nameparameter toopen_model().Pass dynamic arguments down to its children.
Iterating over cells with single parameter returns values instead of tuples of single elements.
View’s _baseattrs to not include items with _ prefixed names.
Bug Fixes#
Fix bases of derived dynamic spaces. If dynamic spaces are to be the base spaces of a dynamic sub space, then the static base spaces of the dynamic spaces become the base spaces in replacement for the dynamic spaces.
Fix AttributeError: ‘BoundFunction’ object has no attribute ‘altfunc’ on unpickled models.
Dedent function definitions for those defined inside blocks of other function definition.
Fix error in conversion to DataFrame when merging indexes with different types.
v0.0.18 (31 December 2018)#
This release is mainly for adding interface functions/methods to spyder-modelx spyder-modelx v0.0.7 (31 December 2018)
Enhancements#
Bug Fixes#
Raise not KeyError but AttributeError upon hasattr/getattr on Space.
v0.0.17 (2 December 2018)#
This release is mainly for adding interface to functions to spyder-modelx spyder-modelx v0.0.6 (2 December 2018)
Enhancements#
get_object()to get a modelx object from its full name.
Bug Fixes#
Error when modelx tries to get IPython shell before it becomes available.
v0.0.16 (21 October 2018)#
spyder-modelx plugin introduces a new widget to view cells values in a table. This release reflects some updates in modelx to make the new widget work.
Enhancements#
cur_model()andcur_space()now accept model and space objects as their arguments respectively, in addition to the names of model or space objects.Add
modelproperty to all Interface subclasses.Traceback messages upon erroneous formula calls are now limited to 6 trace stack entries.
Error messages upon erroneous formula calls are now simplified not to show file traceback.
Backwards Incompatible Changes#
The parameters to
cur_model()andcur_space()are renamed fromnametomodelandspacerespectively, due to the enhancement for these functions to accept objects, in addition to the names of the objects.
v0.0.15 (20 September 2018)#
Enhancements#
Importing a module overrides formulas if their cells already exist.
v0.0.14 (3 September 2018)#
This version is mainly for updating modelx Qt widgets, in order for the widgets to work with the initial version of spyder-modelx, Spyder plugin for modelx.
Enhancements#
Add property
_baseattrsandBaseView._baseattrs. This property is used by spyder-modelx.
Bug Fixes#
Fix crashes when
cur_model()is called withnameargument to change the current model.
v0.0.13 (5 August 2018)#
Space implementation has been largely rewritten in this release to make the inheritance logic more robust.
Warning
Support for Python 3.4, 3.5 is dropped in this release.
Now only Python 3.6 and newer are supported.
This is mainly due to the fact that modelx utilizes
the order preservation nature of dict introduced in Python 3.6.
dict performance improvement in Python 3.6 is also the reason
to drop support for older versions.
Support for NetworkX ver 1.x is also dropped in this release. NetworkX version 2.x is now required.
Enhancements#
add_bases()andremove_bases()are added.basesis added.
Backwards Incompatible Changes#
Support for Python older than 3.6 is dropped. Now Python 3.6 or above is required.
Support for NetworkX version 1 is dropped. Now NetworkX version 2 is required.
Dynamic spaces now inherit their parent spaces by default.
new_cells()raises an error when the cells already exists.formulanow returns Formula object instead of string.
Bug Fixes#
repr()on SpaceView and CellsView now list only selected items.
v0.0.12 (16 June 2018)#
Enhancements#
cellsreturns an immutable mapping of cells namedCellsViewsupportingto_frame()method, which returns a DataFrame object containing cells values. If an iterator of arguments are given asarg, values of the cells for the arguments are calculated and only the given arguments are included in the DataFrame index(es). For more, seethe reference pageCells are now of a Mapping type, which implements
keys(),values(),items()methods to get their arguments and values.Subscription(
[]) operator oncellsnow accepts multiple args of cell names and a sequence of cell names, such as['foo', 'bar']and[['foo', 'bar']], which returns an immutable mapping (view) that includes only specified cells.
Backwards Incompatible Changes#
framereturns does not include empty or all-None cells.
Bug Fixes#
Fix issues specific to networkx v1.x.
Fix
import_module()to handle bases properly.
v0.0.11 (27 May 2018)#
Bug Fixes#
Fix Space.refs
Fix conversion of scalar cells to Pandas objects
v0.0.10 (6 May 2018)#
Enhancements#
Add
is_*methods to Space.Rename a model by adding
_BAKnto its original name when another model with the same name is created.Add
rename().name in spaceexpression is allowed wherenameis a string._spacelocal reference is available to refer to the parent space from its child cells.
Backwards Incompatible Changes#
get_selffunction is removed.
Bug Fixes#
Call stack max depth is set to 1000 to run all lifelib samples successfully.
Fix an error around graph unpickling.
Keep the same derived objects after they are updated.
v0.0.9 (1 April 2018)#
Enhancements#
Add
show_treeto show model tree in inline mode.Add
get_treeto get model tree in automatic mode.
Bug Fixes#
Make
get_modeltreeavailable directly undermodelx.
v0.0.8 (25 March 2018)#
Enhancements#
Make
get_modeltreeavailable directly undermodelx.Add
import_module()andimport_funcs()properties.Add
all_spacesto contain all child spaces, including dynamic spaces.Add
self_spacesandderived_spacesproperties.Add
configure_python()andrestore_python().Add
reload()to reload the source module.Raise an error upon zero division in formulas.
Add
parentproperty.
Backwards Incompatible Changes#
Base spaces are now indelible.
spacesnow contains only statics spaces. Nowstatic_spacesis an alias tospaces.
Bug Fixes#
Remove overridden cells from
derived_cellsUpdate
self_cellswhen new cells are added.Fix stack overflow with Anaconda 64-bit Python on Windows.
Thanks#
Stanley Ng
v0.0.7 (27 February 2018)#
Backwards Incompatible Changes#
Renamed
UserSpaceconstructor parameterparamfunctoformula.Renamed
new_cells()parameterfunctoformula.Renamed
Interfacecan_have_nonetoallow_none.
Bug Fixes#
Fix
open_model()to makecur_model()properly return unpickled model.