-
Notifications
You must be signed in to change notification settings - Fork 1
Implement Plugins SDK for Python #1
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
bd51495
Add project config files/GHAs/etc.
peteski22 b2ba302
Add project code
peteski22 83bd6e9
Add tests
peteski22 0640c56
Add examples
peteski22 a43e267
Update to support building
peteski22 ba1409c
PR feedback updates
peteski22 db9b3ba
PR feedback
peteski22 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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/ | ||
|
|
||
peteski22 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| # 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 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 3.12 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.