diff --git a/src/dataset/replay_data/replay_parser/game_events/events/cmd.py b/src/dataset/replay_data/replay_parser/game_events/events/cmd.py index d69b8ed..dec079c 100644 --- a/src/dataset/replay_data/replay_parser/game_events/events/cmd.py +++ b/src/dataset/replay_data/replay_parser/game_events/events/cmd.py @@ -3,37 +3,37 @@ from src.dataset.replay_data.replay_parser.game_events.game_event import GameEvent - # TODO: Can the sequence be an int here? # Should this be encoded somehow if there is a NoneType detected? -# TODO: Document the docstrings - class Cmd(GameEvent): - """_summary_ + """ + Cmd is containing some "details" information about command interface events - :param id: _description_ + :param id: Specifies the ID of an event which corresponds to its name. :type id: int - :param loop: _description_ + :param loop: Specifies the game loop number (game-engine tick) when at which the event occurred :type loop: int - :param otherUnit: _description_ + :param otherUnit: There is no specific information about this parameter :type otherUnit: NoneType - :param sequence: _description_ + :param sequence: Highly likely this parameter specifies an id parameter which sequence user has typed in the console, + there is no specific information about this parameter :type sequence: int - :param unitGroup: _description_ + :param unitGroup: There is no specific information about this parameter :type unitGroup: NoneType | int - :param userid: _description_ + :param userid: Highly likely this parameter specifies a user's id who has been using interface, there is no specific information. :type userid: int """ @staticmethod def from_dict(d: Dict) -> "Cmd": - """_summary_ + """ + Static method returning initialized Cmd class from a dictionary. This helps with the original JSON parsing. - :param d: _description_ + :param d: Specifies a dictionary as available in the JSON file that is a result of pre-processing some .SC2Replay file. :type d: Dict - :return: _description_ + :return: Returns an initialized Cmd class. :rtype: Cmd """ return Cmd( diff --git a/src/dataset/replay_data/replay_parser/game_events/events/cmd_update_target_unit.py b/src/dataset/replay_data/replay_parser/game_events/events/cmd_update_target_unit.py index 4ac6f6a..b22f8f6 100644 --- a/src/dataset/replay_data/replay_parser/game_events/events/cmd_update_target_unit.py +++ b/src/dataset/replay_data/replay_parser/game_events/events/cmd_update_target_unit.py @@ -23,11 +23,11 @@ class CmdUpdateTargetUnit(GameEvent): @staticmethod def from_dict(d: Dict) -> "CmdUpdateTargetUnit": """ - Static method returning initialized CmdUpdateTargetPoint class from a dictionary. This helps with the original JSON parsing. + Static method returning initialized CmdUpdateTargetUnit class from a dictionary. This helps with the original JSON parsing. :param d: Specifies a dictionary as available in the JSON file that is a result of pre-processing some .SC2Replay file. :type d: Dict - :return: Returns an initialized CmdUpdateTargetPoint class. + :return: Returns an initialized CmdUpdateTargetUnit class. :rtype: CmdUpdateTargetUnit """ return CmdUpdateTargetUnit( diff --git a/src/dataset/replay_data/replay_parser/game_events/events/command_manager_state.py b/src/dataset/replay_data/replay_parser/game_events/events/command_manager_state.py index 6e2a8bb..7ee2f48 100644 --- a/src/dataset/replay_data/replay_parser/game_events/events/command_manager_state.py +++ b/src/dataset/replay_data/replay_parser/game_events/events/command_manager_state.py @@ -3,31 +3,32 @@ from src.dataset.replay_data.replay_parser.game_events.game_event import GameEvent -# TODO: Document the docstrings - - class CommandManagerState(GameEvent): - """_summary_ + """ + CommandManagerState type containing information about some states during the game, time, player, etc. - :param id: _description_ + :param id: Specifies the ID of an event which corresponds to its name. :type id: int - :param loop: _description_ + :param loop: Specifies the game loop number (game-engine tick) when at which the event occurred :type loop: int - :param sequence: _description_ + :param sequence: Highly likely this parameter specifies an id parameter which sequence the player has made, + there is no specific information about this parameter :type sequence: int - :param state: _description_ + :param state: Highly likely this parameter specifies an id parameter which state the player has made, + there is no specific information about this parameter :type state: int - :param userid: _description_ + :param userid: Specifies id number of player who has managed the state, example: in 1v1 game: [0,1] :type userid: int """ @staticmethod def from_dict(d: Dict) -> "CommandManagerState": - """_summary_ + """ + Static method returning initialized CommandManagerState class from a dictionary. This helps with the original JSON parsing. - :param d: _description_ + :param d: Specifies a dictionary as available in the JSON file that is a result of pre-processing some .SC2Replay file. :type d: Dict - :return: _description_ + :return: Returns an initialized CommandManagerState class. :rtype: CommandManagerState """ return CommandManagerState( diff --git a/src/dataset/replay_data/replay_parser/game_events/events/control_group_update.py b/src/dataset/replay_data/replay_parser/game_events/events/control_group_update.py index d292fd0..2b52bdd 100644 --- a/src/dataset/replay_data/replay_parser/game_events/events/control_group_update.py +++ b/src/dataset/replay_data/replay_parser/game_events/events/control_group_update.py @@ -3,31 +3,30 @@ from src.dataset.replay_data.replay_parser.game_events.game_event import GameEvent -# TODO: Document the docstrings - - class ControlGroupUpdate(GameEvent): - """_summary_ + """ + ControlGroupUpdate is containing some "details" information about updates and changes player's control groups in the game - :param controlGroupIndex: _description_ + :param controlGroupIndex: Highly likely this parameter specifies an id parameter which control group has selected by the player in the game :type controlGroupIndex: int - :param controlGroupUpdate: _description_ + :param controlGroupUpdate: Highly likely this parameter specifies an id parameter which control group has changed by the player in the game :type controlGroupUpdate: int - :param id: _description_ + :param id: Specifies the ID of an event which corresponds to its name. :type id: int - :param loop: _description_ + :param loop: Specifies the game loop number (game-engine tick) when at which the event occurred :type loop: int - :param userid: _description_ + :param userid: Specifies id number of player who has updated the group control the game :type userid: int """ @staticmethod def from_dict(d: Dict) -> "ControlGroupUpdate": - """_summary_ + """ + Static method returning initialized ControlGroupUpdate class from a dictionary. This helps with the original JSON parsing. - :param d: _description_ + :param d: Specifies a dictionary as available in the JSON file that is a result of pre-processing some .SC2Replay file. :type d: Dict - :return: _description_ + :return: Returns an initialized ControlGroupUpdate class. :rtype: ControlGroupUpdate """ return ControlGroupUpdate( diff --git a/src/dataset/replay_data/replay_parser/game_events/events/game_user_leave.py b/src/dataset/replay_data/replay_parser/game_events/events/game_user_leave.py index 135de4a..66c070e 100644 --- a/src/dataset/replay_data/replay_parser/game_events/events/game_user_leave.py +++ b/src/dataset/replay_data/replay_parser/game_events/events/game_user_leave.py @@ -3,30 +3,28 @@ from src.dataset.replay_data.replay_parser.game_events.game_event import GameEvent -# TODO: Document the docstrings - - class GameUserLeave(GameEvent): """ - _summary_ + GameUserLeave is containing some "details" information about player's leaving the game like time, reason, etc. - :param id: _description_ + :param id: Specifies the ID of an event which corresponds to its name. :type id: int - :param leaveReason: _description_ + :param leaveReason: Specifies a number which determinate leaving reason, there are no more details :type leaveReason: int - :param loop: _description_ + :param loop: Specifies the game loop number (game-engine tick) when at which the event occurred :type loop: int - :param userid: _description_ + :param userid: Specifies id number of player who has left the game :type userid: int """ @staticmethod def from_dict(d: Dict) -> "GameUserLeave": - """_summary_ + """ + Static method returning initialized GameUserLeave class from a dictionary. This helps with the original JSON parsing. - :param d: _description_ + :param d: Specifies a dictionary as available in the JSON file that is a result of pre-processing some .SC2Replay file. :type d: Dict - :return: _description_ + :return: Returns an initialized GameUserLeave class. :rtype: GameUserLeave """ return GameUserLeave( diff --git a/src/dataset/replay_data/replay_parser/game_events/events/selection_delta.py b/src/dataset/replay_data/replay_parser/game_events/events/selection_delta.py index 3d90c2e..dcaf5e8 100644 --- a/src/dataset/replay_data/replay_parser/game_events/events/selection_delta.py +++ b/src/dataset/replay_data/replay_parser/game_events/events/selection_delta.py @@ -4,33 +4,30 @@ from src.dataset.replay_data.replay_parser.game_events.game_event import GameEvent -# TODO: Document the docstrings - - class SelectionDelta(GameEvent): """ - _summary_ + SelectionDelta is containing some "details" information about player's selection during the game - :param controlGroupId: _description_ + :param controlGroupId: Specifies the event id of the control group, which has been selected :type controlGroupId: int - :param delta: _description_ + :param delta: Specifies the game loop number (game-engine tick) when at which the event occurred :type delta: Delta - :param id: _description_ + :param id: Specifies the ID of an event which corresponds to its name. :type id: int - :param loop: _description_ + :param loop: Specifies the game loop number (game-engine tick) when at which the event occurred :type loop: int - :param userid: _description_ + :param userid: Specifies id number of player who has done selection option in the game :type userid: int """ @staticmethod def from_dict(d: Dict) -> "SelectionDelta": """ - _summary_ + Static method returning initialized SelectionDelta class from a dictionary. This helps with the original JSON parsing. - :param d: _description_ + :param d: Specifies a dictionary as available in the JSON file that is a result of pre-processing some .SC2Replay file. :type d: Dict - :return: _description_ + :return: Returns an initialized SelectionDelta class. :rtype: SelectionDelta """ return SelectionDelta( diff --git a/src/dataset/replay_data/replay_parser/game_events/events/user_options.py b/src/dataset/replay_data/replay_parser/game_events/events/user_options.py index a993528..0d87f54 100644 --- a/src/dataset/replay_data/replay_parser/game_events/events/user_options.py +++ b/src/dataset/replay_data/replay_parser/game_events/events/user_options.py @@ -3,56 +3,55 @@ from src.dataset.replay_data.replay_parser.game_events.game_event import GameEvent -# TODO: Document the docstrings - - class UserOptions(GameEvent): - """_summary_ + """ + UserOptions is containing some "details" information about player's settings, profiles, configuration in the game. - :param baseBuildNum: _description_ + :param baseBuildNum: Specifies a unique version number of the game build, highly likely game engine number :type baseBuildNum: int - :param buildNum: _description_ + :param buildNum: Specifies a unique version number of the build, highly likely game build number :type buildNum: int - :param cameraFollow: _description_ + :param cameraFollow: Specifies if the camera object is following an object :type cameraFollow: bool - :param debugPauseEnabled: _description_ + :param debugPauseEnabled: There is no valuable information about this parameter :type debugPauseEnabled: bool - :param developmentCheatsEnabled: _description_ + :param developmentCheatsEnabled: Specifies if cheat option for developers have been enabled :type developmentCheatsEnabled: bool - :param gameFullyDownloaded: _description_ + :param gameFullyDownloaded: Specifies if the game was fully downloaded, with campaign, better graphic settings, etc. :type gameFullyDownloaded: bool - :param hotkeyProfile: _description_ + :param hotkeyProfile: Specifies the name of the player's hotkey group, the player was playing on in the game :type hotkeyProfile: str - :param id: _description_ + :param id: Specifies the ID of an event which corresponds to its name. :type id: int - :param isMapToMapTransition: _description_ + :param isMapToMapTransition: There is no valuable information about this parameter :type isMapToMapTransition: bool - :param loop: _description_ + :param loop: Specifies the game loop number (game-engine tick) when at which the event occurred :type loop: int - :param multiplayerCheatsEnabled: _description_ + :param multiplayerCheatsEnabled: Specifies if the game was having cheat options enabled in the game :type multiplayerCheatsEnabled: bool - :param platformMac: _description_ + :param platformMac: Specifies if the game has been played on the Mac operating system :type platformMac: bool - :param syncChecksummingEnabled: _description_ + :param syncChecksummingEnabled: There is no valuable information about this parameter :type syncChecksummingEnabled: bool - :param testCheatsEnabled: _description_ + :param testCheatsEnabled: Specifies if the game was having tests on, to detect cheats :type testCheatsEnabled: bool - :param useGalaxyAsserts: _description_ + :param useGalaxyAsserts: There is no valuable information about this parameter :type useGalaxyAsserts: bool - :param userid: _description_ + :param userid: Specifies the id of the player who has been the owner of the options in the game :type userid: int - :param versionFlags: _description_ + :param versionFlags: There is no valuable information about this parameter, might it be a player's setting version, + default = 0 :type versionFlags: int """ @staticmethod def from_dict(d: Dict) -> "UserOptions": """ - _summary_ + Static method returning initialized UserOptions class from a dictionary. This helps with the original JSON parsing. - :param d: _description_ + :param d: Specifies a dictionary as available in the JSON file that is a result of pre-processing some .SC2Replay file. :type d: Dict - :return: _description_ + :return: Returns an initialized UserOptions class. :rtype: UserOptions """ return UserOptions( diff --git a/src/dataset/replay_data/replay_parser/game_events/game_events_parser.py b/src/dataset/replay_data/replay_parser/game_events/game_events_parser.py index 68d691c..fc8ecce 100644 --- a/src/dataset/replay_data/replay_parser/game_events/game_events_parser.py +++ b/src/dataset/replay_data/replay_parser/game_events/game_events_parser.py @@ -41,13 +41,11 @@ from src.dataset.replay_data.replay_parser.game_events.game_event import GameEvent - - class GameEventsParser: @staticmethod def from_dict(d: Dict) -> GameEvent: """ - Static method returning initialized GameEventsParser class from a dictionary. This helps with the original JSON parsing. + Static method returning initialized GameEvent class from a dictionary. This helps with the original JSON parsing. :param d: Specifies a dictionary as available in the JSON file that is a result of pre-processing some .SC2Replay file. :type d: Dict diff --git a/src/dataset/replay_data/replay_parser/header/header.py b/src/dataset/replay_data/replay_parser/header/header.py index 402a81f..c17ff72 100644 --- a/src/dataset/replay_data/replay_parser/header/header.py +++ b/src/dataset/replay_data/replay_parser/header/header.py @@ -7,7 +7,7 @@ class Header: :param elapsedGameLoops: Specifies how much game loops (game-engine ticks) the game lasted. :type elapsedGameLoops: int - :param version: Specifies the game version that was used to play the game. + :param version: Specifies the game version that players have used to play the game. :type version: str """ diff --git a/src/dataset/replay_data/replay_parser/init_data/game_options.py b/src/dataset/replay_data/replay_parser/init_data/game_options.py index 1dc98e6..67daf21 100644 --- a/src/dataset/replay_data/replay_parser/init_data/game_options.py +++ b/src/dataset/replay_data/replay_parser/init_data/game_options.py @@ -9,7 +9,7 @@ class GameOptions: :type advancedSharedControl: bool :param amm: Specifies if AMM (AutoMM - Automated Match Making) is enabled :type amm: bool - :param battleNet: Specifies if game was played on Battle.net + :param battleNet: Specifies if game has been played on Battle.net :type battleNet: bool :param clientDebugFlags: Specifies the client debug flag :type clientDebugFlags: int @@ -44,7 +44,7 @@ def from_dict(d: Dict[str, Any]) -> "GameOptions": :param d: Describes a dictionary, it holds translations of a phrase or sentence :type d: Dict[str, Any] - :return: Specifies a list of parameters about the game like a number of observers, fog of the game, if game was + :return: Specifies a list of parameters about the game like a number of observers, fog of the game, if the game was competitive etc. :rtype: GameOptions """ diff --git a/src/dataset/replay_data/replay_parser/message_events/events/chat.py b/src/dataset/replay_data/replay_parser/message_events/events/chat.py index 3412014..ebf9d54 100644 --- a/src/dataset/replay_data/replay_parser/message_events/events/chat.py +++ b/src/dataset/replay_data/replay_parser/message_events/events/chat.py @@ -5,13 +5,11 @@ MessageEvent, ) -# TODO: Docstrings - class Chat(MessageEvent): """ - _summary_ + Chat holds information about messages between players during the game :param id: Specifies id of the chat event :type id: int @@ -28,7 +26,7 @@ class Chat(MessageEvent): @staticmethod def from_dict(d: Dict) -> "Chat": """ - _summary_ + Static method returning initialized Chat class from a dictionary. This helps with the original JSON parsing. :param d: Specifies a dictionary, it holds translations of a phrase or sentence. :type d: Dict diff --git a/src/dataset/replay_data/replay_parser/message_events/message_event.py b/src/dataset/replay_data/replay_parser/message_events/message_event.py index 8dfe7d3..f9ebfb7 100644 --- a/src/dataset/replay_data/replay_parser/message_events/message_event.py +++ b/src/dataset/replay_data/replay_parser/message_events/message_event.py @@ -3,8 +3,6 @@ from typing import Dict, Literal - - class MessageEvent(metaclass=abc.ABCMeta): @classmethod def __subclasshook__(cls, subclass: type) -> Literal[True] | NotImplementedType: diff --git a/src/dataset/replay_data/replay_parser/message_events/message_events_parser.py b/src/dataset/replay_data/replay_parser/message_events/message_events_parser.py index 83f7ec8..a330b91 100644 --- a/src/dataset/replay_data/replay_parser/message_events/message_events_parser.py +++ b/src/dataset/replay_data/replay_parser/message_events/message_events_parser.py @@ -9,7 +9,7 @@ class MessageEventsParser: @staticmethod def from_dict(d: Dict) -> MessageEvent: """ - Static method returning initialized Header class from a dictionary. This helps with the original JSON parsing. + Static method returning initialized MessageEvent class from a dictionary. This helps with the original JSON parsing. :param d: Specifies a dictionary, it holds translations of a phrase or sentence. :type d: Dict diff --git a/src/dataset/replay_data/replay_parser/tracker_events/events/unit_born.py b/src/dataset/replay_data/replay_parser/tracker_events/events/unit_born.py index 6d79543..8c66477 100644 --- a/src/dataset/replay_data/replay_parser/tracker_events/events/unit_born.py +++ b/src/dataset/replay_data/replay_parser/tracker_events/events/unit_born.py @@ -4,41 +4,39 @@ TrackerEvent, ) -# TODO: Document the docstrings - class UnitBorn(TrackerEvent): """ - _summary_ + UnitBorn is containing some "details" information about unit at the moment of it has appeared in the game - :param controlPlayerId: _description_ + :param controlPlayerId: Specifies the information about player id who made the unit in the game :type controlPlayerId: int - :param id: _description_ + :param id: Specifies the ID of an event which corresponds to its name. :type id: int - :param loop: _description_ + :param loop: Specifies the game loop number (game-engine tick) when at which the event occurred :type loop: int - :param unitTagIndex: _description_ + :param unitTagIndex: Specifies a pointer for a specific unit which was creating in the game :type unitTagIndex: int - :param unitTagRecycle: _description_ + :param unitTagRecycle: There is no specific information about this parameter :type unitTagRecycle: int - :param unitTypeName: _description_ + :param unitTypeName: Specifies the in game unit name that was created in the game :type unitTypeName: str - :param upkeepPlayerId: _description_ + :param upkeepPlayerId: Specifies an id number of player who was having the control of the unit in the game :type upkeepPlayerId: int - :param x: _description_ + :param x: Specifies x coordinate of map in pixels where the object was created. :type x: int - :param y: _description_ + :param y: Specifies y coordinate of map in pixels where the object was created. :type y: int """ def from_dict(d: Dict) -> "UnitBorn": """ - _summary_ + Static method returning initialized UnitBorn class from a dictionary. This helps with the original JSON parsing. - :param d: _description_ + :param d: Specifies a dictionary as available in the JSON file that is a result of pre-processing some .SC2Replay file. :type d: Dict - :return: _description_ + :return: Returns an initialized UnitBorn class. :rtype: UnitBorn """ return UnitBorn( @@ -65,27 +63,6 @@ def __init__( x: int, y: int, ) -> None: - """_summary_ - - :param controlPlayerId: _description_ - :type controlPlayerId: int - :param id: _description_ - :type id: int - :param loop: _description_ - :type loop: int - :param unitTagIndex: _description_ - :type unitTagIndex: int - :param unitTagRecycle: _description_ - :type unitTagRecycle: int - :param unitTypeName: _description_ - :type unitTypeName: str - :param upkeepPlayerId: _description_ - :type upkeepPlayerId: int - :param x: _description_ - :type x: int - :param y: _description_ - :type y: int - """ self.controlPlayerId = controlPlayerId self.id = id self.loop = loop diff --git a/src/dataset/replay_data/replay_parser/tracker_events/events/unit_died.py b/src/dataset/replay_data/replay_parser/tracker_events/events/unit_died.py index ab54d14..ade2b48 100644 --- a/src/dataset/replay_data/replay_parser/tracker_events/events/unit_died.py +++ b/src/dataset/replay_data/replay_parser/tracker_events/events/unit_died.py @@ -4,41 +4,39 @@ TrackerEvent, ) -# TODO: Document the docstrings - class UnitDied(TrackerEvent): """ - _summary_ + UnitDied is containing some "details" information about unit at the moment of it has died in the game - :param id: _description_ + :param id: Specifies the ID of an event which corresponds to its name. :type id: int - :param killerPlayerId: _description_ + :param killerPlayerId: Specifies an id number of played who has controlled and destroyed the unit in the game :type killerPlayerId: int - :param killerUnitTagIndex: _description_ + :param killerUnitTagIndex: Specifies a pointer for a specific unit who has destroyed the unit in the game :type killerUnitTagIndex: int - :param killerUnitTagRecycle: _description_ + :param killerUnitTagRecycle: There is no specific information about this parameter :type killerUnitTagRecycle: int - :param loop: _description_ + :param loop: Specifies the game loop number (game-engine tick) when at which the event occurred :type loop: int - :param unitTagIndex: _description_ + :param unitTagIndex: Specifies a pointer for a specific unit which was destroyed in the game :type unitTagIndex: int - :param unitTagRecycle: _description_ + :param unitTagRecycle: There is no specific information about this parameter :type unitTagRecycle: int - :param x: _description_ + :param x: Specifies x coordinate of map in pixels where the object was destroyed. :type x: int - :param y: _description_ + :param y: Specifies y coordinate of map in pixels where the object was destroyed. :type y: int """ def from_dict(d: Dict) -> "UnitDied": """ - _summary_ + Static method returning initialized UnitDied class from a dictionary. This helps with the original JSON parsing. - :param d: _description_ + :param d: Specifies a dictionary as available in the JSON file that is a result of pre-processing some .SC2Replay file. :type d: Dict - :return: _description_ + :return: Returns an initialized UnitDied class. :rtype: UnitDied """ return UnitDied( diff --git a/src/dataset/replay_data/replay_parser/tracker_events/events/unit_done.py b/src/dataset/replay_data/replay_parser/tracker_events/events/unit_done.py index cb4f640..e0d14f8 100644 --- a/src/dataset/replay_data/replay_parser/tracker_events/events/unit_done.py +++ b/src/dataset/replay_data/replay_parser/tracker_events/events/unit_done.py @@ -4,32 +4,30 @@ TrackerEvent, ) -# TODO: Document the docstrings - class UnitDone(TrackerEvent): """ - _summary_ + UnitDone is containing some "details" information about unit at the moment of it has built in the game - :param id: _description_ + :param id: Specifies the ID of an event which corresponds to its name. :type id: int - :param loop: _description_ + :param loop: Specifies the game loop number (game-engine tick) when at which the event occurred :type loop: int - :param unitTagIndex: _description_ + :param unitTagIndex: Specifies a pointer for a specific unit which was finishing its build :type unitTagIndex: int - :param unitTagRecycle: _description_ + :param unitTagRecycle: There is no specific information about this parameter :type unitTagRecycle: int """ @staticmethod def from_dict(d: Dict) -> "UnitDone": """ - _summary_ + Static method returning initialized UnitDone class from a dictionary. This helps with the original JSON parsing. - :param d: _description_ + :param d: Specifies a dictionary as available in the JSON file that is a result of pre-processing some .SC2Replay file. :type d: Dict - :return: _description_ + :return: Returns an initialized UnitDone class. :rtype: UnitDone """ return UnitDone( diff --git a/src/dataset/replay_data/replay_parser/tracker_events/events/unit_init.py b/src/dataset/replay_data/replay_parser/tracker_events/events/unit_init.py index 2caec12..5538b9f 100644 --- a/src/dataset/replay_data/replay_parser/tracker_events/events/unit_init.py +++ b/src/dataset/replay_data/replay_parser/tracker_events/events/unit_init.py @@ -4,41 +4,39 @@ TrackerEvent, ) -# TODO: Document the docstrings - class UnitInit(TrackerEvent): """ - _summary_ + UnitInit holds information about initializing object in the game - :param controlPlayerId: _description_ + :param controlPlayerId: Specifies the information about player id who made the unit in the game :type controlPlayerId: int - :param id: _description_ + :param id: Specifies the ID of an event which corresponds to its name. :type id: int - :param loop: _description_ + :param loop: Specifies the game loop number (game-engine tick) when at which the event occurred :type loop: int - :param unitTagIndex: _description_ + :param unitTagIndex: Specifies a pointer for a specific unit which was initialized in the game :type unitTagIndex: int - :param unitTagRecycle: _description_ + :param unitTagRecycle: There is no specific information about this parameter :type unitTagRecycle: int - :param unitTypeName: _description_ + :param unitTypeName: Specifies a unit name in the game, which was initialized in the game :type unitTypeName: str - :param upkeepPlayerId: _description_ + :param upkeepPlayerId: Specifies an id number of player who was having the control of the unit in the game :type upkeepPlayerId: int - :param x: _description_ + :param x: Specifies x coordinate of map in pixels where the object was initialized. :type x: int - :param y: _description_ + :param y: Specifies y coordinate of map in pixels where the object was initialized. :type y: int """ def from_dict(d: Dict) -> "UnitInit": """ - _summary_ + Static method returning initialized UnitInit class from a dictionary. This helps with the original JSON parsing. - :param d: _description_ + :param d: Specifies a dictionary as available in the JSON file that is a result of pre-processing some .SC2Replay file. :type d: Dict - :return: _description_ + :return: Returns an initialized UnitInit class. :rtype: UnitInit """ return UnitInit( diff --git a/src/dataset/replay_data/replay_parser/tracker_events/events/unit_owner_change.py b/src/dataset/replay_data/replay_parser/tracker_events/events/unit_owner_change.py index e49dcce..b649719 100644 --- a/src/dataset/replay_data/replay_parser/tracker_events/events/unit_owner_change.py +++ b/src/dataset/replay_data/replay_parser/tracker_events/events/unit_owner_change.py @@ -4,34 +4,32 @@ TrackerEvent, ) -# TODO: Document the docstrings - class UnitOwnerChange(TrackerEvent): """ - _summary_ + UnitOwnerChange holds some detail information about how the unit position was changing during the game. - :param controlPlayerId: _description_ + :param controlPlayerId: Specifies the information about player id who made the unit in the game :type controlPlayerId: int - :param id: _description_ + :param id: Specifies the ID of an event which corresponds to its name. :type id: int - :param loop: _description_ + :param loop: Specifies the game loop number (game-engine tick) when at which the event occurred :type loop: int - :param unitTagIndex: _description_ + :param unitTagIndex: Specifies a pointer for a specific unit which was doing some changes :type unitTagIndex: int - :param unitTagRecycle: _description_ + :param unitTagRecycle: There is no specific information about this parameter :type unitTagRecycle: int - :param upkeepPlayerId: _description_ + :param upkeepPlayerId: Specifies an id number of player who was having the control of the unit in the game :type upkeepPlayerId: int """ def from_dict(d: Dict[str, int]) -> "UnitOwnerChange": """ - _summary_ + Static method returning initialized UnitOwnerChange class from a dictionary. This helps with the original JSON parsing. - :param d: _description_ + :param d: Specifies a dictionary as available in the JSON file that is a result of pre-processing some .SC2Replay file. :type d: Dict - :return: _description_ + :return: Returns an initialized UnitOwnerChange class. :rtype: UnitOwnerChange """ return UnitOwnerChange( diff --git a/src/dataset/replay_data/replay_parser/tracker_events/events/unit_positions.py b/src/dataset/replay_data/replay_parser/tracker_events/events/unit_positions.py index 1641ac0..c32ef51 100644 --- a/src/dataset/replay_data/replay_parser/tracker_events/events/unit_positions.py +++ b/src/dataset/replay_data/replay_parser/tracker_events/events/unit_positions.py @@ -4,30 +4,29 @@ TrackerEvent, ) -# TODO: Document the docstrings - class UnitPositions(TrackerEvent): - """_summary_ + """ + UnitPositions holds some detail information about how the unit position was changing during the game. - :param firstUnitIndex: _description_ + :param firstUnitIndex: Specifies a pointer for a specific unit which was doing some changes :type firstUnitIndex: int - :param id: _description_ + :param id: Specifies the ID of an event which corresponds to its name. :type id: int - :param items: _description_ + :param items: Specifies a list of int values, there is no specific information what the numbers mean :type items: List[int] - :param loop: _description_ + :param loop: Specifies the game loop number (game-engine tick) when at which the event occurred :type loop: int """ def from_dict(d: Dict) -> "UnitPositions": """ - _summary_ + Static method returning initialized UnitPositions class from a dictionary. This helps with the original JSON parsing. - :param d: _description_ + :param d: Specifies a dictionary as available in the JSON file that is a result of pre-processing some .SC2Replay file. :type d: Dict - :return: _description_ + :return: Returns an initialized Header class. :rtype: UnitPositions """ return UnitPositions( diff --git a/src/dataset/replay_data/replay_parser/tracker_events/events/unit_type_change.py b/src/dataset/replay_data/replay_parser/tracker_events/events/unit_type_change.py index 82f50fc..bd8cc7b 100644 --- a/src/dataset/replay_data/replay_parser/tracker_events/events/unit_type_change.py +++ b/src/dataset/replay_data/replay_parser/tracker_events/events/unit_type_change.py @@ -5,33 +5,32 @@ TrackerEvent, ) -# TODO: Document the docstrings - class UnitTypeChange(TrackerEvent): """ - _summary_ + UnitTypeChange holds the information about how things were changing during the game. - :param id: _description_ + :param id: Specifies the ID of an event which corresponds to its name. :type id: int - :param loop: _description_ + :param loop: Specifies the game loop number (game-engine tick) when at which the event occurred :type loop: int - :param unitTagIndex: _description_ + :param unitTagIndex: Specifies a pointer for a specific unit which was doing some changes :type unitTagIndex: int - :param unitTagRecycle: _description_ + :param unitTagRecycle: There is no specific information about this parameter :type unitTagRecycle: int - :param unitTypeName: _description_ + :param unitTypeName: Specifies an in game object name, who was doing some changes :type unitTypeName: str """ @staticmethod def from_dict(d: Dict) -> "UnitTypeChange": - """_summary_ + """ + Static method returning initialized UnitTypeChange class from a dictionary. This helps with the original JSON parsing. - :param d: _description_ + :param d: Specifies a dictionary as available in the JSON file that is a result of pre-processing some .SC2Replay file. :type d: Dict - :return: _description_ + :return: Returns an initialized UnitTypeChange class. :rtype: UnitTypeChange """ return UnitTypeChange( diff --git a/src/dataset/replay_data/replay_parser/tracker_events/events/upgrade.py b/src/dataset/replay_data/replay_parser/tracker_events/events/upgrade.py index 10aadb0..6fa173d 100644 --- a/src/dataset/replay_data/replay_parser/tracker_events/events/upgrade.py +++ b/src/dataset/replay_data/replay_parser/tracker_events/events/upgrade.py @@ -4,34 +4,33 @@ TrackerEvent, ) -# TODO: Document the docstrings - class Upgrade(TrackerEvent): """ - _summary_ + Upgrade type containing some "details" information like which player is doing an upgrade, game loop, upgrade in game name etc. - :param count: _description_ + :param count: Specifies a number value, highly likely this parameter serves for adding value of upgrades to summary. + Default value of the parameter is 1. :type count: int - :param id: _description_ + :param id: Specifies an event unique number :type id: int - :param loop: _description_ + :param loop: Specifies a game loop when the upgrade was started in the game :type loop: int - :param playerId: _description_ + :param playerId: Specifies an id of the player who was doing the upgrade in the game :type playerId: int - :param upgradeTypeName: _description_ + :param upgradeTypeName: Specifies a name that upgrade has in the game :type upgradeTypeName: str """ @staticmethod def from_dict(d: Dict) -> "Upgrade": """ - _summary_ + Static method returning initialized Upgrade class from a dictionary. This helps with the original JSON parsing. - :param d: _description_ + :param d: Specifies a dictionary as available in the JSON file that is a result of pre-processing some .SC2Replay file. :type d: Dict - :return: _description_ + :return: Returns an initialized Upgrade class. :rtype: Upgrade """ return Upgrade( diff --git a/src/dataset/replay_data/replay_parser/tracker_events/tracker_event.py b/src/dataset/replay_data/replay_parser/tracker_events/tracker_event.py index 5ced5a0..fc23092 100644 --- a/src/dataset/replay_data/replay_parser/tracker_events/tracker_event.py +++ b/src/dataset/replay_data/replay_parser/tracker_events/tracker_event.py @@ -2,8 +2,6 @@ from types import NotImplementedType from typing import Dict, Literal -# TODO: from_dict documentation - class TrackerEvent(metaclass=abc.ABCMeta): @classmethod @@ -17,12 +15,12 @@ def __subclasshook__(cls, subclass: type) -> Literal[True] | NotImplementedType: @abc.abstractmethod def from_dict(d: Dict) -> "TrackerEvent": """ - _summary_ + Abstract method returning some TrackerEvent. This method helps with implementation, with the original JSON parsing. - :param dict: _description_ - :type dict: Dict - :raises NotImplementedError: _description_ - :return: _description_ - :rtype: MessageEvent + :param d: Specifies a dictionary as available in the JSON file that is a result of pre-processing some .SC2Replay file. + :type d: Dict + :raises NotImplementedError: Raises an error if not implemented, this is only an abstract method + :return: Returns a method sheet which must be implemented + :rtype: TrackerEvent """ raise NotImplementedError diff --git a/src/dataset/replay_data/replay_parser/tracker_events/tracker_events_parser.py b/src/dataset/replay_data/replay_parser/tracker_events/tracker_events_parser.py index 55e16b0..478f584 100644 --- a/src/dataset/replay_data/replay_parser/tracker_events/tracker_events_parser.py +++ b/src/dataset/replay_data/replay_parser/tracker_events/tracker_events_parser.py @@ -31,18 +31,16 @@ TrackerEvent, ) -# TODO: from_dict documentation - class TrackerEventsParser: @staticmethod def from_dict(d: Dict) -> TrackerEvent: """ - _summary_ + Static method returning initialized TrackerEvent class from a dictionary. This helps with the original JSON parsing. - :param d: _description_ + :param d: Specifies a dictionary as available in the JSON file that is a result of pre-processing some .SC2Replay file. :type d: Dict - :return: _description_ + :return: Returns an initialized TrackerEvent class. :rtype: TrackerEvent """ type_name = d["evtTypeName"] diff --git a/src/dataset/utils/zip_utils.py b/src/dataset/utils/zip_utils.py index f7da9ae..9a583d4 100644 --- a/src/dataset/utils/zip_utils.py +++ b/src/dataset/utils/zip_utils.py @@ -10,7 +10,7 @@ # REVIEW: Check this: def unpack_chunk(zip_path: str, filenames: List[str], path_to_extract: str): """ - Helper function for unpacking a chunk of files from a an archive + Helper function for unpacking a chunk of files from an archive :param zip_path: Specifies the path to the archive file that will be extracted. :type zip_path: str