Skip to content

Conversation

@JP-Ellis
Copy link
Contributor

📝 Summary

Main change is an overhaul of one of the examples. This it the first example to be adapted and more will be adapted.

In addition, the dependencies were simplified:

  • coverage is included by pytest-cov
  • pytest-rerunfailures won't be needed when the broker has been removed.
  • pytest-xdist testing going back to single threads

🚨 Breaking Changes

🔥 Motivation

To eventually create a comprehensive and pedagogical set of examples.

🔨 Test Plan

CI

🔗 Related issues/PRs

@JP-Ellis JP-Ellis added this to the v3.0.0 milestone Aug 11, 2025
@JP-Ellis JP-Ellis self-assigned this Aug 11, 2025
Copilot AI review requested due to automatic review settings August 11, 2025 03:21
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR starts a comprehensive overhaul of the Pact Python examples, focusing on modernizing the structure and improving pedagogical value. The main change is the introduction of a new aiohttp + Flask example with comprehensive documentation. Additionally, dependencies are simplified by removing redundant testing packages and parallelization that caused issues with the broker-dependent test ordering.

  • Complete replacement of v2 examples with a new http/aiohttp_and_flask example
  • Removal of pytest-xdist, pytest-rerunfailures, and coverage dependencies to simplify testing
  • Addition of comprehensive documentation and standalone example structure

Reviewed Changes

Copilot reviewed 21 out of 22 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pyproject.toml Removes redundant testing dependencies across multiple dependency groups
mkdocs.yml Adds aiohttp and Flask documentation links for cross-referencing
examples/v2/ Complete removal of old v2 example files (consumer, provider tests and implementations)
examples/http/aiohttp_and_flask/ New comprehensive example with consumer, provider, tests, and documentation
examples/conftest.py Simplifies configuration by removing broker setup and xdist warnings
examples/README.md Updates to reflect new example structure and improved organization
examples/.ruff.toml Reorganizes linting rules for better test file handling

@JP-Ellis JP-Ellis force-pushed the chore/examples-overhaul branch 6 times, most recently from f69a983 to c097058 Compare August 11, 2025 07:40
Adapt the old v2 HTTP example to one using `aiohttp` and `flask`.

Signed-off-by: JP-Ellis <josh@jpellis.me>
- `coverage` is included by `pytest-cov`
- `pytest-rerunfailures` won't be needed when the broker has been
  removed.
- `pytest-xdist` testing going back to single threads

Signed-off-by: JP-Ellis <josh@jpellis.me>
Run each example in its own standalone venv.

Signed-off-by: JP-Ellis <josh@jpellis.me>
So that they are in line with the updated Ruff linting rules.

Signed-off-by: JP-Ellis <josh@jpellis.me>
Signed-off-by: JP-Ellis <josh@jpellis.me>
@JP-Ellis JP-Ellis force-pushed the chore/examples-overhaul branch from c097058 to 58691ef Compare August 11, 2025 09:30
@JP-Ellis JP-Ellis merged commit d9ced72 into main Aug 11, 2025
61 checks passed
@JP-Ellis JP-Ellis deleted the chore/examples-overhaul branch August 11, 2025 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants