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

Uploaded Python 3

File details

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

File metadata

  • Download URL: wgc_core-4.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 e9e885eb4548f4ecd489f24a4157c89797d6f63545bd0baff2bc10bae5532b6c
MD5 75368fb4978707f3dee04347730a9d37
BLAKE2b-256 c67bd19ec9ec258df57b36b8b16521fd01d9ae437ccc49c0c3002bbe1ac0313b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: wgc_core-4.0.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6b578fb651167b317c474028faba03f6f11c4f4eb68d856806ce3506cb4bb85a
MD5 df47098047b131c42881a54847d15768
BLAKE2b-256 e89ccc154bbb5ca893ccc8f14e37cc57322180594ee7c915e3e045398813ca73

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