Skip to content

Commit f6cade1

Browse files
authored
fix: plugins template (#783)
* feat: update context forge target in template's project dependencies Signed-off-by: Frederico Araujo <[email protected]> * fix: exclude jinja files from reformatting tabs Signed-off-by: Frederico Araujo <[email protected]> * fix: plugins cli defaults Signed-off-by: Frederico Araujo <[email protected]> * fix: revert formatted Makefile template Signed-off-by: Frederico Araujo <[email protected]> * feat: add optional packages Signed-off-by: Frederico Araujo <[email protected]> * docs: update plugin template docs Signed-off-by: Frederico Araujo <[email protected]> * docs: update template readme Signed-off-by: Frederico Araujo <[email protected]> --------- Signed-off-by: Frederico Araujo <[email protected]>
1 parent 4899ce8 commit f6cade1

File tree

6 files changed

+306
-263
lines changed

6 files changed

+306
-263
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -482,8 +482,8 @@ repos:
482482
- id: remove-tabs
483483
name: 🚀 Remove Tabs
484484
description: Replaces tabs by whitespaces.
485-
# exclude root-level Makefiles and any path ending in /Makefile or .mk
486-
exclude: '(^|/)Makefile$|\.mk$'
485+
# exclude root-level Makefiles and any path ending in /Makefile or .mk or .jinja
486+
exclude: '(^|/)Makefile$|(\.mk|\.jinja)$'
487487

488488
# -----------------------------------------------------------------------------
489489
# 🚫 Branch Protection Hooks

docs/docs/using/plugins/lifecycle.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,17 @@ Inspect those two files and get familiar with them. There are many options you c
7171

7272
### Dependencies
7373

74-
Plugins are Python packages with dependencies managed by `uv`. Just like the gateway, you can add, lock, lint, and ensure that best practices are followed when creating your plugins. To ensure compatibility with the gateway linters, we do not directly install them in the template. Instead, please install the gateway package with the dev extras, which will include all required linters.
74+
Plugins are Python packages with dependencies managed by `uv`. Just like the gateway, you can add, lock, lint, and ensure that best practices are followed when creating your plugins. To install dependencies with dev packages (required for linting and testing), run:
75+
76+
```bash
77+
make install-dev
78+
```
79+
80+
Alternatively, you can also install it in editable mode:
81+
82+
```bash
83+
make install-editable
84+
```
7585

7686
### Test
7787

mcpgateway/plugins/tools/cli.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@
4545
# ---------------------------------------------------------------------------
4646
# Configuration defaults
4747
# ---------------------------------------------------------------------------
48-
DEFAULT_TEMPLATE_BASE_URL = "https://github.com/IBM/mcp-context-forge.git"
49-
DEFAULT_TEMPLATE_TYPE = "external"
50-
DEFAULT_TEMPLATE_URL = f"{DEFAULT_TEMPLATE_BASE_URL}::plugin_templates/{DEFAULT_TEMPLATE_TYPE}"
48+
DEFAULT_TEMPLATE_URL = "https://github.com/IBM/mcp-context-forge.git"
5149
DEFAULT_AUTHOR_NAME = "<changeme>"
5250
DEFAULT_AUTHOR_EMAIL = "<changeme>"
5351
DEFAULT_PROJECT_DIR = Path("./.")

0 commit comments

Comments
 (0)