Skip to content

Update release validation and CI for version 1.0 #288

Description

@Mattsface

Update release validation and CI for version 1.0

Parent release issue: #282

Depends on:

Why

The version 0.9.0 validator checks both HTTP modes, public imports, package metadata, User-Agent behavior, and injected Session preservation. Version 1.0.0 changes the default contract, so release validation must detect any artifact that still behaves like 0.9.x.

Scope

Update scripts/validate_release.py, its tests, and CI as needed.

The built-artifact validation must confirm:

  • Distribution version is 1.0.0
  • Mlb() resolves to strict behavior by default
  • Mlb(strict_http=True) remains supported
  • Mlb(strict_http=False) retains compatibility behavior
  • MlbHttpCompatibilityWarning remains publicly importable
  • Public API imports match the 1.0 contract
  • Library-created Sessions use the metadata-driven User-Agent
  • Injected Session headers and adapters remain untouched
  • Wheel and source distribution contain required files

Release hardening

Validation should cover both build artifacts where practical:

Wheel
Source distribution

Run smoke tests from outside the repository checkout to prevent local source shadowing.

Include or document these final checks:

python3 scripts/validate_release.py
python -m twine check dist/*

The source distribution should also be clean-installed and imported before publication.

CI requirements

  • Offline CI runs on every supported Python version
  • The release branch is included in workflow triggers while active
  • Live MLB API tests remain separate from deterministic pull-request validation
  • CI must not publish automatically from an ordinary push or pull request
  • Release validation must not contact the MLB API

Acceptance criteria

  • A 0.9.x-style default fails the 1.0 release validator
  • A clean wheel install confirms the strict default
  • A clean source-distribution install passes public import smoke tests
  • Explicit compatibility mode is validated
  • Public API and exception imports are validated
  • User-Agent and Session ownership checks continue passing
  • twine check passes for both artifacts
  • Tests cover validator failure messages for incorrect defaults or metadata

Suggested branch

build/v1-release-validation

Start from and target:

release/1.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions