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
107 changes: 107 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
## Summary

<!-- Provide a brief 1-2 sentence summary of what this PR does -->



---

## Features

<!--
List new features or enhancements added in this PR.
Delete this section if not applicable.

Format:
- Brief description of the feature
- Another feature added
-->

-

---

## Bug Fixes

<!--
List bugs that are fixed by this PR.
Delete this section if not applicable.

Format:
- Fixed issue where X happened when Y
- Resolved crash when doing Z
-->

-

---

## Breaking Changes

<!--
List any changes that break backwards compatibility.
Delete this section if not applicable.

Format:
- Changed `--old-flag` to `--new-flag`
- Removed deprecated function `oldFunction()`
- Changed output format from X to Y
-->

-

---

## Checklist

- [ ] I have updated the `version` in `build.gradle.kts` (REQUIRED - see below)
- [ ] I have tested these changes locally
- [ ] I have added/updated tests for new functionality
- [ ] I have updated documentation (if applicable)
- [ ] Breaking changes are clearly documented above

---

<!--

==== IMPORTANT: VERSION UPDATE REQUIRED

Before this PR can be merged, you MUST update the version in
build.gradle.kts to be HIGHER than the current released version.

The PR will fail the version check if you don't update it!

Example in build.gradle.kts:
version = "0.2.0" // Update this to be higher than current release

Semantic Versioning Guide:
- MAJOR version: Breaking changes (e.g., 1.0.0 -> 2.0.0)
- MINOR version: New features, backwards compatible (e.g., 1.0.0 -> 1.1.0)
- PATCH version: Bug fixes (e.g., 1.0.0 -> 1.0.1)


==== PR DESCRIPTION GUIDELINES

1. SUMMARY
- Keep it concise (1-2 sentences)
- Focus on WHAT changed and WHY, not HOW

2. FEATURES / BUG FIXES / BREAKING CHANGES
- Use bullet points for each item
- Start with a verb: "Add", "Fix", "Remove", "Change", "Update"
- Be specific: "Fix crash when input file is empty" not "Fix bug"
- Delete sections that don't apply to your PR

3. EXAMPLES

Good:
- Add `--threads` flag for parallel sequence alignment
- Fix memory leak when processing large FASTA files
- Change `--output` to `--output-dir` for clarity

Bad:
- Added new feature
- Fixed bug
- Updated code

-->
41 changes: 41 additions & 0 deletions .github/RELEASE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
## What's New

${SUMMARY}

## Features

${FEATURES}

## Bug Fixes

${BUG_FIXES}

## Breaking Changes

${BREAKING_CHANGES}

## Installation

Download the appropriate archive for your system:
- `seq_sim-${VERSION}.tar` - Unix/Linux/macOS
- `seq_sim-${VERSION}.zip` - Windows

### Quick Start

```bash
# Extract the archive
tar -xf seq_sim-${VERSION}.tar
# or
unzip seq_sim-${VERSION}.zip

# Run the application
./seq_sim-${VERSION}/bin/seq_sim --help
```

## Requirements

- Java 21 or higher

## Full Changelog

**Full Changelog**: https://github.com/${REPO}/compare/${PREVIOUS_TAG}...${VERSION}
71 changes: 71 additions & 0 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: PR Version Check

on:
pull_request:
branches:
- main
- master

jobs:
version-check:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get version from build.gradle.kts
id: get_version
run: |
VERSION=$(grep -oP 'version\s*=\s*"\K[^"]+' build.gradle.kts)
echo "version=v$VERSION" >> $GITHUB_OUTPUT
echo "PR version: v$VERSION"

- name: Get current latest tag
id: get_current_tag
run: |
CURRENT_TAG=$(git describe --tags --abbrev=0 origin/main 2>/dev/null || git describe --tags --abbrev=0 origin/master 2>/dev/null || echo "v0.0.0")
echo "current_tag=$CURRENT_TAG" >> $GITHUB_OUTPUT
echo "Current released version: $CURRENT_TAG"

- name: Validate version is higher than current release
run: |
CURRENT="${{ steps.get_current_tag.outputs.current_tag }}"
NEW="${{ steps.get_version.outputs.version }}"

# Function to convert version to comparable number
version_to_num() {
local version=$1
# Remove 'v' prefix if present
version=${version#v}
# Split into parts and pad (handles 2 or 3 part versions)
echo "$version" | awk -F. '{ printf "%d%03d%03d", $1, ($2 ? $2 : 0), ($3 ? $3 : 0) }'
}

CURRENT_NUM=$(version_to_num "$CURRENT")
NEW_NUM=$(version_to_num "$NEW")

echo "Comparing versions:"
echo " Current release: $CURRENT ($CURRENT_NUM)"
echo " PR version: $NEW ($NEW_NUM)"

if [ "$NEW_NUM" -le "$CURRENT_NUM" ]; then
echo ""
echo "::error::Version must be updated before merging!"
echo "::error::Current released version is $CURRENT"
echo "::error::Please update the 'version' in build.gradle.kts to be higher than $CURRENT"
echo ""
echo "To fix this, update build.gradle.kts:"
echo ' version = "X.Y.Z" // Must be higher than current'
echo ""
echo "Version guidelines (semantic versioning):"
echo " - MAJOR (X): Breaking changes"
echo " - MINOR (Y): New features (backwards compatible)"
echo " - PATCH (Z): Bug fixes"
exit 1
fi

echo ""
echo "Version check passed: $NEW > $CURRENT"
Loading