Skip to content
Snippets Groups Projects
Commit 67030ad5 authored by shined day's avatar shined day
Browse files

Merge branch '36-everything-should-have-type' into 'master'

Add bunch of docstring and type

Closes #36

See merge request be-pyamak/pyamak-noyau!19
parents e5cc5e02 8b0fcc57
No related branches found
No related tags found
No related merge requests found
......@@ -9,7 +9,7 @@ sys.path.insert(0, str(pathlib.Path(__file__).parent))
from pyAmakCore.exception.override import ToOverrideWarning
class Schedulable():
class Schedulable:
"""
Class Schedulable
"""
......
......@@ -11,7 +11,7 @@ sys.path.insert(0, str(pathlib.Path(__file__).parent))
from pyAmakCore.classes.schedulable import Schedulable
class Scheduler():
class Scheduler:
"""
Scheduler class, to make sure that environment and amas are always sync together
"""
......
......@@ -2,6 +2,7 @@
class allowing to save the state of the system at a given moment
"""
from os import path
from typing import List
from pandas import DataFrame
......@@ -14,7 +15,7 @@ class Loggable:
self.__do_log = False
self.__file_path = None
def to_csv(self, cycle, var_list):
def to_csv(self, cycle: int, var_list: List['Agent']) -> None:
"""
get cycle and agent list and print them
"""
......@@ -34,8 +35,14 @@ class Loggable:
else:
dataframe.to_csv(path_or_buf=self.__file_path, index=False)
def set_do_log(self, boolean):
def set_do_log(self, boolean: bool) -> None:
"""
tell the amas if it should log or not
"""
self.__do_log = boolean
def set_file_path(self, path_to_file):
def set_file_path(self, path_to_file: str) -> None:
"""
specify path to csv
"""
self.__file_path = path_to_file
"""
Agent phases
"""
from enum import Enum, auto
......
"""
Agent execution policy
"""
from enum import Enum, auto
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment