diff --git a/src/expfig/namespacify.py b/src/expfig/namespacify.py index eb3227c..27857e4 100644 --- a/src/expfig/namespacify.py +++ b/src/expfig/namespacify.py @@ -172,6 +172,11 @@ def serialize_to_dir(self, log_dir, fname='namespacify.yaml', use_existing_dir=F def deserialize(cls, stream): return cls(yaml.safe_load(stream)) + @classmethod + def from_yaml(cls, filepath): + with open(filepath, 'r') as stream: + return cls.deserialize(stream) + def __dir__(self): rv = set(super().__dir__())