pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/BlocksecPHD/python-sdk/commit/adf327164aa22ccf122f6cc751b6374e9a287940

in="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/global-9c8f61f9f58ad7b2.css" /> Embed code snippets for README from executable examples (#1055) · BlocksecPHD/python-sdk@adf3271 · GitHub
Skip to content

Commit adf3271

Browse files
authored
Embed code snippets for README from executable examples (modelcontextprotocol#1055)
1 parent 7bc190b commit adf3271

24 files changed

Lines changed: 1139 additions & 1131 deletions

.github/workflows/shared.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: Shared Checks
33
on:
44
workflow_call:
55

6+
permissions:
7+
contents: read
8+
69
jobs:
710
pre-commit:
811
runs-on: ubuntu-latest
@@ -46,3 +49,19 @@ jobs:
4649
- name: Run pytest
4750
run: uv run --frozen --no-sync pytest
4851
continue-on-error: true
52+
53+
readme-snippets:
54+
runs-on: ubuntu-latest
55+
steps:
56+
- uses: actions/checkout@v4
57+
58+
- uses: astral-sh/setup-uv@v5
59+
with:
60+
enable-cache: true
61+
version: 0.7.2
62+
63+
- name: Install dependencies
64+
run: uv sync --frozen --all-extras --python 3.10
65+
66+
- name: Check README snippets are up to date
67+
run: uv run --frozen scripts/update_readme_snippets.py --check

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ repos:
2323
types: [python]
2424
language: system
2525
pass_filenames: false
26+
exclude: ^README\.md$
2627
- id: pyright
2728
name: pyright
2829
entry: uv run pyright
@@ -36,3 +37,9 @@ repos:
3637
language: system
3738
files: ^(pyproject\.toml|uv\.lock)$
3839
pass_filenames: false
40+
- id: readme-snippets
41+
name: Check README snippets are up to date
42+
entry: uv run scripts/update_readme_snippets.py --check
43+
language: system
44+
files: ^(README\.md|examples/.*\.py|scripts/update_readme_snippets\.py)$
45+
pass_filenames: false

CONTRIBUTING.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,12 @@ uv run ruff check .
4040
uv run ruff format .
4141
```
4242

43-
7. Submit a pull request to the same branch you branched from
43+
7. Update README snippets if you modified example code:
44+
```bash
45+
uv run scripts/update_readme_snippets.py
46+
```
47+
48+
8. Submit a pull request to the same branch you branched from
4449

4550
## Code Style
4651

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy