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.1.tar.gz (672.3 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.1-py3-none-any.whl (699.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: wgc_core-4.0.1.tar.gz
  • Upload date:
  • Size: 672.3 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.1.tar.gz
Algorithm Hash digest
SHA256 d2fccda88adb286dae907dc5a9134a388b85db435d226264f70ff3eac1ae1f57
MD5 dfa4904531c8ea44017ded16f8249c44
BLAKE2b-256 d5b1e30fbb973986fae3b3471cf613d2dda302c06b4d282d89dcc7709e837b79

See more details on using hashes here.

File details

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

File metadata

  • Download URL: wgc_core-4.0.1-py3-none-any.whl
  • Upload date:
  • Size: 699.6 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8edab566b236e07a7d2e19648ca2e82ee0dd096ae4904871a9a2d29d1356e8e2
MD5 7239b5d6d617aad3cf970aa5a5c924e8
BLAKE2b-256 9e5e6ff5c0881c84786f99a5e4f0d15bd177d0682bedd53bbdf4c6e341e59773

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