# verification > Use after completing code changes. Covers pytest commands, mypy type checking, black/isort formatting, and the complete verification checklist before marking tasks complete. - Author: Frank Wang - Repository: ifrankwang/steam-trainer-launcher - Version: 20260125200951 - Stars: 0 - Forks: 0 - Last Updated: 2026-02-06 - Source: https://github.com/ifrankwang/steam-trainer-launcher - Web: https://mule.run/skillshub/@@ifrankwang/steam-trainer-launcher~verification:20260125200951 --- --- name: verification description: Use after completing code changes. Covers pytest commands, mypy type checking, black/isort formatting, and the complete verification checklist before marking tasks complete. license: GPL 3.0 compatibility: opencode metadata: audience: developers workflow: verification --- ## Installation and Dependencies ```bash # Install all dependencies from requirements.txt pip install -r requirements.txt ``` ## Running the Application ```bash # Main launcher entry point python -m src.launcher python src/launcher.py # Debug mode (enable verbose logging) python -m src.launcher --debug # Add debug flag to setup_logger() in launcher.py ``` ## Testing ```bash # Run pytest (no tests exist yet, but this is the expected pattern) pytest pytest tests/ # Run all tests in tests directory pytest -v # Verbose output pytest --tb=short # Short traceback format pytest -k "test_name" # Run specific test by name # Single test file execution pytest tests/test_steam_detector.py pytest tests/test_proton_manager.py -v ``` ## Type Checking (Recommended) ```bash mypy src/ # Type check entire source mypy src/core/steam_detector.py # Specific file mypy --strict src/ # Strict mode ``` ## Code Formatting ```bash black src/ # Format entire source black src/file.py # Specific file black --check src/ # Check without modifying isort src/ # Sort imports isort --check-only src/ # Check without modifying ``` ## License Compliance (REUSE Specification) This project uses [REUSE](https://reuse.software/) to manage copyright and licensing for source files. ```bash # Check license compliance for source files only reuse lint src/ # Download missing license files reuse download --all # Add headers to new source files reuse addheader --copyright "Frank Wang" --year 2026 --license "GPL-3.0-only" src/ ``` **Note**: Only Python source files (`.py`) require SPDX license headers. Markdown files, configs, and docs are excluded as the root `LICENSE` file covers the entire project. ## Code Change Verification (MANDATORY) After completing any code change, you MUST verify the change works correctly before considering the task complete. ### Step 1: Run Full Unit Tests ```bash # Run all tests in the tests directory pytest tests/ -v ``` **Pass Criteria**: All tests must pass (exit code 0). If tests fail: 1. Fix the issue causing the test failure 2. Re-run tests until all pass 3. Do NOT disable or skip failing tests ### Step 2: Verify Application Starts ```bash # Test that the application can start without errors python -m src.launcher --help # Or verify via import test python -c "from src.launcher import main; print('Import successful')" ``` **Pass Criteria**: Application starts without import errors or runtime exceptions. ### Step 3: Type Checking (Recommended) ```bash # Run mypy on modified files mypy src/ --strict ``` **Pass Criteria**: No type errors in modified files. Pre-existing errors may be noted but should not be introduced. ### Step 4: Code Formatting Check (Recommended) ```bash # Check formatting without modifying black --check src/ isort --check-only src/ ``` ## Verification Checklist Before marking a task complete, confirm all of the following: - [ ] All unit tests pass (`pytest tests/ -v`) - [ ] Application imports and starts without errors - [ ] Modified files pass type checking (`mypy src/`) - [ ] Code formatting is correct (`black --check`, `isort --check-only`) - [ ] No new lint errors introduced - [ ] New source files have SPDX license headers (`reuse lint`) ## Failure Handling | Issue | Action | |-------|--------| | Test failure | Fix the root cause, not symptoms. Re-run tests until pass. | | App won't start | Check import errors, dependency issues, Qt initialization | | Type errors | Fix type annotations, do NOT suppress with `typing.cast()`, `# type: ignore` | | Lint errors | Run `black src/` and `isort src/` to auto-fix formatting | | License errors | Run `reuse addheader` on new source files |