Skip to content

Commit 32bcd0c

Browse files
[FEAT] Add CI/CD workflows, issue templates, and GitHub config (#2) (#4)
## Description Add complete `.github/` directory with CI/CD workflows, issue/PR templates, dependabot config, auto-label workflow, and release changelog configuration. Separates release and publish workflows, standardizes templates, and adds documentation label support. ## Type of Change - [x] New feature (non-breaking change which adds functionality) ## Changes Made - **CI workflow** (`ci.yml`): Lint (ruff), format check (black), type check (mypy), and tests (pytest) across Python 3.9-3.12 - **Auto-release workflow** (`auto-release.yml`): Creates GitHub release via `softprops/action-gh-release` when version changes on main - **PyPI publish workflow** (`publish.yml`): Separate workflow triggered on release, publishes via trusted publisher - **Auto-label workflow** (`auto-label.yml`): Labels PRs based on changed file paths - **Labeler config** (`labeler.yml`): Maps paths to labels (sdk, testing, examples, infrastructure, documentation) - **Dependabot** (`dependabot.yml`): Weekly updates for pip and GitHub Actions - **Bug report template**: Structured form with SDK version, Python version, description, steps to reproduce - **Feature request template**: Problem statement, proposed solution, alternatives - **Issue config**: Disables blank issues, links to docs and main repo - **PR template**: Description, type of change, testing checklist - **Release config** (`release.yml`): Categorized changelog with Dependencies section ## Related Issues Closes #2 ## Checklist - [x] My code follows the project's code style - [x] No existing functionality is affected (config/template files only) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
1 parent 6ea52b4 commit 32bcd0c

11 files changed

Lines changed: 89 additions & 140 deletions

File tree

Lines changed: 19 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,34 @@
11
name: Bug Report
22
description: Report a bug in the AgentGram Python SDK
3-
title: "[Bug]: "
43
labels: ["type: bug", "status: needs triage"]
54
body:
65
- type: markdown
76
attributes:
87
value: |
9-
Thanks for reporting a bug! Please fill out the sections below.
10-
8+
Thanks for reporting a bug! Please fill out the form below.
9+
- type: input
10+
id: version
11+
attributes:
12+
label: SDK Version
13+
description: What version of agentgram are you using?
14+
placeholder: "0.1.0"
15+
validations:
16+
required: true
17+
- type: input
18+
id: python-version
19+
attributes:
20+
label: Python Version
21+
description: What Python version are you using?
22+
placeholder: "3.12"
23+
validations:
24+
required: true
1125
- type: textarea
1226
id: description
1327
attributes:
1428
label: Bug Description
1529
description: A clear description of the bug
1630
validations:
1731
required: true
18-
1932
- type: textarea
2033
id: reproduction
2134
attributes:
@@ -24,51 +37,17 @@ body:
2437
render: python
2538
validations:
2639
required: true
27-
2840
- type: textarea
2941
id: expected
3042
attributes:
3143
label: Expected Behavior
32-
description: What should happen?
44+
description: What did you expect to happen?
3345
validations:
3446
required: true
35-
3647
- type: textarea
3748
id: actual
3849
attributes:
3950
label: Actual Behavior
40-
description: What happens instead?
41-
validations:
42-
required: true
43-
44-
- type: input
45-
id: version
46-
attributes:
47-
label: SDK Version
48-
description: Output of `pip show agentgram`
49-
placeholder: "0.1.0"
50-
validations:
51-
required: true
52-
53-
- type: dropdown
54-
id: python-version
55-
attributes:
56-
label: Python Version
57-
options:
58-
- "3.9"
59-
- "3.10"
60-
- "3.11"
61-
- "3.12"
62-
validations:
63-
required: true
64-
65-
- type: dropdown
66-
id: os
67-
attributes:
68-
label: Operating System
69-
options:
70-
- macOS
71-
- Linux
72-
- Windows
51+
description: What actually happened?
7352
validations:
7453
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
blank_issues_enabled: false
22
contact_links:
3-
- name: Documentation
4-
url: https://docs.agentgram.co
5-
about: Check the documentation before opening an issue
3+
- name: AgentGram Documentation
4+
url: https://agentgram.co/docs
5+
about: Check the documentation first
66
- name: AgentGram Platform Issues
77
url: https://github.com/agentgram/agentgram/issues
8-
about: For issues with the AgentGram platform itself
8+
about: For platform issues, use the main repo
Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
name: Feature Request
2-
description: Suggest a feature for the AgentGram Python SDK
3-
title: "[Feature]: "
2+
description: Suggest a new feature for the Python SDK
43
labels: ["type: feature", "status: needs triage"]
54
body:
65
- type: textarea
@@ -10,24 +9,20 @@ body:
109
description: What problem does this solve?
1110
validations:
1211
required: true
13-
1412
- type: textarea
1513
id: solution
1614
attributes:
1715
label: Proposed Solution
18-
description: How should this work? Include code examples if possible.
19-
render: python
16+
description: How should this work?
2017
validations:
2118
required: true
22-
2319
- type: textarea
2420
id: alternatives
2521
attributes:
2622
label: Alternatives Considered
27-
description: Other approaches you've considered
28-
23+
description: Any alternative approaches you considered?
2924
- type: textarea
3025
id: context
3126
attributes:
3227
label: Additional Context
33-
description: Any other relevant information
28+
description: Any other context or code examples

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
## Description
22

3-
<!-- Brief description of the changes -->
3+
Brief description of the changes.
44

55
## Type of Change
66

77
- [ ] Bug fix (non-breaking change which fixes an issue)
88
- [ ] New feature (non-breaking change which adds functionality)
99
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
1010
- [ ] Documentation update
11-
- [ ] Refactoring (no behavior change)
1211

1312
## Changes Made
1413

@@ -20,14 +19,14 @@ Closes #
2019

2120
## Testing
2221

23-
- [ ] Tests pass locally (`pytest tests/ -v`)
24-
- [ ] Lint passes (`ruff check agentgram/ tests/`)
22+
- [ ] Tests pass (`pytest tests/ -v`)
23+
- [ ] Lint passes (`ruff check .`)
24+
- [ ] Format passes (`black --check .`)
2525
- [ ] Type check passes (`mypy agentgram/`)
26-
- [ ] Format check passes (`black --check agentgram/ tests/`)
2726

2827
## Checklist
2928

3029
- [ ] My code follows the project's code style
31-
- [ ] I have added tests that prove my fix is effective or that my feature works
32-
- [ ] New and existing unit tests pass locally with my changes
33-
- [ ] I have made corresponding changes to the documentation
30+
- [ ] I have added tests that prove my fix/feature works
31+
- [ ] New and existing tests pass locally
32+
- [ ] I have updated the documentation accordingly

.github/dependabot.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,13 @@ updates:
44
directory: /
55
schedule:
66
interval: weekly
7-
day: monday
87
labels:
98
- dependencies
10-
open-pull-requests-limit: 10
9+
open-pull-requests-limit: 5
1110

1211
- package-ecosystem: github-actions
1312
directory: /
1413
schedule:
1514
interval: weekly
16-
day: monday
1715
labels:
1816
- dependencies
19-
- area: infrastructure

.github/labeler.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,9 @@
1515
- any-glob-to-any-file:
1616
- ".github/**"
1717
- "pyproject.toml"
18-
- ".gitignore"
18+
19+
"type: documentation":
20+
- changed-files:
21+
- any-glob-to-any-file:
22+
- "*.md"
23+
- "docs/**"

.github/release.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
11
changelog:
2-
exclude:
3-
labels:
4-
- dependencies
5-
authors:
6-
- dependabot
72
categories:
83
- title: Breaking Changes
94
labels:
105
- breaking change
116
- title: New Features
127
labels:
13-
- "type: feature"
14-
- "type: enhancement"
8+
- type: feature
9+
- type: enhancement
1510
- title: Bug Fixes
1611
labels:
17-
- "type: bug"
12+
- type: bug
1813
- title: Documentation
1914
labels:
20-
- "type: documentation"
15+
- type: documentation
16+
- title: Dependencies
17+
labels:
18+
- dependencies
2119
- title: Other Changes
2220
labels:
2321
- "*"

.github/workflows/auto-label.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66

77
permissions:
88
pull-requests: write
9+
contents: read
910

1011
jobs:
1112
label:
@@ -15,12 +16,4 @@ jobs:
1516
with:
1617
repo-token: ${{ secrets.GITHUB_TOKEN }}
1718

18-
size-label:
19-
runs-on: ubuntu-latest
20-
steps:
21-
- uses: pascalgn/size-label-action@v0.5.4
22-
env:
23-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24-
with:
25-
sizes: >
26-
{"0": "XS", "10": "S", "30": "M", "100": "L", "500": "XL", "1000": "XXL"}
19+
# .github/labeler.yml handles the path-to-label mapping

.github/workflows/auto-release.yml

Lines changed: 10 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -9,61 +9,28 @@ permissions:
99

1010
jobs:
1111
release:
12-
name: Create Release
1312
runs-on: ubuntu-latest
1413
steps:
1514
- uses: actions/checkout@v4
1615
with:
1716
fetch-depth: 0
18-
19-
- name: Get version from pyproject.toml
17+
- name: Get version
2018
id: version
2119
run: |
22-
VERSION=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])")
23-
echo "version=$VERSION" >> $GITHUB_OUTPUT
24-
20+
VERSION=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")
21+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
2522
- name: Check if tag exists
2623
id: check_tag
2724
run: |
2825
if git rev-parse "v${{ steps.version.outputs.version }}" >/dev/null 2>&1; then
29-
echo "exists=true" >> $GITHUB_OUTPUT
26+
echo "exists=true" >> "$GITHUB_OUTPUT"
3027
else
31-
echo "exists=false" >> $GITHUB_OUTPUT
28+
echo "exists=false" >> "$GITHUB_OUTPUT"
3229
fi
33-
34-
- name: Create tag and release
30+
- name: Create Release
3531
if: steps.check_tag.outputs.exists == 'false'
36-
env:
37-
GH_TOKEN: ${{ github.token }}
38-
run: |
39-
git tag "v${{ steps.version.outputs.version }}"
40-
git push origin "v${{ steps.version.outputs.version }}"
41-
gh release create "v${{ steps.version.outputs.version }}" \
42-
--title "v${{ steps.version.outputs.version }}" \
43-
--generate-notes
44-
45-
publish:
46-
name: Publish to PyPI
47-
runs-on: ubuntu-latest
48-
needs: release
49-
environment: pypi
50-
permissions:
51-
id-token: write
52-
steps:
53-
- uses: actions/checkout@v4
54-
55-
- name: Set up Python
56-
uses: actions/setup-python@v5
32+
uses: softprops/action-gh-release@v2
5733
with:
58-
python-version: "3.12"
59-
60-
- name: Install build dependencies
61-
run: |
62-
python -m pip install --upgrade pip
63-
pip install build
64-
65-
- name: Build package
66-
run: python -m build
67-
68-
- name: Publish to PyPI
69-
uses: pypa/gh-action-pypi-publish@release/v1
34+
tag_name: v${{ steps.version.outputs.version }}
35+
name: v${{ steps.version.outputs.version }}
36+
generate_release_notes: true

.github/workflows/ci.yml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,34 +8,25 @@ on:
88

99
jobs:
1010
test:
11-
name: Test (Python ${{ matrix.python-version }})
1211
runs-on: ubuntu-latest
1312
strategy:
14-
fail-fast: false
1513
matrix:
1614
python-version: ["3.9", "3.10", "3.11", "3.12"]
17-
1815
steps:
1916
- uses: actions/checkout@v4
20-
2117
- name: Set up Python ${{ matrix.python-version }}
2218
uses: actions/setup-python@v5
2319
with:
2420
python-version: ${{ matrix.python-version }}
25-
2621
- name: Install dependencies
2722
run: |
2823
python -m pip install --upgrade pip
2924
pip install -e ".[dev]"
30-
3125
- name: Lint with ruff
32-
run: ruff check agentgram/ tests/
33-
26+
run: ruff check .
27+
- name: Format check with black
28+
run: black --check .
3429
- name: Type check with mypy
3530
run: mypy agentgram/
36-
37-
- name: Format check with black
38-
run: black --check agentgram/ tests/
39-
4031
- name: Run tests
41-
run: pytest tests/ -v --tb=short
32+
run: pytest tests/ -v

0 commit comments

Comments
 (0)