Skip to content

revamp workflows #319

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 58 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
6937349
Bump version to v0.10.1
viseshrp Apr 16, 2025
b752da3
Update dependabot.yml
viseshrp Jun 16, 2025
de7091a
update templates
viseshrp Jun 16, 2025
6a3ef62
Create vhs.yml
viseshrp Jun 16, 2025
caf777b
Create validate-codecov-config.yml
viseshrp Jun 16, 2025
5c751ec
Create base action.yml
viseshrp Jun 16, 2025
da43518
Create codeql.yml
viseshrp Jun 16, 2025
90bba94
Create automerge.yml
viseshrp Jun 16, 2025
df24fef
Create create-draft-release.yml
viseshrp Jun 16, 2025
c3f11f5
Create pre-commit-autoupdate.yml
viseshrp Jun 16, 2025
9fe4c55
use scripts dir
viseshrp Jun 16, 2025
8db2cb9
Update README.rst
viseshrp Jun 16, 2025
9dd922d
use README.md
viseshrp Jun 16, 2025
3e460a5
revamp actions
viseshrp Jun 17, 2025
23e8e8b
Create .cruft.json
viseshrp Jun 17, 2025
f8bec77
add changelog
viseshrp Jun 17, 2025
5ee0fb6
Update codecov.yml
viseshrp Jun 17, 2025
f7f7e67
Create tox.ini
viseshrp Jun 17, 2025
4ac3632
add CONTRIBUTING.md
viseshrp Jun 17, 2025
1eeb3c0
Delete vhs.yml
viseshrp Jun 17, 2025
86a9da4
Update README.md
viseshrp Jun 17, 2025
8b4bb67
Update .pre-commit-config.yaml
viseshrp Jun 17, 2025
7ba5f34
Create codespell.txt
viseshrp Jun 17, 2025
95bb8c0
Update pyproject.toml
viseshrp Jun 17, 2025
614b0eb
Delete codespell.txt
viseshrp Jun 17, 2025
3d53b92
Update pyproject.toml
viseshrp Jun 17, 2025
0177099
remove setup.py
viseshrp Jun 17, 2025
985799a
add version file
viseshrp Jun 17, 2025
0d47ad6
make scripts a module
viseshrp Jun 17, 2025
114b905
Update uv.lock
viseshrp Jun 17, 2025
ee4f7da
add add-license-headers hook
viseshrp Jun 17, 2025
4f3f04f
cleanup
viseshrp Jun 17, 2025
1ec49a5
convert setup.py to a build hook
viseshrp Jun 17, 2025
9e0f046
Update pyproject.toml
viseshrp Jun 18, 2025
aa11acb
use github_token
viseshrp Jun 18, 2025
efa1d5a
Update uv.lock
viseshrp Jun 18, 2025
8ce6394
Update README.md
viseshrp Jun 18, 2025
9402f55
Merge branch 'release/0.10' into vrajendr/uv
viseshrp Jun 18, 2025
39d5f7e
Merge branch 'main' into vrajendr/uv
viseshrp Jun 18, 2025
d820f2e
Update uv.lock
viseshrp Jun 18, 2025
9223591
Update main.yml
viseshrp Jun 18, 2025
59062a3
Update uv.lock
viseshrp Jun 19, 2025
153013e
remove ansys action
viseshrp Jun 19, 2025
80cbd1f
fix eof
viseshrp Jun 19, 2025
a9bf874
cleanup docs
viseshrp Jun 19, 2025
7672116
fix styling
viseshrp Jun 19, 2025
95636e6
fix actions
viseshrp Jun 19, 2025
e186849
fix actions
viseshrp Jun 19, 2025
636ba5a
refactor actions
viseshrp Jun 19, 2025
e2179be
code style
viseshrp Jun 19, 2025
b67b9a9
fix actions
viseshrp Jun 19, 2025
08e51f4
include extras in sync
viseshrp Jun 19, 2025
f3815c9
Update tox.ini
viseshrp Jun 19, 2025
847cbae
Merge branch 'main' into vrajendr/uv
viseshrp Jun 25, 2025
5971339
Update uv.lock
viseshrp Jun 25, 2025
17c5b07
Update examples.rst
viseshrp Jun 25, 2025
ca58841
temporary styling config
viseshrp Jun 25, 2025
76bd102
fix styles
viseshrp Jun 25, 2025
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
23 changes: 23 additions & 0 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"template": "https://github.com/viseshrp/yapc",
"commit": "65c97a846c9245a9924e1c6aa7740b35b96a32ab",
"checkout": null,
"context": {
"cookiecutter": {
"author": "ANSYS, Inc.",
"email": "[email protected]",
"github_username": "ansys",
"pypi_username": "ansys",
"project_name": "pydynamicreporting",
"project_slug": "pydynamicreporting",
"project_description": "This is a template repository for Python projects that use uv for their dependency management.",
"cli_tool": "n",
"codecov": "y",
"git_init": "n",
"github_actions": "y",
"_template": "https://github.com/viseshrp/yapc",
"_commit": "65c97a846c9245a9924e1c6aa7740b35b96a32ab"
}
},
"directory": null
}
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
blank_issues_enabled: false
contact_links: []
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/general_question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: General question
about: Ask a question about anything related to this project
title: "Question"
labels: "question"
assignees: "viseshrp"
---

