- (#241) Drop Python 3.9 support in favor of 3.12 and 3.13,
bump required networkx to 3.4, fix issue with plot_topology
on networkx 3.4+, and change default multiprocessing
start method to safer
forkserver
method on Linux
- (#240) fix Pint Quantity import error by using more recent version.
- (#237) Add tests for MongoDB emitter and fix related bugs
- (#238) apply
global_time_precision
to theemit_time
- (#236) Add data key to breakdown documents if missing
- (#234) Allow Numpy arrays to be deeply nested in Store schemas
- (#233) Fix some bugs in
emitter.py
- (#231) Update
networkx
error message for already deleted Step.
- (#230) add a test for '_move' updates. Extend '_move' updates to support targets going down a path rather than just a top-level port name
- (#227) Make
Process.default_state
parse ports schema recursively. - Add 'update' key to '_move' hierarchy update method.
- (#226) Drop Python 3.8 in favor of 3.11 and update dependencies.
- (#225) Update registry imports to
store.py
.
- (#224) Keep processes and steps in composite spec that is passed to
Engine
. Addtest_hierarchy_update
to keep this working.
- (#223) Update pint imports to support newest version
- (#222) More breakdown fixes
- (#220) Recalculate hashes for comparison of Units
- (#219) Parallel queries. Ccreates helper methods to intelligently split large queries into smaller, approximately equal chunks that can be run in parallel on separate OS processes.
- (#218) MongoClient optimizations
- (#217) Create Mongo index for simulation time.
- (#215) Serialization fixes for BSON.
- (#214) Optimize dictionary key removal.
- (#213) Clean up documentation for Serializer API.
- (#211) Fix a memory leak when removing parallel processes.
- (#204) Implement a new serialization API based on PyMongo's
TypeCodec
interface.
- (#207) Fix a bug in
Store.apply_update()
that caused failures whenself.value
was a list andself.units
was set. - (#205) Prevents formation of multi_updates when generating initial state.
- (#206) Support multiple emits for the same timestep and remove
Engine.complete()
. Instead, callers ofEngine.run_for()
must passforce_complete=True
at the end of their caller-managed simulation loops.
- (#203) Make
Store.sources
more comprehensive, in particular by including dividers and flows.
- (#202) Add the
filters
argument todata_from_database()
to allow further filtering of MongoDB query results.
- (#200) Inside Engine, store the Step execution layers as lists instead of sets to ensure deterministic execution order.
- (#201) Restore ability to pass
initial_state
keys insettings
dictionaries tocomposition.py
functions.
-
(#198) Introduce process commands to support more interactions with parallel processes. Now all
Process
methods of a parallelized process can be queried from the parent OS process. Users can also add support for custom methods of their processes.This change also simplifies the way
Engine
handles parallel processes warns users when serializers are not being found efficiently. -
(#192) Marks
composition.py
as deprecated and ensures that the rest of Vivarium Core doesn't depend on it. -
(#199) Remove some Numpy dtypes that are not available on some platforms from serialize.py.
- (#186) Apply function to data from database emitter in
get_history_data_db
.
- (#190) makes
global_time_precision
anEngine
parameter rather thanEngine.run_for()
keyword -- this changes the method introduced in 1.2.5. Technically a breaking API, but only from 2 versions ago. - (#191) don't use timestep for quiet paths. This allows Engine to skip over processes that don't meet their update condition.
- (#189) track composite updates in engine so that the composite topology can be plotted after being updated.
- (#188) RAMEmitter returns query data only if it exists.
- (#183) floating-point timestep precision.
- (#182) add pytest to setup.
- (#180) Handle nan in units serializer.
- (#179) Register the injector process.
- (#178) Remove
compose_experiment()
, which was replaced byComposite.merge()
long ago.
- (#176) Fix UnitsSerializer to correctly handle lists and tuples.
- (#175)
store_schema
arg toEngine
allows us to override schema directly.
- (#172) bug fix to keep assembly_ids when passing queries to the DB.
- (#167) Make serialization more structured and robust with serializer classes that know what kinds of data they can serialize and deserialize.
- (#169)
get_history_data_db
no longer requires a 'time' key. It asserts an 'assembly_id' key instead.
- (#164) Add a
_no_original_parameters
configuration toProcess
that, ifTrue
, disables the copying of parameters thatProcess.__init__()
does by default. Disabling this copying decreases memory usage, but it puts the user in charge of ensuring that parameters are not mutated.
-
(#163) Fix two bugs:
- In
divide_condition.py
, use a divider that sets the division variable toFalse
instead of0
. - In
engine.py
, fix the function that checks that every dependency in the flow is also in the dictionary of steps. This function did not correctly handle cases where steps were nested in sub-dictionaries.
- In
- (#151) Make
Engine._run_steps()
public. - (#155) Add error messages for flows that include steps not found in
Engine.steps
and for dividers specified as strings not found in the divider registry. - (#157) Add flows and steps to the value returned by
Composite.generate_store()
.
- (#131) Do not assume that a process's
initial_state
should be used when using the Store API. - (#132) Improve error message when no path exists between nodes in the hierarchy.
- (#133) Remove
Process.local_timestep()
, which is no longer being used. - (#134) Support using
**
in a ports schema to connect to an entire subtree of the hierarchy. - (#143) Make more methods private.
- (#147) Fix bug in process serialization to support changing the parameter argument name in the constructor.
deep_merge_combine_lists
recursive call.
- (#130) Raise an exception when a user specifies two different dividers for the same variable, and when serializing a process, use its original parameters without any changes that may have occurred since the process was initialized.
- (#127) build a
store
argument's topology views inEngine
constructor to support the store API.
- (#126) A new method,
Engine.run_for
, can be called iteratively without completing processes on the front.Engine.update
keeps the same behavior as before.Engine.complete
forces all processes to complete at the current global time.
- (#125) Use the
null
divider by default for processes so that upon division, processes are generated by the composer, not a divider.
- (#123) Extend
Composite.merge
to use steps and flows. - (#124) Use
set
divider by default.
- (#121) Fix a bug in
Store.divide()
where daughter cell states were by default the mother cell state. Instead, add support for aninitial_state
key in the_divide
dictionary. - (#122) Add an
_output
flag option toProcess.ports_schema
, which marks ports as output-only.
- Improve
topology_view
caching mechanism to speed up simulations that have a lot of division.
- Allow schema overrides to override step schemas.
- Assert that when
Engine
treats a process like a step, that process is actually a step. - Use
Process.is_step()
to check whether a process is a step instead of usingisinstance
.
- Fix
Engine
to support flows that are nested dictionaries.
- Add
profile
argument to theEngine
constructor. When this argument is set toTrue
, the simulation, including any parallel processes, will be profiled bycProfile
. OnceEngine.end()
is called, the profile stats will be saved toEngine.stats
for analysis.
- Remove
self._run_steps()
fromEngine.apply_update
ifview_expire
.
view_expire
flag for_add
and_delete
updates as well.
- deepcopy mother state upon division so daughter states are ensured to not reference the same objects.
- improve
_get_composite_state
to avoid recursive deepcopy. - add
view_expire
flag inStore.apply_update
, and haveEngine
use this to triggerself.state.build_topology_views
.
- Fixed a major bug introduced by
topology_view
in v0.4.3, which had glob (*) schema unable to view sub-stores. dict_value
updater added toupdater_registry
.
- Add queries to
Emitter
, and toget_history_data_db
. This allows you to selectively retrieve from paths in the data, and can save a lot of time when retrieving data from large experiments.
- Bug fix in the new
topology_view
, returnStore
for'*'
schema.
- Add
topology_view
caching inStore
to improve performance.
- Fix a bug in
Store.generate()
that caused conflicts between a user-provided initial state and a schema to raise an error instead of the initial state taking priority.
-
Replaces
Deriver
s withStep
s. While derivers were executed sequentially, steps are executed in topological generations according to a dependency graph. This lets some derivers run in parallel. This change mostly preserves backwards-compatibility sinceDeriver
is now an alias forStep
, and we still support legacy derivers that are specified without dependencies. These legacy derivers are executed sequentially before any steps. However, the minor version is incremented because the following public interfaces have changed (though we don't expect this to break dependent code):Composite
s now have 2 more keys:steps
andflow
.Engine.run_derivers()
has been replaced byEngine._run_steps()
.Engine.deriver_paths
has been replaced byEngine._step_paths
.- New lists of step and flow updates have been added to the tuple returned by
Store.apply_update()
. Store.EMPTY_UPDATES
has two moreNone
values and is now private (Store._EMPTY_UPDATES
).Store.get_processes()
no longer returns steps (formerly "derivers"). Instead, these are returned byget_steps()
.- Makes
Store.generate_paths()
private (nowStore._generate_paths()
). - Adds required
step
andflow
arguments toStore.generate()
. - Adds
metadata
argument toEngine
.
-
Fixes a bug where parallel derivers were re-instantiated every timestep.
-
Marks the Store API as experimental, including the public use of
Store.move()
,Store.insert()
,Store.divide()
, andStore.delete()
.
- De/serializer for np.bool_
- Fix topology plot to avoid using
plt.figure
so that plots work correctly when other plotting functions are used in the same Python session (e.g. Jupyter notebooks).
- add composite specification
- fix bug in serializing list
- add
emitter_registry
, so that emitters can be added from different repositories by importing the registry and registering their emitter. - add
_condition
key to process parameters, that lets them by conditionally triggered by connecting to a boolean states in the hierarchy.
- reduce mongo document limit for the DatabaseEmitter
- revert rename of divider argument to "state"
- do not allow _add updates with repeat keys
- fix custom dividers to use topology argument
- remove unneeded deepcopy from update step, leading to runtime boost.
- runtime_profile experiment added.
- Engine uses keyword arguments rather than a config dict. To fix this do
Engine(**config_dict)
instead ofEngine(config_dict)
. Additional emit_config options are added to selectively emit metadata.
- Engine has emit_config option. Is set to False, this keeps the serialized processes from being emitted and can save a lot of compute time.
- DatabaseEmitter supports arbitrary emit sizes by breaking up large emits into chunks, and reassembles them seamlessly upon retrieval.
- libary.wrappers make_logging_process adds a logging port to any process
- Improve the Store API by adding methods for creating new stores and connecting processes through their ports.
- Fix
plot_topology
to useProcess.generate()
now thatProcess
no longer inherits fromComposer
- Store API supports simplified scripting of a bigraph
- Breaking import changes:
Composite
andComposer
are now undervivarium.core.composer
, andExperiment
has been renamedEngine
undervivarium.core.engine
.
- add more flexible kwarg passing in
Control
- make
Experiment
'sinvoke_process
method public again
- fix bug to clear Composite of processes and topology instance variables
- more general divider declaration
- add time_display arg to agents_multigen
- update docs
- handle large emit_configuration to database emitter by checking the size of the packet, and removing process parameters if necessary.
- plotting tweaks.
- provide information about update failure.
- improve data_from_database to return experiment config.
- process.schema = None in base class constructor
- string-based path declaration for topologies.
- custom node border widths in plot_topology.
- composite.merge() uses the provided topology to override merged composite topology
- improved plot_topology
- plot_topology includes new the
graph_options
:horizontal
andhierarchy
, and newprocess_colors
andstore_colors
for coloring individual nodes.
- new Composite and AggregateComposer classes in core/process.py
- remove future annotations to continue support of python 3.6
- bring back compatibility for python 3.6
- generalize mass_adaptors and molarity_derivers
- add mass_adaptor
- breaking API changes:
- Composer class instead of Composite.
- several composition.py functions have been renamed to improve self-description.
- bug fix when handling complex_topology. store.apply_update() can now go up paths with '..'.
- calculate_timestep() for Process supports adaptive timesteps.
- clock process initial state
- add plot_variables plotting function to simulation_output
- clock process for keeping track of global time
- growth_rate process for generic exponential growth of variables
- topology grapher option to leave edge colors black
- topology grapher uses flowchart symbols
- add options to agents_multigen plot, for improved look on Jupyter notebooks
- fix Composite generate() to get correct path
- rework the class structure of Processes and Composites. Replace Generator with Factory.
- get_networkx_graph() and graph_figure() in vivarium/plot/topology.py
- improved units handling, with a units serializer for emit_data, and convert data to timeseries stripping the units.
- multi_update for experiment allos multiple updates to a variable from the same process
- fix some inspection errors & warnings
- merge for generator class
- Control object in vivarium/cor/control for streamlining experiments
- progress bar and display in experiment
- disintegrate process
- divide_condition process
- swap_compartment process
- timeline process configured with paths for ports
- vivarium/plots directory
- register in module init
- get_initialize_state for Generator
- generalize timeline process
- Update documentation with:
- A template repository for getting started.
- Changes to reflect recent updates to the project.
- Tests for the documentation.
- Add injector process.
- Add demo process, compartment, and experiment modeling glucose phosphorylation.