diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index aacda65a..d4c06c0d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -75,6 +75,8 @@ repos: rev: v0.11.0.1 hooks: - id: shellcheck + # Exclude zsh scripts (unsupported by shellcheck) + exclude: ^cicd_utils/find-unmentioned-prs\.sh$ # mdformat is not enabled by default, but can be run manually with: # pre-commit run mdformat --all-files --hook-stage manual diff --git a/MANIFEST.in b/MANIFEST.in index a1de031e..13c169dc 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -33,7 +33,7 @@ prune docs/api/public # Misc recursive-include .github *.yml *.yaml -recursive-include cicd_utils README.md *.py +recursive-include cicd_utils README.md *.py *.sh recursive-include misc *.py *.ipynb *.txt *.png recursive-include requirements *.txt recursive-include tests *.py diff --git a/cicd_utils/find-unmentioned-prs.sh b/cicd_utils/find-unmentioned-prs.sh new file mode 100755 index 00000000..4f54ab3d --- /dev/null +++ b/cicd_utils/find-unmentioned-prs.sh @@ -0,0 +1,81 @@ +#!/usr/bin/env zsh + +# Script to find PRs not mentioned in the changelog +# +# Disclaimer: This script was auto-generated by Claude Code. +# +# Usage: ./cicd_utils/find-unmentioned-prs.sh +# +# Note: Take a look at the `all_prs=($(gh pr list ...))` line to see all the filters used to fetch PRs. +# +# Requirements: +# * GitHub CLI (gh) must be installed and authenticated. +# * jq must be installed for JSON parsing. +# * The changelog file must exist at ./docs/reference/changelog.md +# * The script assumes the main branch is named 'main' +# * PRs are referenced in the changelog using the pattern {gh-pr}`PR-NUMBER` +# * The script should be run from the root of the repository + +set -e + +CHANGELOG_FILE="./docs/reference/changelog.md" + +# Check if changelog file exists +if [[ ! -f "$CHANGELOG_FILE" ]]; then + echo "Error: Changelog file not found at $CHANGELOG_FILE" + exit 1 +fi + +# Check if gh CLI is available +if ! command -v gh &> /dev/null; then + echo "Error: GitHub CLI (gh) is not installed" + exit 1 +fi + +echo "🔍 Finding PRs not mentioned in changelog..." +echo + +# Get all PR numbers from GitHub (both open and closed) +echo "📥 Fetching all PRs from GitHub..." +all_prs=($(gh pr list --state merged --base main --label 'skip news' --search 'merged:>2025-09-01' --limit 100 --json number --jq '.[].number')) +if [[ ${#all_prs[@]} -eq 0 ]]; then + echo "No PRs found in this repository." + exit 0 +fi + +echo "Found ${#all_prs[@]} total PRs" + +# Extract PR numbers mentioned in changelog using the pattern {gh-pr}`PR-NUMBER` +echo "📖 Parsing changelog for mentioned PRs..." +mentioned_prs=($(grep -o '{gh-pr}`[0-9]\+`' "$CHANGELOG_FILE" | sed 's/{gh-pr}`\([0-9]\+\)`/\1/' | sort -n | uniq)) + +echo "Found ${#mentioned_prs[@]} PRs mentioned in changelog" +echo + +# Find PRs not mentioned in changelog +unmentioned_prs=() + +for pr in "${all_prs[@]}"; do + if [[ ! " ${mentioned_prs[*]} " =~ " $pr " ]]; then + unmentioned_prs+=($pr) + fi +done + +# Display results +if [[ ${#unmentioned_prs[@]} -eq 0 ]]; then + echo "✅ All PRs are mentioned in the changelog!" +else + echo "📋 PRs not mentioned in changelog (${#unmentioned_prs[@]} total):" + echo + + for pr in "${unmentioned_prs[@]}"; do + # Get PR title and URL for better readability + pr_info=$(gh pr view "$pr" --json title,url --jq '{title: .title, url: .url}') + pr_title=$(echo "$pr_info" | jq -r '.title') + pr_url=$(echo "$pr_info" | jq -r '.url') + + echo " #$pr: $pr_title" + echo " $pr_url" + echo + done +fi diff --git a/docs/development/release_process.md b/docs/development/release_process.md index 32631f25..2d2f4927 100644 --- a/docs/development/release_process.md +++ b/docs/development/release_process.md @@ -6,7 +6,7 @@ You need to have push-access to the project's repository to make releases. Therefore, the following release steps are intended to be used as a reference for maintainers or [collaborators](https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-user-account-settings/permission-levels-for-a-personal-account-repository#collaborator-access-for-a-repository-owned-by-a-personal-account) with push-access to the repository. ::: -1. Review the **`## Unreleased changes`** section at the top of the {repo-file}`docs/reference/changelog.md` file and, if necessary, group and/or split entries into relevant subsections (e.g., _Features_, _Docs_, _Bugfixes_, _Security_, etc.). Take a look at previous release notes for guidance and try to keep the format consistent. +1. Review the **`## Unreleased changes`** section at the top of the {repo-file}`docs/reference/changelog.md` file and, if necessary, group and/or split entries into relevant subsections (e.g., _Features_, _Docs_, _Bugfixes_, _Security_, etc.). Take a look at previous release notes for guidance and try to keep the format consistent. You can also use the `./cicd_utils/find-unmentioned-prs.sh` helper script to find merged PRs that were not mentioned in the changelog yet. 2. [Review](https://github.com/tpvasconcelos/ridgeplot/compare) new usages of `.. versionadded::`, `.. versionchanged::`, and `.. deprecated::` directives that were added to the documentation since the last release. If necessary, update the version numbers in these directives to reflect the new release version. * You can determine the latest release version by running `git describe --tags --abbrev=0` on the `main` branch. Based on this, you can determine the next release version by incrementing the relevant _MAJOR_, _MINOR_, or _PATCH_ numbers. 3. **IMPORTANT:** Remember to switch to the `main` branch and pull the latest changes before proceeding. diff --git a/docs/reference/changelog.md b/docs/reference/changelog.md index 9fd16e67..862a85cb 100644 --- a/docs/reference/changelog.md +++ b/docs/reference/changelog.md @@ -13,6 +13,19 @@ Unreleased changes - Deprecated the `show_yticklabels` argument in favor of the new more general and flexible `row_labels` argument ({gh-pr}`333`) +### CI/CD + +- Add `./cicd_utils/find-unmentioned-prs.sh` helper script to find merged PRs that were not mentioned in the changelog yet ({gh-pr}`334`) +- Bump actions/first-interaction from 1 to 3 ({gh-pr}`331`) +- Bump actions/checkout from 4 to 5 ({gh-pr}`330`) +- Bump actions/download-artifact from 4 to 5 ({gh-pr}`329`) +- Bump sigstore/gh-action-sigstore-python from 3.0.0 to 3.0.1 ({gh-pr}`326`) +- pre-commit autoupdate ({gh-pr}`324`) + +### Dependencies + +- Remove `importlib_metadata` usage from `conf.py` ({gh-pr}`332`) + --- 0.3.2 @@ -23,6 +36,10 @@ Unreleased changes - Fix regression tests for Plotly 6.0+ by updating the JSON test artifacts ({gh-pr}`313`) - Add an `OFFLINE`-mode option to the Makefile and make `uv` compulsory for local development ({gh-pr}`322`) +### Documentation + +- Bump the Plotly JS version used in Sphinx from 2.35.2 to 3.0.0 ({gh-pr}`317`) + --- 0.3.1