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
85 changes: 85 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Bug Report
description: Report a bug or an unexpected behavior
labels: ["bug", "needs-triage"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to file a bug report!
Please read the [Contributing Guidelines](CONTRIBUTING.md) before submitting.
- type: textarea
id: description
attributes:
label: Description
description: A clear and concise description of what the bug is.
placeholder: Describe the bug here.
validations:
required: true
- type: textarea
id: reproduction-steps
attributes:
label: Steps to Reproduce
description: |
Provide clear steps to reproduce the behavior.
Please include code snippets, configurations, or detailed commands if relevant.
placeholder: |
1. Go to '...'
2. Run cmd '....'
3. View file '....'
4. See error
validations:
required: true
- type: textarea
id: expected-behavior
attributes:
label: Expected Behavior
description: A clear and concise description of what you expected to happen.
placeholder: What did you expect to happen?
validations:
required: true
- type: textarea
id: actual-behavior
attributes:
label: Actual Behavior
description: A clear and concise description of what actually happened.
placeholder: What actually happened?
validations:
required: true
- type: textarea
id: environment
attributes:
label: Environment
description: Provide details about your environment.
value: |
- **OS:** [e.g. macOS, Windows, Linux] (and version)
- **mcpd Version:** [e.g. v0.0.2] (mcpd --version)
- **mcpd Python plugin SDK Version:** [e.g. 0.0.1]
- **Other relevant libraries/versions:**
render: markdown
validations:
required: false
- type: textarea
id: logs
attributes:
label: Relevant Log Output
description: |
If applicable, paste any relevant log and terminal output, error messages, or screenshots.
Please wrap code blocks in triple backticks (```).
render: shell
validations:
required: false
- type: checkboxes
id: self-checklist
attributes:
label: Self-Checklist
options:
- label: I have read the [Contributing Guidelines](CONTRIBUTING.md).
required: true
- label: I have searched the existing issues and found no duplicate.
required: true
- label: I have provided a clear and concise description of the bug.
required: true
- label: I have provided clear steps to reproduce the bug.
required: true
- label: I have provided details about my environment.
required: true
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Report a security vulnerability
url: https://github.com/mozilla-ai/mcpd-plugins-sdk-python/security/policy
about: Please report security vulnerabilities responsibly.
54 changes: 54 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Feature Request
description: Suggest an idea or enhancement for the project.
labels: ["enhancement", "needs-triage"]
body:
- type: markdown
attributes:
value: |
Thanks for suggesting an idea!
Please read the [Contributing Guidelines](CONTRIBUTING.md) before submitting.
- type: textarea
id: problem-description
attributes:
label: Is your feature request related to a problem? Please describe.
description: A clear and concise description of the problem you're trying to solve. e.g. "I'm always frustrated when [...]"
placeholder: Describe the problem.
validations:
required: true
- type: textarea
id: solution-description
attributes:
label: Describe the solution you'd like
description: A clear and concise description of what you want to happen.
placeholder: Describe the solution.
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Describe alternatives you've considered
description: A clear and concise description of any alternative solutions or features you've considered.
placeholder: Describe alternatives.
validations:
required: false
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: Add any other context or screenshots about the feature request here.
placeholder: Any additional information.
validations:
required: false
- type: checkboxes
id: self-checklist
attributes:
label: Self-Checklist
options:
- label: I have read the [Contributing Guidelines](CONTRIBUTING.md).
required: true
- label: I have searched the existing issues and found no duplicate.
required: true
- label: I have provided a clear and concise description of the problem.
required: true
- label: I have provided a clear and concise description of the proposed solution.
required: true
28 changes: 28 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Lint

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

jobs:
run-linter:
timeout-minutes: 30
runs-on: ubuntu-latest

steps:
- name: Check out the repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Install the latest version of uv and set the python version to 3.11
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
with:
python-version: 3.11
activate-environment: true

- name: Install dependencies
run: uv sync --group lint

- name: Run pre-commit hooks
run: uv run pre-commit run --all-files
39 changes: 39 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Release

on:
release:
types: [published]
workflow_dispatch:

jobs:
release:
environment: pypi
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: '3.11'

- name: Upgrade pip
run: |
pip install --upgrade pip
pip --version

- name: Install
run: python -m pip install build setuptools

- name: Build package
run: python -m build

- name: Upload package
if: github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@release/v1
39 changes: 39 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Test

on:
push:
branches: [main]
paths:
- 'src/**'
- 'tests/**'
pull_request:
paths:
- 'src/**'
- 'tests/**'
workflow_dispatch:

jobs:
test:
timeout-minutes: 30

strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest ]
python-version: [ '3.11', '3.12', '3.13' ]

runs-on: ${{ matrix.os }}

steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup UV
uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3
with:
python-version: ${{ matrix.python-version }}
activate-environment: true

- run: uv sync --group tests

- run: pytest -v tests/unit
62 changes: 62 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# Virtual environments
venv/
ENV/
env/
.venv/

# IDE
.vscode/
.idea/
*.swp
*.swo
*~

# Testing
.pytest_cache/
.coverage
htmlcov/
.tox/

# Type checking
.mypy_cache/
.dmypy.json
dmypy.json

# Ruff
.ruff_cache/

# Proto source files (downloaded during build, not committed)
tmp/

# Version file (generated by setuptools_scm)
src/mcpd_plugins/_version.py

# OS
.DS_Store
Thumbs.db

# Claude Code (never commit this)
.claude/CLAUDE.local.md
24 changes: 24 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
repos:
- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
- id: detect-secrets

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-merge-conflict
- id: trailing-whitespace
- id: end-of-file-fixer

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.4
hooks:
- id: ruff
args: [--fix]
- id: ruff-format

- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.8.0
hooks:
- id: uv-lock
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12
Loading