diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..300231e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,53 @@ +name: Bug Report +description: Report a bug in the AgentGram Python SDK +labels: ["type: bug", "status: needs triage"] +body: + - type: markdown + attributes: + value: | + Thanks for reporting a bug! Please fill out the form below. + - type: input + id: version + attributes: + label: SDK Version + description: What version of agentgram are you using? + placeholder: "0.1.0" + validations: + required: true + - type: input + id: python-version + attributes: + label: Python Version + description: What Python version are you using? + placeholder: "3.12" + validations: + required: true + - type: textarea + id: description + attributes: + label: Bug Description + description: A clear description of the bug + validations: + required: true + - type: textarea + id: reproduction + attributes: + label: Steps to Reproduce + description: Minimal code to reproduce the issue + render: python + validations: + required: true + - type: textarea + id: expected + attributes: + label: Expected Behavior + description: What did you expect to happen? + validations: + required: true + - type: textarea + id: actual + attributes: + label: Actual Behavior + description: What actually happened? + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..d1b3971 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: false +contact_links: + - name: AgentGram Documentation + url: https://agentgram.co/docs + about: Check the documentation first + - name: AgentGram Platform Issues + url: https://github.com/agentgram/agentgram/issues + about: For platform issues, use the main repo diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..658a41a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,28 @@ +name: Feature Request +description: Suggest a new feature for the Python SDK +labels: ["type: feature", "status: needs triage"] +body: + - type: textarea + id: problem + attributes: + label: Problem Statement + description: What problem does this solve? + validations: + required: true + - type: textarea + id: solution + attributes: + label: Proposed Solution + description: How should this work? + validations: + required: true + - type: textarea + id: alternatives + attributes: + label: Alternatives Considered + description: Any alternative approaches you considered? + - type: textarea + id: context + attributes: + label: Additional Context + description: Any other context or code examples diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..30c5d98 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,32 @@ +## Description + +Brief description of the changes. + +## Type of Change + +- [ ] Bug fix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) +- [ ] Documentation update + +## Changes Made + +- + +## Related Issues + +Closes # + +## Testing + +- [ ] Tests pass (`pytest tests/ -v`) +- [ ] Lint passes (`ruff check .`) +- [ ] Format passes (`black --check .`) +- [ ] Type check passes (`mypy agentgram/`) + +## Checklist + +- [ ] My code follows the project's code style +- [ ] I have added tests that prove my fix/feature works +- [ ] New and existing tests pass locally +- [ ] I have updated the documentation accordingly diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..80c9b94 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,16 @@ +version: 2 +updates: + - package-ecosystem: pip + directory: / + schedule: + interval: weekly + labels: + - dependencies + open-pull-requests-limit: 5 + + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + labels: + - dependencies diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000..0dc806c --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,23 @@ +"area: sdk": + - changed-files: + - any-glob-to-any-file: "agentgram/**" + +"area: testing": + - changed-files: + - any-glob-to-any-file: "tests/**" + +"area: examples": + - changed-files: + - any-glob-to-any-file: "examples/**" + +"area: infrastructure": + - changed-files: + - any-glob-to-any-file: + - ".github/**" + - "pyproject.toml" + +"type: documentation": + - changed-files: + - any-glob-to-any-file: + - "*.md" + - "docs/**" diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 0000000..81cf76a --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,21 @@ +changelog: + categories: + - title: Breaking Changes + labels: + - breaking change + - title: New Features + labels: + - type: feature + - type: enhancement + - title: Bug Fixes + labels: + - type: bug + - title: Documentation + labels: + - type: documentation + - title: Dependencies + labels: + - dependencies + - title: Other Changes + labels: + - "*" diff --git a/.github/workflows/auto-label.yml b/.github/workflows/auto-label.yml new file mode 100644 index 0000000..574082a --- /dev/null +++ b/.github/workflows/auto-label.yml @@ -0,0 +1,19 @@ +name: Auto Label + +on: + pull_request: + types: [opened, synchronize] + +permissions: + pull-requests: write + contents: read + +jobs: + label: + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v5 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + +# .github/labeler.yml handles the path-to-label mapping diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml new file mode 100644 index 0000000..01fc483 --- /dev/null +++ b/.github/workflows/auto-release.yml @@ -0,0 +1,36 @@ +name: Auto Release + +on: + push: + branches: [main] + +permissions: + contents: write + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Get version + id: version + run: | + VERSION=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])") + echo "version=$VERSION" >> "$GITHUB_OUTPUT" + - name: Check if tag exists + id: check_tag + run: | + if git rev-parse "v${{ steps.version.outputs.version }}" >/dev/null 2>&1; then + echo "exists=true" >> "$GITHUB_OUTPUT" + else + echo "exists=false" >> "$GITHUB_OUTPUT" + fi + - name: Create Release + if: steps.check_tag.outputs.exists == 'false' + uses: softprops/action-gh-release@v2 + with: + tag_name: v${{ steps.version.outputs.version }} + name: v${{ steps.version.outputs.version }} + generate_release_notes: true diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..0cff71f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,32 @@ +name: CI + +on: + push: + branches: [develop, main] + pull_request: + branches: [develop, main] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.9", "3.10", "3.11", "3.12"] + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -e ".[dev]" + - name: Lint with ruff + run: ruff check . + - name: Format check with black + run: black --check . + - name: Type check with mypy + run: mypy agentgram/ + - name: Run tests + run: pytest tests/ -v diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..6687403 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,25 @@ +name: Publish to PyPI + +on: + release: + types: [published] + +permissions: + id-token: write + +jobs: + publish: + runs-on: ubuntu-latest + environment: pypi + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + - name: Install build tools + run: pip install build + - name: Build package + run: python -m build + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1