mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-18 03:29:11 +02:00
Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0d8bfd6efd |
3 changed files with 117 additions and 26 deletions
8
.github/workflows/marvin.yml
vendored
8
.github/workflows/marvin.yml
vendored
|
|
@ -33,12 +33,6 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
|
|
||||||
# Set up Python environment
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: "3.12"
|
|
||||||
|
|
||||||
# Install UV package manager
|
# Install UV package manager
|
||||||
- name: Install UV
|
- name: Install UV
|
||||||
uses: astral-sh/setup-uv@v6
|
uses: astral-sh/setup-uv@v6
|
||||||
|
|
@ -48,7 +42,7 @@ jobs:
|
||||||
|
|
||||||
# Install project dependencies
|
# Install project dependencies
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: uv sync --dev
|
run: uv sync --python 3.12
|
||||||
|
|
||||||
# Install pre-commit hooks automatically
|
# Install pre-commit hooks automatically
|
||||||
- name: Install pre-commit hooks
|
- name: Install pre-commit hooks
|
||||||
|
|
|
||||||
93
.github/workflows/update-config-schema.yml
vendored
Normal file
93
.github/workflows/update-config-schema.yml
vendored
Normal file
|
|
@ -0,0 +1,93 @@
|
||||||
|
name: Update Config Schema
|
||||||
|
|
||||||
|
# This workflow runs on merges to main to automatically update the config schema
|
||||||
|
# by creating a PR when changes are needed.
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: ["main"]
|
||||||
|
paths:
|
||||||
|
- "src/fastmcp/utilities/fastmcp_config/**"
|
||||||
|
- "!src/fastmcp/utilities/fastmcp_config/v1/schema.json" # Exclude the local schema file
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update-config-schema:
|
||||||
|
timeout-minutes: 5
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v5
|
||||||
|
|
||||||
|
- name: Generate Marvin App token
|
||||||
|
id: marvin-token
|
||||||
|
uses: actions/create-github-app-token@v2
|
||||||
|
with:
|
||||||
|
app-id: ${{ secrets.MARVIN_APP_ID }}
|
||||||
|
private-key: ${{ secrets.MARVIN_APP_PRIVATE_KEY }}
|
||||||
|
|
||||||
|
- name: Install uv
|
||||||
|
uses: astral-sh/setup-uv@v6
|
||||||
|
with:
|
||||||
|
enable-cache: true
|
||||||
|
cache-dependency-glob: "uv.lock"
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: uv sync --python 3.12
|
||||||
|
|
||||||
|
- name: Generate config schema
|
||||||
|
run: |
|
||||||
|
echo "🔄 Generating fastmcp.json schema..."
|
||||||
|
uv run python -c "
|
||||||
|
from fastmcp.utilities.fastmcp_config import generate_schema
|
||||||
|
generate_schema('docs/public/schemas/fastmcp.json/latest.json')
|
||||||
|
print('✅ Schema generated successfully')
|
||||||
|
"
|
||||||
|
|
||||||
|
# Also update the v1 schema for consistency
|
||||||
|
uv run python -c "
|
||||||
|
from fastmcp.utilities.fastmcp_config import generate_schema
|
||||||
|
generate_schema('docs/public/schemas/fastmcp.json/v1.json')
|
||||||
|
print('✅ v1 schema updated')
|
||||||
|
"
|
||||||
|
|
||||||
|
- name: Check for changes
|
||||||
|
id: check_changes
|
||||||
|
run: |
|
||||||
|
if git diff --quiet docs/public/schemas/fastmcp.json/; then
|
||||||
|
echo "No changes detected in config schema"
|
||||||
|
echo "has_changes=false" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "Changes detected in config schema"
|
||||||
|
echo "has_changes=true" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Create Pull Request
|
||||||
|
if: steps.check_changes.outputs.has_changes == 'true'
|
||||||
|
uses: peter-evans/create-pull-request@v7
|
||||||
|
with:
|
||||||
|
token: ${{ steps.marvin-token.outputs.token }}
|
||||||
|
commit-message: "chore: Update fastmcp.json schema"
|
||||||
|
title: "chore: Update fastmcp.json schema"
|
||||||
|
body: |
|
||||||
|
This PR updates the fastmcp.json schema files to match the current source code.
|
||||||
|
|
||||||
|
The schema is automatically generated from `src/fastmcp/utilities/fastmcp_config/` to ensure consistency.
|
||||||
|
|
||||||
|
🤖 Generated by Marvin
|
||||||
|
branch: marvin/update-config-schema
|
||||||
|
delete-branch: true
|
||||||
|
author: "marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>"
|
||||||
|
committer: "marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>"
|
||||||
|
|
||||||
|
- name: Summary
|
||||||
|
run: |
|
||||||
|
if [ "${{ steps.check_changes.outputs.has_changes }}" == "true" ]; then
|
||||||
|
echo "✅ Config schema PR created"
|
||||||
|
else
|
||||||
|
echo "✅ Config schema is already up to date"
|
||||||
|
fi
|
||||||
42
.github/workflows/update-sdk-docs.yml
vendored
42
.github/workflows/update-sdk-docs.yml
vendored
|
|
@ -1,8 +1,7 @@
|
||||||
name: Update SDK Documentation
|
name: Update SDK Documentation
|
||||||
|
|
||||||
# This workflow runs on merges to main to automatically update SDK docs
|
# This workflow runs on merges to main to automatically update SDK docs
|
||||||
# without blocking PRs. SDK doc generation can fail if another PR merges
|
# by creating a PR when changes are needed.
|
||||||
# first, so handling it post-merge prevents annoying CI failures for contributors.
|
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
|
@ -23,8 +22,13 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
|
|
||||||
|
- name: Generate Marvin App token
|
||||||
|
id: marvin-token
|
||||||
|
uses: actions/create-github-app-token@v2
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
app-id: ${{ secrets.MARVIN_APP_ID }}
|
||||||
|
private-key: ${{ secrets.MARVIN_APP_PRIVATE_KEY }}
|
||||||
|
|
||||||
- name: Install uv
|
- name: Install uv
|
||||||
uses: astral-sh/setup-uv@v6
|
uses: astral-sh/setup-uv@v6
|
||||||
|
|
@ -32,13 +36,8 @@ jobs:
|
||||||
enable-cache: true
|
enable-cache: true
|
||||||
cache-dependency-glob: "uv.lock"
|
cache-dependency-glob: "uv.lock"
|
||||||
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: "3.12"
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: uv sync --dev
|
run: uv sync --python 3.12
|
||||||
|
|
||||||
- name: Install just
|
- name: Install just
|
||||||
uses: extractions/setup-just@v3
|
uses: extractions/setup-just@v3
|
||||||
|
|
@ -59,23 +58,28 @@ jobs:
|
||||||
echo "has_changes=true" >> $GITHUB_OUTPUT
|
echo "has_changes=true" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Commit and push changes
|
- name: Create Pull Request
|
||||||
if: steps.check_changes.outputs.has_changes == 'true'
|
if: steps.check_changes.outputs.has_changes == 'true'
|
||||||
run: |
|
uses: peter-evans/create-pull-request@v7
|
||||||
git config --local user.email "action@github.com"
|
with:
|
||||||
git config --local user.name "GitHub Action"
|
token: ${{ steps.marvin-token.outputs.token }}
|
||||||
git add docs/python-sdk/ docs/docs.json
|
commit-message: "chore: Update SDK documentation"
|
||||||
git commit -m "chore: Update SDK documentation
|
title: "chore: Update SDK documentation"
|
||||||
|
body: |
|
||||||
|
This PR updates the auto-generated SDK documentation to reflect the latest source code changes.
|
||||||
|
|
||||||
🤖 Generated with [Claude Code](https://claude.ai/code)
|
📚 Documentation is automatically generated from the source code docstrings and type annotations.
|
||||||
|
|
||||||
Co-Authored-By: Claude <noreply@anthropic.com>"
|
🤖 Generated by Marvin
|
||||||
git push
|
branch: marvin/update-sdk-docs
|
||||||
|
delete-branch: true
|
||||||
|
author: "marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>"
|
||||||
|
committer: "marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>"
|
||||||
|
|
||||||
- name: Summary
|
- name: Summary
|
||||||
run: |
|
run: |
|
||||||
if [ "${{ steps.check_changes.outputs.has_changes }}" == "true" ]; then
|
if [ "${{ steps.check_changes.outputs.has_changes }}" == "true" ]; then
|
||||||
echo "✅ SDK documentation updated and committed"
|
echo "✅ SDK documentation PR created"
|
||||||
else
|
else
|
||||||
echo "✅ SDK documentation is already up to date"
|
echo "✅ SDK documentation is already up to date"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue