Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Install uv
uses: astral-sh/setup-uv@v3

- name: Set up Python
run: uv python install 3.13
- name: Set up Python
run: uv python install 3.13

- name: Build package
run: uv build
- name: Build package
run: uv build

- name: Publish package
run: uv publish --token=${{ secrets.PYPI_API_KEY }}
- name: Publish package
run: uv publish --token=${{ secrets.PYPI_API_KEY }}
28 changes: 14 additions & 14 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Install uv
uses: astral-sh/setup-uv@v3

- name: Set up Python
run: uv python install 3.13
- name: Set up Python
run: uv python install 3.13

- name: Build Documentation
run: |
make docs/build
- name: Build Documentation
run: |
make docs/build

- name: Deploy documentation
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/site
- name: Deploy documentation
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/site
56 changes: 28 additions & 28 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,31 @@ jobs:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Install python
run: uv python install ${{ matrix.python-version }}

- name: Sync with demo
run: uv sync --extra=demo

- name: Check Quality
run: make qa/full

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
files: ./.coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
if: ${{ !cancelled() }}

- name: Upload test results to Codecov
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./.junit.xml
if: ${{ !cancelled() }}
- name: Checkout repository
uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Install python
run: uv python install ${{ matrix.python-version }}

- name: Sync with demo
run: uv sync --extra=demo

- name: Check Quality
run: make qa/full

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
files: ./.coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
if: ${{ !cancelled() }}

