Skip to content

Instantly share code, notes, and snippets.

@cbpygit
Created March 22, 2018 07:27
Show Gist options
  • Save cbpygit/e7f2fbabb5be32dfd5adb010a169f5d7 to your computer and use it in GitHub Desktop.
Save cbpygit/e7f2fbabb5be32dfd5adb010a169f5d7 to your computer and use it in GitHub Desktop.
Implementation of a `SimulationSet` that uses a yet undocumented feature that causes the H5-store to be deleted on each initialization. Usually this does not make much sense, but it can be useful in a workflow where the project (or processing function) is still revised regarding the keys.
import pypmj as jpy
class SimulationSetClean(jpy.SimulationSet):
""" Extends `SimulationSet` and simply forces to start with an empty
H5-store each time it is initialized.
"""
def __init__(self, *args, **kwargs):
self._start_withclean_H5_store = True
SimulationSet.__init__(self, *args, **kwargs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment