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.5.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.5-py3-none-any.whl (700.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: wgc_core-4.0.5.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.5.tar.gz
Algorithm Hash digest
SHA256 d6dcf7fc6b40b426ee6e57cf4532f9e1af04edcf64b36dd5402f730e9142029c
MD5 046e600d4c421b0352fbdea363dcf854
BLAKE2b-256 e734fadc90b965502a7b470cd6eef157f94ee7623317892521ce67c3a83f7b05

See more details on using hashes here.

File details

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

File metadata

  • Download URL: wgc_core-4.0.5-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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 fd489d29a065833f4b217dc38bae7d7a02d1314b1e656633bbaafa0624275cb2
MD5 100792ebe58798def5acff596663325a
BLAKE2b-256 0c58123f04625fc9d3bc9536da1359e49b53a37e33ce81802192964f8abe3519

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