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
54 changes: 27 additions & 27 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
---
name: Bug Fix
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Additional context**
Add any other context about the problem here.
---
name: Bug Fix
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.
42 changes: 21 additions & 21 deletions .github/ISSUE_TEMPLATE/new_issue.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
---
name: New Issue
about: Create a new issue and provide enough information to have a discussion
title: ''
labels: ''
assignees: ''
---
## Description
A clear and concise description of what the problem is.
## Considerations
Make sure not to forget about these.
## Sub-tasks
List any sub-tasks that might help create a clear flow or sub-issues.
## Definition of Done
This might help in cases when what is to be delivered is more than just one
piece of functional code.
---
name: New Issue
about: Create a new issue and provide enough information to have a discussion
title: ''
labels: ''
assignees: ''

---

## Description
A clear and concise description of what the problem is.

## Considerations
Make sure not to forget about these.

## Sub-tasks
List any sub-tasks that might help create a clear flow or sub-issues.

## Definition of Done
This might help in cases when what is to be delivered is more than just one
piece of functional code.
44 changes: 22 additions & 22 deletions .github/actions/pre-commit/action.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
name: pre-commit
description: run pre-commit
inputs:
extra_args:
description: options to pass to pre-commit run
required: false
default: '--all-files'
runs:
using: composite
steps:
- run: python -m pip install pre-commit
shell: bash
- run: python -m pip freeze --local
shell: bash
- uses: actions/cache@v4
with:
path: |
~/.cache/pre-commit
~/.cache/R/renv
key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
- run: pre-commit run --show-diff-on-failure --color=always ${{ inputs.extra_args }}
shell: bash
name: pre-commit
description: run pre-commit
inputs:
extra_args:
description: options to pass to pre-commit run
required: false
default: '--all-files'
runs:
using: composite
steps:
- run: python -m pip install pre-commit
shell: bash
- run: python -m pip freeze --local
shell: bash
- uses: actions/cache@v4
with:
path: |
~/.cache/pre-commit
~/.cache/R/renv
key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
- run: pre-commit run --show-diff-on-failure --color=always ${{ inputs.extra_args }}
shell: bash
238 changes: 119 additions & 119 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,119 +1,119 @@
name: Build Release Distribution
on:
push:
tags:
# below is same as ^\d{4}\.\d{2}\.\d{2}$ seems workflows use simpler regex
- '[0-9][0-9][0-9][0-9].[0-9][0-9].[0-9][0-9].[0-9]+'
jobs:
build-and-release:
name: Build and Release
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Checkout release
run: |
git fetch origin release
git checkout release
- name: Determine Version
id: get-version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION="${GITHUB_REF#refs/tags/}"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
- name: Determine If Tag Is From Release
id: is-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG_COMMIT=$(git rev-parse ${{ github.ref }})
BRANCHES=$(git branch -r --contains "$TAG_COMMIT")
if echo "$BRANCHES" | grep -q 'origin/release'; then
echo "should_continue=true" >> "$GITHUB_OUTPUT"
else
echo "Exiting Workflow: Tag is not from release branch"
echo "IF intending to create a release from tag follow steps under 'Creating A Release' in the README file"
echo "should_continue=false" >> "$GITHUB_OUTPUT"
fi
- name: Setup Python
if: steps.is-release.outputs.should_continue == 'true'
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install Poetry
if: steps.is-release.outputs.should_continue == 'true'
run: |
curl -sSL https://install.python-poetry.org | python3 -
poetry --version
- name: Install Dependencies
if: steps.is-release.outputs.should_continue == 'true'
run: |
poetry install --no-root --with dev
- name: Build Wheel
if: steps.is-release.outputs.should_continue == 'true'
run: |
poetry build
- name: Create Release
if: steps.is-release.outputs.should_continue == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create ${{ github.ref }} dist/* --generate-notes --latest
- name: Update pyproject.toml Version
if: steps.is-release.outputs.should_continue == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION=${{ steps.get-version.outputs.version }}
sed -i.bak -E "s/^version\s*=\s*\"[^\"]+\"/version = \"${VERSION}\"/" pyproject.toml
- name: Update Change Log
if: steps.is-release.outputs.should_continue == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION=${{ steps.get-version.outputs.version }}
REPO_URL="https://github.com/${{ github.repository }}"
RELEASE_URL="$REPO_URL/releases/tag/$VERSION"
awk -v tag="## [$VERSION]" -v url="$RELEASE_URL" '
!done && /---/ {
print $0
print ""
print tag
print url
done = 1
next
}
{ print $0 }
' changelog.md > temp.md && mv temp.md changelog.md
- name: Commit Change Log and pyproject.toml Updates
if: steps.is-release.outputs.should_continue == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION=${{ steps.get-version.outputs.version }}
git config user.name "github-actions"
git config user.email "github-actions@users.noreply.github.com"
git add pyproject.toml changelog.md
git commit -m "Update Version to ${{ steps.get-version.outputs.version }}"
git push origin release
name: Build Release Distribution

on:
push:
tags:
# below is same as ^\d{4}\.\d{2}\.\d{2}$ seems workflows use simpler regex
- '[0-9][0-9][0-9][0-9].[0-9][0-9].[0-9][0-9].[0-9]+'

jobs:
build-and-release:
name: Build and Release
runs-on: ubuntu-latest

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

- name: Checkout release
run: |
git fetch origin release
git checkout release

- name: Determine Version
id: get-version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION="${GITHUB_REF#refs/tags/}"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"

- name: Determine If Tag Is From Release
id: is-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG_COMMIT=$(git rev-parse ${{ github.ref }})
BRANCHES=$(git branch -r --contains "$TAG_COMMIT")

if echo "$BRANCHES" | grep -q 'origin/release'; then
echo "should_continue=true" >> "$GITHUB_OUTPUT"
else
echo "Exiting Workflow: Tag is not from release branch"
echo "IF intending to create a release from tag follow steps under 'Creating A Release' in the README file"
echo "should_continue=false" >> "$GITHUB_OUTPUT"
fi

- name: Setup Python
if: steps.is-release.outputs.should_continue == 'true'
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Install Poetry
if: steps.is-release.outputs.should_continue == 'true'
run: |
curl -sSL https://install.python-poetry.org | python3 -
poetry --version

- name: Install Dependencies
if: steps.is-release.outputs.should_continue == 'true'
run: |
poetry install --no-root --with dev

- name: Build Wheel
if: steps.is-release.outputs.should_continue == 'true'
run: |
poetry build

- name: Create Release
if: steps.is-release.outputs.should_continue == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create ${{ github.ref }} dist/* --generate-notes --latest

- name: Update pyproject.toml Version
if: steps.is-release.outputs.should_continue == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION=${{ steps.get-version.outputs.version }}

sed -i.bak -E "s/^version\s*=\s*\"[^\"]+\"/version = \"${VERSION}\"/" pyproject.toml

- name: Update Change Log
if: steps.is-release.outputs.should_continue == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION=${{ steps.get-version.outputs.version }}
REPO_URL="https://github.com/${{ github.repository }}"
RELEASE_URL="$REPO_URL/releases/tag/$VERSION"

awk -v tag="## [$VERSION]" -v url="$RELEASE_URL" '
!done && /---/ {
print $0
print ""
print tag
print url
done = 1
next
}
{ print $0 }
' changelog.md > temp.md && mv temp.md changelog.md

- name: Commit Change Log and pyproject.toml Updates
if: steps.is-release.outputs.should_continue == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION=${{ steps.get-version.outputs.version }}

git config user.name "github-actions"
git config user.email "github-actions@users.noreply.github.com"
git add pyproject.toml changelog.md
git commit -m "Update Version to ${{ steps.get-version.outputs.version }}"
git push origin release
Loading