Implements Better Tests and Logging

This commit is contained in:
2023-03-01 02:49:28 -03:00
parent 32ca95086a
commit aea34bf214
17 changed files with 1147 additions and 72 deletions

View File

@@ -1,9 +1,8 @@
from dataclasses import dataclass, field, fields
from dataclasses import dataclass, field, fields, asdict
@dataclass
class Config:
mem: int
level: str
n_atoms: int
@@ -31,13 +30,11 @@ class Config:
f'Memory must be a integer greater than 0.'
)
if self.level is None:
raise ValueError(
f'Invalid value for level. Level must not be none.'
)
if self.n_atoms is None or self.n_atoms <= 0:
raise ValueError(
f'Invalid value for n_atoms: {self.mem},'
f'Number of Atoms must be a integer greater than 0.'
)
def to_dict(self):
return asdict(self)