Skip to content

Conversation

@Kaszanas
Copy link
Owner

@Kaszanas Kaszanas commented May 5, 2025

Description

Introduces a way to download other cacheHandles, this means that all of the replay dependencies are downloaded. Renamed the CLI argument, and adjusted directory creation to have a /dependencies and /dependencies/maps and /dependencies/other_dependencies

Related Issues

#103

How Has This Been Tested?

Verified manually.

@Kaszanas Kaszanas linked an issue May 5, 2025 that may be closed by this pull request
@Kaszanas Kaszanas requested a review from Copilot May 5, 2025 00:03
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the tool to download replay dependencies instead of maps, changing flag names, directory structures, logging messages, and function names accordingly. Key changes include renaming CLI flags and related variables, updating downloader pipelines and shared state to handle dependencies, and revising documentation to reflect these changes.

Reviewed Changes

Copilot reviewed 10 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
utils/flag_utils.go Renamed and updated CLI flag definitions and help strings.
main.go Updated logging and pipeline invocation for dependencies.
dataproc/sc2_map_processing/sc2_map_utils.go Renamed functions and types for dependency extraction.
dataproc/downloader/*.go Updated pipelines, shared state, and download functions.
dataproc/dataproc_pipeline_test.go Updated test flags and pipeline invocation.
README.md Revised CLI instructions and directory references.
Files not reviewed (2)
  • docker/Dockerfile: Language not supported
  • docker/Dockerfile.dev: Language not supported
Comments suppressed due to low confidence (2)

dataproc/downloader/downloader.go:270

  • The debug log in downloadSingleDependency still references 'downloadSingleMap'. Please update it to 'downloadSingleDependency' for clarity.
log.Debug("Entered downloadSingleMap()")

dataproc/downloader/downloader.go:227

  • The log field key 'mapHashAndExtension' is outdated in the dependency context. Consider renaming it to 'dependencyFilename' for clearer logging.
log.WithField("mapHashAndExtension", filenameAndIsMap).Info("Dependency is being downloaded, adding channel to receive the result.")

@Kaszanas Kaszanas requested a review from Copilot May 5, 2025 00:09
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new mechanism for downloading replay dependencies instead of maps. Key changes include renaming CLI flags and variables (e.g., only_dependency_download, dependency_directory), adjusting directory creation to use /dependencies with subdirectories for maps and other dependencies, and updating function names and log messages in the downloader, processing, and test pipelines to reflect the new dependency download behavior.

Reviewed Changes

Copilot reviewed 10 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
utils/flag_utils.go Updated CLI flag definitions and log messages for dependency download.
main.go Adjusted log fields and pipeline call to use dependency download.
dataproc/sc2_map_processing/sc2_map_utils.go Renamed types and functions for dependency extraction.
dataproc/downloader/map_downloader_pipeline.go Renamed pipeline functions and updated directory creation for dependencies.
dataproc/downloader/downloader.go Adjusted download dispatch and task functions for dependency context.
dataproc/downloader/download_all_maps.go Updated dependency download logic and log messages.
dataproc/dataproc_pipeline_test.go Updated test flags and function calls with dependency download settings.
README.md Revised documentation to reference the dependency directory and CLI changes.
Files not reviewed (2)
  • docker/Dockerfile: Language not supported
  • docker/Dockerfile.dev: Language not supported
Comments suppressed due to low confidence (2)

dataproc/sc2_map_processing/sc2_map_utils.go:127

  • The log message still refers to 'map' even though the code now handles dependencies. Consider updating it to 'Dependency is already downloaded, continuing.' for clarity.
log.WithField("map", replayHashExtension).Debug("Map is already downloaded, continuing.")

dataproc/downloader/downloader.go:213

  • Update the log field key and message to refer to 'dependencyFilename' rather than 'mapHashAndExtension' to reflect the new dependency context.
log.WithField("mapHashAndExtension", filenameAndIsMap.DependencyFilename).Info("Map name was already processed in mapHashAndExtensionToName, returning.")

@Kaszanas Kaszanas requested a review from Copilot May 5, 2025 00:12
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors functionality to download cache dependencies instead of maps by renaming CLI flags, updating directory structures, and modifying internal processing pipelines accordingly. Key changes include:

  • Renaming of flags and directory variables to use “dependency” terminology
  • Refactoring of downloader and processing functions to handle dependencies
  • Updates to tests and documentation to reflect the new dependency-based logic

Reviewed Changes

Copilot reviewed 10 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
utils/flag_utils.go Updated CLI flags and directory names from maps to dependency
main.go Adjusted logging and function calls to use dependency download flow
dataproc/sc2_map_processing/sc2_map_utils.go Renamed structs and processing functions from map to dependency and revised goroutine invocation
dataproc/downloader/map_downloader_pipeline.go Renamed pipeline function to DependencyDownloaderPipeline and updated directory creation
dataproc/downloader/downloader.go Modified download task state and functions to handle dependencies instead of maps
dataproc/downloader/download_all_maps.go Updated function name and logging to download dependencies
dataproc/dataproc_pipeline_test.go Adjusted test flags and function calls for dependency download
README.md Revised documentation to reflect dependency download paths and instructions
Files not reviewed (2)
  • docker/Dockerfile: Language not supported
  • docker/Dockerfile.dev: Language not supported
Comments suppressed due to low confidence (2)

dataproc/downloader/downloader.go:277

  • The error message still refers to 'map' instead of 'dependency'; update the string to 'error downloading in http.Get dependency: %v' for consistency.
fmt.Errorf("error downloading in http.Get map: %v", err)

main.go:88

  • [nitpick] The variable 'foreignToEnglishMapping' is now used to store dependency mappings; consider renaming it to 'dependencyMapping' for clarity.
"foreignToEnglishMapping": foreignToEnglishMapping,

@Kaszanas Kaszanas self-assigned this May 5, 2025
@Kaszanas Kaszanas merged commit 36266b1 into dev May 5, 2025
3 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators May 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Download All StarCraft 2 Cache Dependencies

2 participants