diff --git a/howso/direct/client.py b/howso/direct/client.py index 0b4a9ce5..3fe91693 100644 --- a/howso/direct/client.py +++ b/howso/direct/client.py @@ -412,7 +412,7 @@ def _auto_persist_trainee(self, trainee_id: str): if trainee.persistence == 'always': self.amlg.store_entity( handle=trainee_id, - amlg_path=self.resolve_trainee_filepath(trainee_id) + file_path=self.resolve_trainee_filepath(trainee_id) ) except KeyError: # Trainee not cached, ignore @@ -429,11 +429,7 @@ def _initialize_trainee(self, trainee_id: str): """Create a new Amalgam entity.""" status = self.amlg.load_entity( handle=trainee_id, - amlg_path=str(self._howso_absolute_path), - persist=False, - load_contained=True, - escape_filename=False, - escape_contained_filenames=False + file_path=str(self._howso_absolute_path) ) if not status.loaded: raise HowsoError( @@ -1281,11 +1277,7 @@ def acquire_trainee_resources( f'Trainee not found. No Trainee file exists at: "{filepath}"', code="not_found") status = self.amlg.load_entity( handle=trainee_id, - amlg_path=filepath, - persist=False, - load_contained=True, - escape_filename=False, - escape_contained_filenames=False, + file_path=filepath ) if not status.loaded: raise HowsoError( @@ -1320,7 +1312,7 @@ def release_trainee_resources(self, trainee_id: str): # Persist on unload self.amlg.store_entity( handle=trainee_id, - amlg_path=self.resolve_trainee_filepath(trainee_id) + file_path=self.resolve_trainee_filepath(trainee_id) ) elif trainee.persistence == "never": raise HowsoError( @@ -1363,7 +1355,7 @@ def persist_trainee(self, trainee_id: str): self.amlg.store_entity( handle=trainee_id, - amlg_path=self.resolve_trainee_filepath(trainee_id) + file_path=self.resolve_trainee_filepath(trainee_id) ) def begin_session(self, name: str | None = "default", metadata: t.Optional[Mapping] = None) -> Session: diff --git a/howso/engine/trainee.py b/howso/engine/trainee.py index cc2c19ec..d902a81a 100644 --- a/howso/engine/trainee.py +++ b/howso/engine/trainee.py @@ -374,7 +374,7 @@ def save(self, file_path: t.Optional[PathLike] = None): if self.id: self.client.amlg.store_entity( handle=self.id, - amlg_path=self.client.resolve_trainee_filepath(file_name, filepath=file_path) + file_path=self.client.resolve_trainee_filepath(file_name, filepath=file_path) ) else: raise ValueError("Trainee ID is needed for saving.") @@ -3939,11 +3939,7 @@ def load_trainee( status = client.amlg.load_entity( handle=trainee_id, - amlg_path=str(file_path), - persist=False, - load_contained=True, - escape_filename=False, - escape_contained_filenames=False, + file_path=str(file_path) ) if not status.loaded: raise HowsoError(f"Trainee from file '{file_path}' not found.")