Skip to content

Commit 6ea52b4

Browse files
[FEAT] Add GitHub configuration: CI/CD, templates, and dependabot (#1) (#3)
## Description Add complete .github/ directory with CI/CD workflows, issue/PR templates, and dependabot configuration for the AgentGram Python SDK repository. ## Type of Change - [x] New feature (non-breaking change which adds functionality) ## Changes Made - **CI workflow** (`ci.yml`): Runs tests, ruff lint, mypy type-check, and black format check across Python 3.9-3.12 - **Auto-release workflow** (`auto-release.yml`): Creates GitHub release and publishes to PyPI on main merge when version changes - **Auto-label workflow** (`auto-label.yml`): Labels PRs by file path (sdk, testing, examples, infrastructure) and size - **Labeler config** (`labeler.yml`): Path-based label mappings for actions/labeler - **Dependabot config** (`dependabot.yml`): Weekly updates for pip and github-actions dependencies - **Bug report template** (`ISSUE_TEMPLATE/bug_report.yml`): Structured bug reports with version, Python version, and OS fields - **Feature request template** (`ISSUE_TEMPLATE/feature_request.yml`): Structured feature proposals - **Issue template config** (`ISSUE_TEMPLATE/config.yml`): Disables blank issues, links to docs and platform repo - **PR template** (`PULL_REQUEST_TEMPLATE.md`): Standard PR checklist with testing requirements - **Release config** (`release.yml`): Categorized changelog generation for GitHub releases ## Related Issues Closes #1 ## Testing - [x] All files are YAML/Markdown configuration - no runtime code to test - [x] Workflow syntax validated ## Checklist - [x] My code follows the project's code style - [x] I have performed a self-review of my code - [x] My changes generate no new warnings Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
1 parent 90d0eb9 commit 6ea52b4

10 files changed

Lines changed: 344 additions & 0 deletions

File tree

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Bug Report
2+
description: Report a bug in the AgentGram Python SDK
3+
title: "[Bug]: "
4+
labels: ["type: bug", "status: needs triage"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for reporting a bug! Please fill out the sections below.
10+
11+
- type: textarea
12+
id: description
13+
attributes:
14+
label: Bug Description
15+
description: A clear description of the bug
16+
validations:
17+
required: true
18+
19+
- type: textarea
20+
id: reproduction
21+
attributes:
22+
label: Steps to Reproduce
23+
description: Minimal code to reproduce the issue
24+
render: python
25+
validations:
26+
required: true
27+
28+
- type: textarea
29+
id: expected
30+
attributes:
31+
label: Expected Behavior
32+
description: What should happen?
33+
validations:
34+
required: true
35+
36+
- type: textarea
37+
id: actual
38+
attributes:
39+
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
73+
validations:
74+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Documentation
4+
url: https://docs.agentgram.co
5+
about: Check the documentation before opening an issue
6+
- name: AgentGram Platform Issues
7+
url: https://github.com/agentgram/agentgram/issues
8+
about: For issues with the AgentGram platform itself
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Feature Request
2+
description: Suggest a feature for the AgentGram Python SDK
3+
title: "[Feature]: "
4+
labels: ["type: feature", "status: needs triage"]
5+
body:
6+
- type: textarea
7+
id: problem
8+
attributes:
9+
label: Problem Statement
10+
description: What problem does this solve?
11+
validations:
12+
required: true
13+
14+
- type: textarea
15+
id: solution
16+
attributes:
17+
label: Proposed Solution
18+
description: How should this work? Include code examples if possible.
19+
render: python
20+
validations:
21+
required: true
22+
23+
- type: textarea
24+
id: alternatives
25+
attributes:
26+
label: Alternatives Considered
27+
description: Other approaches you've considered
28+
29+
- type: textarea
30+
id: context
31+
attributes:
32+
label: Additional Context
33+
description: Any other relevant information

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
## Description
2+
3+
<!-- Brief description of the changes -->
4+
5+
## Type of Change
6+
7+
- [ ] Bug fix (non-breaking change which fixes an issue)
8+
- [ ] New feature (non-breaking change which adds functionality)
9+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
10+
- [ ] Documentation update
11+
- [ ] Refactoring (no behavior change)
12+
13+
## Changes Made
14+
15+
-
16+
17+
## Related Issues
18+
19+
Closes #
20+
21+
## Testing
22+
23+
- [ ] Tests pass locally (`pytest tests/ -v`)
24+
- [ ] Lint passes (`ruff check agentgram/ tests/`)
25+
- [ ] Type check passes (`mypy agentgram/`)
26+
- [ ] Format check passes (`black --check agentgram/ tests/`)
27+
28+
## Checklist
29+
30+
- [ ] 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

.github/dependabot.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: pip
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
day: monday
8+
labels:
9+
- dependencies
10+
open-pull-requests-limit: 10
11+
12+
- package-ecosystem: github-actions
13+
directory: /
14+
schedule:
15+
interval: weekly
16+
day: monday
17+
labels:
18+
- dependencies
19+
- area: infrastructure

.github/labeler.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
"area: sdk":
2+
- changed-files:
3+
- any-glob-to-any-file: "agentgram/**"
4+
5+
"area: testing":
6+
- changed-files:
7+
- any-glob-to-any-file: "tests/**"
8+
9+
"area: examples":
10+
- changed-files:
11+
- any-glob-to-any-file: "examples/**"
12+
13+
"area: infrastructure":
14+
- changed-files:
15+
- any-glob-to-any-file:
16+
- ".github/**"
17+
- "pyproject.toml"
18+
- ".gitignore"

.github/release.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
changelog:
2+
exclude:
3+
labels:
4+
- dependencies
5+
authors:
6+
- dependabot
7+
categories:
8+
- title: Breaking Changes
9+
labels:
10+
- breaking change
11+
- title: New Features
12+
labels:
13+
- "type: feature"
14+
- "type: enhancement"
15+
- title: Bug Fixes
16+
labels:
17+
- "type: bug"
18+
- title: Documentation
19+
labels:
20+
- "type: documentation"
21+
- title: Other Changes
22+
labels:
23+
- "*"

.github/workflows/auto-label.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Auto Label
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize]
6+
7+
permissions:
8+
pull-requests: write
9+
10+
jobs:
11+
label:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/labeler@v5
15+
with:
16+
repo-token: ${{ secrets.GITHUB_TOKEN }}
17+
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"}

.github/workflows/auto-release.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Auto Release
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
release:
12+
name: Create Release
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Get version from pyproject.toml
20+
id: version
21+
run: |
22+
VERSION=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])")
23+
echo "version=$VERSION" >> $GITHUB_OUTPUT
24+
25+
- name: Check if tag exists
26+
id: check_tag
27+
run: |
28+
if git rev-parse "v${{ steps.version.outputs.version }}" >/dev/null 2>&1; then
29+
echo "exists=true" >> $GITHUB_OUTPUT
30+
else
31+
echo "exists=false" >> $GITHUB_OUTPUT
32+
fi
33+
34+
- name: Create tag and release
35+
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
57+
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

.github/workflows/ci.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [develop, main]
6+
pull_request:
7+
branches: [develop, main]
8+
9+
jobs:
10+
test:
11+
name: Test (Python ${{ matrix.python-version }})
12+
runs-on: ubuntu-latest
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
python-version: ["3.9", "3.10", "3.11", "3.12"]
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install -e ".[dev]"
30+
31+
- name: Lint with ruff
32+
run: ruff check agentgram/ tests/
33+
34+
- name: Type check with mypy
35+
run: mypy agentgram/
36+
37+
- name: Format check with black
38+
run: black --check agentgram/ tests/
39+
40+
- name: Run tests
41+
run: pytest tests/ -v --tb=short

0 commit comments

Comments
 (0)