Skip to content

Draft: Add pickle support for cosapp structures

Adrien Delsalle requested to merge adriendelsalle/cosapp:pickling-support into master

Discussion

Add pickling support to CoSApp structures:

  • implement __getstate__, __setstate__ and __reduce__/__reduce_ex__ where necessary

Pickling only works using cloudpickle since built-in pickle Python module only has a very limited support of the language, such as lambdas that CoSApp extensively uses.

Before merging

Before merging, please check the following items are fullfilled:

  • All unit tests pass
  • All modified and created methods/attributes are typed using typing.
  • All methods input parameters and return parameters are described in the method docstring using numpydoc convention.
  • There are no unused variables (including inwards or outwards).
  • For each method, there is at least one unit test checking the expected default behaviour.

Closes #106

Edited by Etienne Lac

Merge request reports