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

Uploaded Python 3

File details

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

File metadata

  • Download URL: wgc_core-4.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 0dab0f1bf0a0634d18066b2474f889c59c9c59429d09207a7fe8b8d39533fb02
MD5 76ee9630c6fb1cc0c5cb501764648853
BLAKE2b-256 42a6e3187ecd7cff72ee6669c48d2ecb4325e476f6fe242f9639a8ae1320e831

See more details on using hashes here.

File details

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

File metadata

  • Download URL: wgc_core-4.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 428697eb36a798845c1ad820b4df87ecec3fe165828c5635877c6e4254333281
MD5 00df0c46c0eb88b42c505817758b7c52
BLAKE2b-256 563b559ccbb970d24ee9ea4e6f89b120246e786f66ce1a3c6cdd5d2743c96277

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