Skip to content

Latest commit

 

History

History
86 lines (63 loc) · 2.95 KB

File metadata and controls

86 lines (63 loc) · 2.95 KB

Development

Prerequisites

  • Make
  • Python 3.10+
  • Pip

Makefile targets

  • make run-type-check - type checks source code (runs uv run ty check wikipediaapi/)
  • make run-ruff - lints and checks formatting (runs ruff check and ruff format --check)
  • make requirements-all - install all requirements * make requirements - install package requirements * make requirements-dev - install development requirements
  • make run-tests - run unit tests (pytest)
  • make run-tests-integration - run VCR integration tests (pytest)
  • make run-coverage - run code coverage (pytest-cov)
  • make pypi-html - generates single HTML documentation into pypi-doc.html
  • make html - generates HTML documentation similar to RTFD into folder _build/html/
  • make prepare-release VERSION='1.2.3' - bumps version files, runs full pre-release checks, and opens a PR from a release/1.2.3 branch
  • make create-github-release VERSION='1.2.3' - after the PR is merged, creates a GitHub Release with auto-generated notes, triggering PyPI publish

Releasing a New Version

During development — as each PR is merged, add a bullet point describing the change under the Unreleased section at the top of CHANGES.rst:

Unreleased
----------

* Add support for foo - `PR 123`_

.. _PR 123: https://github.com/martin-majlis/Wikipedia-API/pull/123

When ready to release:

  1. From a clean master branch, run:

    make prepare-release VERSION='1.2.3'
    

    This will:

    • Validate the version format and that it is greater than the current version
    • Check that CHANGES.rst has an Unreleased section
    • Run the full pre-release check suite (tests, type checks, linting, examples)
    • Create a release/1.2.3 branch
    • Rename Unreleased1.2.3 in CHANGES.rst and bump all version files
    • Commit, push the branch, and open a pull request
  2. Review and merge the pull request.

  3. After the PR is merged, create the GitHub Release:

    make create-github-release VERSION='1.2.3'
    

    This creates a v1.2.3 tag and GitHub Release with auto-generated release notes (based on merged PRs since the last release), which triggers the release.yml workflow to publish the package to PyPI.

Usage Statistics

Underlying API