- name: Upload test results to Codecov
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./.junit.xml
if: ${{ !cancelled() }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,5 @@ dmypy.json

# snapcraft
/*.snap
.mutmut-cache
mutants/
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
repos:
- repo: local
hooks:
- id: qa-full
name: Run full QA suite
entry: make qa/full
language: system
pass_filenames: false
always_run: true
stages: [pre-push]
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,34 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## v7.4.0 - 2026-01-28

### Added
* Added `retry()` and `retry_async()` decorators with exponential backoff, jitter, and selective exception retry
* Added Protocol types for all callback parameters (`ExceptionCallback`, `DoExceptParamsCallback`, `NoArgCallback`, `AsyncDoExceptParamsCallback`, `AsyncNoArgCallback`, `RetryCallback`)
* Added `Buzz.retry()` and `Buzz.retry_async()` class methods
* Added pre-commit hooks configured to run `make qa/full`
* Added YAML linting with yamllint (inline config in Makefile)
* Added mutation testing with mutmut via `make qa/mutate` (not part of regular QA)
* Added `CONTRIBUTING.md` and `CODE_OF_CONDUCT.md`
* Added `make qa/mutate` target for mutation testing
* Added colored help output to Makefile with section headers
* Added `publish` target to Makefile for tagging releases
* Added import auto-sorting to `make qa/format`

### Changed
* Made `message` parameter required positional (first parameter) in `retry()` and `retry_async()`
* Updated all function signatures in `tools.py` and `base.py` to use Protocol types for callbacks
* Used position-only parameters for Protocol callbacks to allow flexible parameter naming
* Reformatted Makefile to match consistent project pattern

### Fixed
* Fixed all basedpyright warnings in tests (added `override` decorators, type hints, renamed unused params)
* Fixed YAML indentation issues in GitHub Actions workflows

### Removed
* Removed dead `_check_kwargs()` method and its test (was never called)

## v7.3.0 - 2025-04-21
* Added the `ensure_type()` function
* Some docs updates
Expand Down
43 changes: 43 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Code of Conduct

## Welcome

Contributors and users of py-buzz come from folks from around the globe
with a diverse set of skills, personalities, and experiences. It is through
these differences that our community experiences great successes and continued
growth. When you're working with other contributors or users, we expect you
to follow these guidelines which help steer our interactions and strive to keep
the development of py-buzz positive, successful, and growing.

## Be Open

Contributors to py-buzz are expected to be open. They should be open to
collaboration, whether it's on issues, pull-requests, or otherwise. We're
receptive to constructive comment and criticism, as the experiences and skill
sets of other members contribute to the whole of our efforts. We're accepting of
all who wish to take part in our activities, fostering an environment where
anyone can participate and everyone can make a difference.

## Be Considerate

Contributors to py-buzz are expected to be considerate of their peers.
We're thoughtful when addressing the efforts of others, keeping in mind that
often times the labor was completed simply for the good of the community. We're
attentive in our communications, whether in person or online, and we're tactful
when approaching differing views.

## Be Respectful

Contributors to py-buzz are expected to be respectful. We're respectful
of others, their positions, their skills, their commitments, and their efforts.
We're respectful of competing packages and others in the Python
community at large. We're respectful of the processes set forth in the Python
community, and we work within them. When we disagree, we are courteous in
raising our issues.

## Conclusion

Overall, we're good to each other. Contribution is done on a voluntary basis,
and folks are expected to be good and decent in their conduct. Any disputes
will be resolved by the maintainers and those that do not wish to follow the
guidelines will be asked to stop contributing.
112 changes: 112 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# Contributing Guidelines

## Security Concerns

Before any further discussion, a point about security needs to be addressed.
**If you find a serious security vulnerability that could affect current users,
please report it to maintainers via email or some form of private
communication**. For other issue reports, see below.

## Thanks!

First, thank you for your interest in contributing to py-buzz! Even
though this is a small Python package project, it takes a bit of work to keep
it maintained. All contributions help and improve the package.

## Contact Us

The maintainers of py-buzz can be reached most easily via email:

* Tucker Beck <tucker.beck@gmail.com>

## Conduct

Everyone's conduct should be respectful and friendly. For most folks, these
things don't need to be spelled out. However, to establish a baseline of
acceptable conduct, the py-buzz project expects contributors to adhere
to the [Code of Conduct](CODE_OF_CONDUCT.md).
Any issues working with other contributors should be reported to the maintainers.

## Contribution Recommendations

### Github Issues

The first and primary source of contributions is opening issues on github.
Please feel free to open issues when you find problems or wish to request a
feature. All issues will be treated seriously and taken under consideration.
However, the maintainers may disregard/close issues at their discretion.

Issues are most helpful when they contain specifics about the problem they
address. Specific error messages, references to specific lines of code,
environment contexts, and such are extremely helpful.

### Code Contributions

Code contributions should be submitted via pull-requests on github. Project
maintainers will review pull-requests and may test new features out. All
merge requests should come with commit messages that describe the changes as
well as a reference to the issue that the code addresses.

**All commits should include the issue #**

Commit messages should follow this format:

```
Issue #56: Fixed gizmo component that was parfolecting

The parfolection happening in the gizmo component was causing a vulnerability
in the anti-parfolection checks during the enmurulation process.

This was addressed by caching the results of parfolection prior to
enmurulation.

Also:
* Added and updated unit tests
* Added documentation
* Cleaned up some code
```

Code contributions should follow best-practices where possible. Use the
[Zen of Python](https://www.python.org/dev/peps/pep-0020/) as a guideline.
All code must stick to style guidelines enforced by ruff.

Adding additional dependencies should be limited except where needed
functionality can be easily added through pip packages. Please include
dependencies that are only applicable to development and testing in the
dev dependency list. Packages should only be added to the dependency lists if:

* They are actively maintained
* They are widely used
* They are hosted on pypi.org
* They have source code hosted on a public repository (github, gitlab, bitbucket, etc)
* They include tests in their repositories
* They include a software license

### Documentation

Help with documentation is **always** welcome.

The py-buzz project uses [sphinx](http://www.sphinx-doc.org/en/master/) for document generation.

Documentation lives in the `docs` subdirectory. Added pages should be
referenced from the table of contents.

Documentation should be clear, include examples where possible, and reference
source material as much as possible.

Documentation through code comments should be kept to a minimum. Code should
be as self-documenting as possible. If a section of code needs some explanation,
the bulk of it should be presented as sphinx-compatible
[docstrings](https://www.python.org/dev/peps/pep-0257/) for methods, modules,
and classes.

## Non-preferred Contributions

There are some types of contribution that aren't as helpful and are not as
welcome:

* Complaints without suggestion
* Criticism about the overall approach of the package
* Copied code without attribution
* Promotion of personal packages/projects without due need
* Sarcasm/ridicule of contributions or design choices
Loading
Loading