typing and comment changes
This commit is contained in:
parent
e5934d9948
commit
2885ab76c6
@ -24,8 +24,6 @@ def count_bit_errors(d: np.array, d_hat: np.array) -> int:
|
||||
|
||||
|
||||
# TODO: Write unit tests
|
||||
# TODO: Create generic Simulator Interface which should be implemented for
|
||||
# specific applications
|
||||
class Simulator:
|
||||
"""Class allowing for saving of simulations state.
|
||||
|
||||
@ -243,7 +241,6 @@ class Simulator:
|
||||
return pd.DataFrame(data)
|
||||
|
||||
|
||||
# TODO: Fix typing.Any or Simulator
|
||||
class SimulationDeSerializer:
|
||||
"""Class responsible for file management, de- and serialization of
|
||||
Simulator objects."""
|
||||
@ -300,7 +297,7 @@ class SimulationDeSerializer:
|
||||
|
||||
return sim_names
|
||||
|
||||
def remove_unfinished_sim(self, sim_name):
|
||||
def remove_unfinished_sim(self, sim_name: str):
|
||||
"""Remove the savefile of a previously paused simulation.
|
||||
|
||||
:param sim_name: Name of the simulation
|
||||
@ -376,8 +373,8 @@ class SimulationDeSerializer:
|
||||
return results, metadata
|
||||
|
||||
|
||||
# TODO: Fix typing.Any or Simulator
|
||||
# TODO: Autosave simulation every so often
|
||||
# TODO: Comment explaining what a Simulator class is
|
||||
class SimulationManager:
|
||||
"""This class only contains functions relating to stopping and
|
||||
restarting of simulations (and storing of the simulation state in a
|
||||
@ -423,7 +420,7 @@ class SimulationManager:
|
||||
return self._de_serializer.get_unfinished_sims()
|
||||
|
||||
def load_unfinished(self, sim_name: str) -> None:
|
||||
"""Load the state of an unfinished simulation its savefile.
|
||||
"""Load the state of an unfinished simulation form its savefile.
|
||||
|
||||
Warning: This function deletes the savefile after loading.
|
||||
"""
|
||||
|
||||
Loading…
Reference in New Issue
Block a user