Skip to main content

Core package for WGC QA framework: config, logger, exceptions, file templates

Project description

wgc-core

Core package for the WGC QA framework. Provides configuration management, logging, exception hierarchy, and file templates.

Modules

Config (wgc_core.config)

YAML-based configuration system with Python property access:

from wgc_core.config import WGCConfig

# Access config properties
WGCConfig.application.folder        # "C:\Wargaming Game Center\"
WGCConfig.application.binary_name   # "wgc.exe"
WGCConfig.games.folder              # "C:\Games\"
WGCConfig.mocks.http_port           # 8888
WGCConfig.mocks.https_port          # 7771
WGCConfig.wgc_publisher             # "wargaming" | "qihoo" | "steam"

Config classes:

  • WGCConfig — main config (publisher, branch, arch, ports, paths)
  • ApplicationConfig — WGC binary paths, registry keys, protocols
  • GamesConfig — game installation paths, metadata versions
  • MocksConfig — mock server ports and settings
  • TestDataConfig — test data source folders, dummy games
  • JiraConfig — Jira integration settings
  • SteamConfig / FBConfig / GoogleConfig / MicrosoftConfig — external auth configs

Logger (wgc_core.logger)

JSON-configured logging with custom handlers:

from wgc_core.logger import get_logger

log = get_logger(__name__)
log.info("WGC started successfully")

Custom handlers:

  • TestDependentRotatingFileHandler — per-test log files
  • StepsToReproduceFileHandler — structured reproduction steps

Exceptions (wgc_core.exceptions)

Exception hierarchy for all framework error types:

from wgc_core.exceptions import WGCException, WGCCrash, WGCSanityCheckException

# Base: WGCException
# ├── AnotherInstanceRunning
# ├── WebSocketConnectionClosed
# ├── WGCCrash / ApplicationCrash
# ├── WGCDownloadTimeout
# ├── WGCSanityCheckException
# ├── WGCRunningTimeoutException
# └── ...

File Templates (wgc_core.file_templates)

XML/config template files for WGC configuration:

from wgc_core.file_templates import get_file_template, get_file_template_path

# Get template content as string
content = get_file_template('preferences.xml')

# Get absolute path to template file
path = get_file_template_path('wgc_info.1.58.xml')

Includes templates for: preferences.xml, game_info.xml, wgc_info.xml, service.xml, game metadata, Steam VDF files, and more.

Install

pip install wgc-core

Dependencies

  • wgc-clippy — low-level utilities
  • pyyaml, ruamel.yaml — YAML parsing
  • packaging — version comparison

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wgc_core-4.0.3.tar.gz (672.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wgc_core-4.0.3-py3-none-any.whl (700.3 kB view details)

Uploaded Python 3

File details

Details for the file wgc_core-4.0.3.tar.gz.

File metadata

  • Download URL: wgc_core-4.0.3.tar.gz
  • Upload date:
  • Size: 672.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for wgc_core-4.0.3.tar.gz
Algorithm Hash digest
SHA256 5e88bdc0f06746ab4f270bf35ff24a4afa1a1748866331fac249c7ac018ced59
MD5 99c6d4f09bbfc515613c6f54b2dda8ce
BLAKE2b-256 939861fbad6c298c5d471ff17ba90d67032df4f273c9b1188b65e4c728cb6b1f

See more details on using hashes here.

File details

Details for the file wgc_core-4.0.3-py3-none-any.whl.

File metadata

  • Download URL: wgc_core-4.0.3-py3-none-any.whl
  • Upload date:
  • Size: 700.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for wgc_core-4.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 bddcd94e7e0d9b7f4cc93aa04da6c94d391724816f80e63b41c7b6bfd2452fe0
MD5 8266bb676a3c212f7e0bade048c405a5
BLAKE2b-256 0a75e71b90406e963c5f1813da2d5dda7fba28f504fd3bdfcee75594c4146b8e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page