## Question

<!-- Please ask your question here. It can be about the usage of this project,
the internals, the implementation or whatever interests you.
Please use the BUG template for bugs and the FEATURE REQUEST template for
feature requests. -->
9 changes: 9 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Pull Request

Fixes #

## Proposed Changes

-
-
-
11 changes: 11 additions & 0 deletions .github/actions/setup-env/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: "Load Shared Environment"
description: "Sets shared environment variables for all workflows"
runs:
using: "composite"
steps:
- run: |
echo "DOCUMENTATION_CNAME=dynamicreporting.docs.pyansys.com" >> $GITHUB_ENV
echo "MAIN_PYTHON_VERSION=3.13" >> $GITHUB_ENV
echo "PACKAGE_NAME=ansys-dynamicreporting-core" >> $GITHUB_ENV
echo "PACKAGE_NAMESPACE=ansys.dynamicreporting.core" >> $GITHUB_ENV
shell: bash
59 changes: 59 additions & 0 deletions .github/actions/setup-python-env/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: "Setup Python Environment"
description: "Set up Python environment for the given Python version"

inputs:
python-version:
description: "Python version to use"
required: false
default: "3.13"
uv-version:
description: "uv version to use"
required: false
default: "latest"

runs:
using: "composite"
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}

- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: ${{ inputs.uv-version }}
enable-cache: true
cache-suffix: ${{ inputs.python-version }}

- name: Get resolved Python version
id: resolved-python
shell: bash
run: |
PYTHON_VERSION=$(python -c "import sys; print('{}.{}.{}'.format(*sys.version_info[:3]))")
echo "version=$PYTHON_VERSION" >> "$GITHUB_OUTPUT"

- name: Cache .venv directory
uses: actions/cache@v4
with:
path: .venv
key: uv-venv-${{ runner.os }}-${{ steps.resolved-python.outputs.version }}-${{ hashFiles('pyproject.toml', 'uv.lock') }}
restore-keys: |
uv-venv-${{ runner.os }}-${{ steps.resolved-python.outputs.version }}-

- name: Disable pip version check (optional)
run: echo "PIP_DISABLE_PIP_VERSION_CHECK=1" >> $GITHUB_ENV
shell: bash

- name: Install Python dependencies
run: make install
shell: bash

- name: Add .venv to PATH (cross-platform)
run: |
if [[ "$RUNNER_OS" == "Windows" ]]; then
echo "$(pwd)/.venv/Scripts" >> $GITHUB_PATH
else
echo "$(pwd)/.venv/bin" >> $GITHUB_PATH
fi
shell: bash
16 changes: 14 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
version: 2
updates:
- package-ecosystem: "pip" # See documentation for possible values
directory: "/" # Location of package manifests
# 1. Python dependencies from pyproject.toml
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
open-pull-requests-limit: 1
labels:
- "dependencies"
- "automerge"

# 2. GitHub-hosted things:
# - GitHub Actions in .github/workflows/
# - pre-commit hook revs in .pre-commit-config.yaml
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
open-pull-requests-limit: 1
labels:
- "dependencies"
- "automerge"
44 changes: 44 additions & 0 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Automerge

on:
workflow_dispatch:
pull_request:
types:
- labeled
- synchronize
- opened
- reopened

permissions:
contents: write
pull-requests: write
issues: write

jobs:
automerge:
if: contains(github.event.pull_request.labels.*.name, 'automerge')
runs-on: ubuntu-latest
steps:
- name: Debug PR info
run: |
echo "PR author: ${{ github.event.pull_request.user.login }}"
echo "Labels: ${{ toJson(github.event.pull_request.labels) }}"

- name: Auto-approve
if: |
github.event.pull_request.user.login == 'github-actions[bot]' ||
github.event.pull_request.user.login == 'dependabot[bot]' ||
github.event.pull_request.user.login == 'viseshrp'
uses: hmarr/auto-approve-action@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
pull-request-number: ${{ github.event.pull_request.number }}

- name: Enable auto-merge
uses: peter-evans/enable-pull-request-automerge@v3
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
merge-method: squash
pull-request-number: ${{ github.event.pull_request.number }}
Loading
Loading