Skip to content
Open
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
70 changes: 70 additions & 0 deletions .github/workflows/auto-bump-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Auto-bump Version on Merge

# This triggers ONLY when code is pushed directly to master
# (which includes when a Pull Request is merged into it).
on:
push:
branches:
- master # If your default branch is 'main', change this to 'main'

jobs:
bump-version:
runs-on: ubuntu-latest
permissions:
contents: write # Required so the bot can push the new commit to your repo
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Calculate and Update Version
run: |
Comment on lines +21 to +22
Copy link
Contributor

Choose a reason for hiding this comment

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

If a PR already update the version, this would do it twice, no?

# 1. Extract current version from the DESCRIPTION file
CURRENT_VERSION=$(grep -i "^Version:" DESCRIPTION | awk '{print $2}')

# SECURITY CHECK: Ensure it strictly matches a version number format (e.g., 0.17.0 or 0.17.0.9000)
if [[ ! "$CURRENT_VERSION" =~ ^[0-9]+(\.[0-9]+)+$ ]]; then
echo "❌ Error: Invalid version format in DESCRIPTION: '$CURRENT_VERSION'"
exit 1
fi

# 2. Split the version string by periods into an array
IFS='.' read -r -a VERSION_PARTS <<< "$CURRENT_VERSION"

# 3. Increment the very last number by 1
LAST_INDEX=$((${#VERSION_PARTS[@]} - 1))
VERSION_PARTS[$LAST_INDEX]=$((VERSION_PARTS[$LAST_INDEX] + 1))

# 4. Stitch the version string back together
NEW_VERSION=$(IFS='.'; echo "${VERSION_PARTS[*]}")

echo "Bumping version from $CURRENT_VERSION to $NEW_VERSION"

# 5. Safely replace the old version with the new version in the file
sed -i "s/^Version: [0-9.]\+/Version: $NEW_VERSION/i" DESCRIPTION

# 6. Securely pass the new version to the next step for the commit message
cat <<EOF >> "$GITHUB_ENV"
NEW_VERSION=$NEW_VERSION
EOF

- name: Commit and Push
run: |
# Configure Git to act as the official GitHub Actions bot
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"

# Stage the changed file
git add DESCRIPTION

# Check if there are actually changes to commit (prevents errors if version didn't change)
if ! git diff-index --quiet HEAD; then
# The [skip ci] flag is CRITICAL. It tells GitHub NOT to trigger
# another workflow run from this automated commit, preventing infinite loops.
git commit -m "chore: auto-bump version to ${{ env.NEW_VERSION }} [skip ci]"
git push
echo "✅ Successfully bumped version and pushed to master."
else
echo "No changes needed."
fi
41 changes: 41 additions & 0 deletions .github/workflows/remind-news.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Remind NEWS.md Update

# We only run this when the PR is first opened so the bot doesn't
# spam the contributor with comments on every single new commit.
on:
pull_request:
types: [opened]

jobs:
remind-news:
runs-on: ubuntu-latest
permissions:
pull-requests: write # Required so the bot can leave a comment
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Check if NEWS.md was modified
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Get the list of changed files
CHANGED_FILES=$(git diff --name-only origin/${{ github.base_ref }} HEAD)

# Check if NEWS.md is in that list
if echo "$CHANGED_FILES" | grep -q "^NEWS\.md$"; then
echo "✅ NEWS.md was updated. No reminder needed."
exit 0
else
echo "⚠️ NEWS.md not updated. Posting a friendly reminder..."

# Use the GitHub CLI to post a comment directly to the PR
gh pr comment ${{ github.event.pull_request.number }} --body "👋 **Friendly reminder:** It looks like \`NEWS.md\` wasn't updated in this Pull Request.

If your changes include bug fixes, new features, or UI tweaks, please consider adding a quick note to the \`# jaspYourModule (development version)\` section so our users know about your awesome work! *(If this is just a minor typo fix, feel free to ignore this message.)*"

# We exit with 0 (success) so the check turns green and does NOT block the PR
Comment on lines +34 to +39
Copy link
Contributor

Choose a reason for hiding this comment

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

is this a better approach than actions/github-script?

exit 0
fi
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: jaspModuleTemplate
Type: Package
Type: Package
Title: A module for JASP
Version: 0.1.0
Version: 0.1.2
Date: 2020-10-15
Author: JASP Team
Website: jasp-stats.org
Expand Down
41 changes: 41 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# jaspModuleTemplate Changelog

> **HOW TO READ AND UPDATE THIS CHANGELOG:**
>
> This document follows a modified [Keep a Changelog](https://keepachangelog.com/) format adapted for the R/JASP ecosystem. Releases are listed in reverse chronological order (newest first).
> As an example see [jaspModuleTemplate](https://github.com/RensDofferhoff/jaspModuleTemplate/blob/master/NEWS.md)
> * **Adding New Changes (For Contributors):** All new commits should be logged at the very top of the file under the `# jaspModuleTemplate (development version)` header. Place your bullet point under the appropriate category (`## Added`, `## Fixed`, etc.).
Copy link
Contributor

Choose a reason for hiding this comment

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

how about we use : feat., fix., enh., test.,. chore...in NEWS.md. in this way we can pick out the major user-visible change in main JASP's release news.

Copy link
Contributor

Choose a reason for hiding this comment

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

I actually like the taxonomy

> * **Issue References:** Please reference the relevant GitHub Issue (if any) at the end of your line (e.g., `(Issue #123)`).
> * **Format Categories:** > * **Added:** New template features, QML examples, or build tools.
> * **Changed:** Updates to default configurations, boilerplate code, or dependencies.
> * **Fixed:** Bug fixes in the build pipeline, R wrappers, or QML layouts.
> * **Deprecated / Removed:** Outdated template components or legacy code.

---

# jaspModuleTemplate (development version)

## Added
* Added a "Raincloud Plot" option to visualize data distributions alongside summary statistics (Issue #45).
* Added Welch's t-test option

## Changed
* Reorganized the "Assumption Checks" menu to group homogeneity and normality tests together for better usability (Issue #51).

## Fixed
* Fixed a fatal error where the analysis would crash if a user assigned a variable containing entirely missing values (`NA`) to the grouping factor (Issue #53).

---

# jaspModuleTemplate 0.17.0

## Added
* Included support for robust standard errors (HC3 estimators) via the `sandwich` package (Issue #39).
* Added full interface translations for German and French (Issue #38).

## Changed
* The default color palette for all plots has been updated to be colorblind-friendly (Issue #43).
* The main results table now defaults to displaying 95% Confidence Intervals for effect sizes.

## Deprecated
* The legacy `jaspCreateLegacyPlot()` function used for backwards compatibility with older state files is marked for removal. Module developers should migrate to the modern plotting API (Issue #30).custom QML components (Issue #30).
Comment on lines +16 to +41
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this contain the actual updates jaspModuleTemplate? :p