FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Embed code snippets for README from executable examples by ihrpr · Pull Request #1055 · modelcontextprotocol/python-sdk · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .lock  (1) .md  (2) .py  (17) .toml  (2) .yaml  (1) .yml  (1) All 6 file types selected
Only manifest files
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
19 changes: 19 additions & 0 deletions .github/workflows/shared.yml
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
Expand Up @@ -3,6 +3,9 @@ name: Shared Checks
on:
workflow_call:

permissions:
contents: read

jobs:
pre-commit:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -46,3 +49,19 @@ jobs:
- name: Run pytest
run: uv run --frozen --no-sync pytest
continue-on-error: true

readme-snippets:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: astral-sh/setup-uv@v5
with:
enable-cache: true
version: 0.7.2

- name: Install dependencies
run: uv sync --frozen --all-extras --python 3.10

- name: Check README snippets are up to date
run: uv run --frozen scripts/update_readme_snippets.py --check
Comment thread Fixed
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
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
Expand Up @@ -23,6 +23,7 @@ repos:
types: [python]
language: system
pass_filenames: false
exclude: ^README\.md$
- id: pyright
name: pyright
entry: uv run pyright
Expand All @@ -36,3 +37,9 @@ repos:
language: system
files: ^(pyproject\.toml|uv\.lock)$
pass_filenames: false
- id: readme-snippets
name: Check README snippets are up to date
entry: uv run scripts/update_readme_snippets.py --check
language: system
files: ^(README\.md|examples/.*\.py|scripts/update_readme_snippets\.py)$
pass_filenames: false
7 changes: 6 additions & 1 deletion CONTRIBUTING.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
Expand Up @@ -40,7 +40,12 @@ uv run ruff check .
uv run ruff format .
```

7. Submit a pull request to the same branch you branched from
7. Update README snippets if you modified example code:
```bash
uv run scripts/update_readme_snippets.py
```

8. Submit a pull request to the same branch you branched from

## Code Style

Expand Down
Loading

Back | FazBrowse Home | New Git URL