Add docstrings and update typos
This commit is contained in:
@@ -33,7 +33,7 @@ Currently, the PrimAITE wheel can only be installed from GitHub. This may change
|
|||||||
#### Windows (PowerShell)
|
#### Windows (PowerShell)
|
||||||
|
|
||||||
**Prerequisites:**
|
**Prerequisites:**
|
||||||
* Manual install of Python >= 3.9 < 3.12
|
* Manual install of Python >= 3.8 < 3.12
|
||||||
|
|
||||||
**Install:**
|
**Install:**
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ primaite session
|
|||||||
#### Unix
|
#### Unix
|
||||||
|
|
||||||
**Prerequisites:**
|
**Prerequisites:**
|
||||||
* Manual install of Python >= 3.9 < 3.12
|
* Manual install of Python >= 3.8 < 3.12
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
sudo add-apt-repository ppa:deadsnakes/ppa
|
sudo add-apt-repository ppa:deadsnakes/ppa
|
||||||
|
|||||||
@@ -276,7 +276,6 @@ class Folder(FileSystemItemABC):
|
|||||||
self.deleted_files[file.uuid] = file
|
self.deleted_files[file.uuid] = file
|
||||||
file.delete()
|
file.delete()
|
||||||
self.sys_log.info(f"Removed file {file.name} (id: {file.uuid})")
|
self.sys_log.info(f"Removed file {file.name} (id: {file.uuid})")
|
||||||
# self._file_request_manager.remove_request(file.uuid)
|
|
||||||
else:
|
else:
|
||||||
_LOGGER.debug(f"File with UUID {file.uuid} was not found.")
|
_LOGGER.debug(f"File with UUID {file.uuid} was not found.")
|
||||||
|
|
||||||
|
|||||||
@@ -151,6 +151,15 @@ class DatabaseService(Service):
|
|||||||
def _process_connect(
|
def _process_connect(
|
||||||
self, connection_id: str, password: Optional[str] = None
|
self, connection_id: str, password: Optional[str] = None
|
||||||
) -> Dict[str, Union[int, Dict[str, bool]]]:
|
) -> Dict[str, Union[int, Dict[str, bool]]]:
|
||||||
|
"""Process an incoming connection request.
|
||||||
|
|
||||||
|
:param connection_id: A unique identifier for the connection
|
||||||
|
:type connection_id: str
|
||||||
|
:param password: Supplied password. It must match self.password for connection success, defaults to None
|
||||||
|
:type password: Optional[str], optional
|
||||||
|
:return: Response to connection request containing success info.
|
||||||
|
:rtype: Dict[str, Union[int, Dict[str, bool]]]
|
||||||
|
"""
|
||||||
status_code = 500 # Default internal server error
|
status_code = 500 # Default internal server error
|
||||||
if self.operating_state == ServiceOperatingState.RUNNING:
|
if self.operating_state == ServiceOperatingState.RUNNING:
|
||||||
status_code = 503 # service unavailable
|
status_code = 503 # service unavailable
|
||||||
@@ -279,6 +288,7 @@ class DatabaseService(Service):
|
|||||||
return super().apply_timestep(timestep)
|
return super().apply_timestep(timestep)
|
||||||
|
|
||||||
def _update_patch_status(self) -> None:
|
def _update_patch_status(self) -> None:
|
||||||
|
"""Perform a database restore when the patching countdown is finished."""
|
||||||
super()._update_patch_status()
|
super()._update_patch_status()
|
||||||
if self._patching_countdown is None:
|
if self._patching_countdown is None:
|
||||||
self.restore_backup()
|
self.restore_backup()
|
||||||
|
|||||||
Reference in New Issue
Block a user