Skip to content

Commit 3142084

Browse files
authored
Merge branch 'main' into cherry-pick-9352949
2 parents 66c844a + a3a4b8d commit 3142084

File tree

300 files changed

+31818
-4354
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

300 files changed

+31818
-4354
lines changed

.git-blame-ignore-revs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
# Applied 120 line-length rule to all files: https://github.com/modelcontextprotocol/python-sdk/pull/856
22
543961968c0634e93d919d509cce23a1d6a56c21
3+
4+
# Added 100% code coverage baseline with pragma comments: https://github.com/modelcontextprotocol/python-sdk/pull/1553
5+
89e9c43acf7e23cf766357d776ec1ce63ac2c58e

.gitattribute

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Generated
2+
uv.lock linguist-generated=true

.github/CODEOWNERS

Lines changed: 0 additions & 23 deletions
This file was deleted.

.github/workflows/publish-docs-manually.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
uses: astral-sh/setup-uv@v3
2020
with:
2121
enable-cache: true
22-
version: 0.7.2
22+
version: 0.9.5
2323

2424
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
2525
- uses: actions/cache@v4

.github/workflows/publish-pypi.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
uses: astral-sh/setup-uv@v3
1717
with:
1818
enable-cache: true
19-
version: 0.7.2
19+
version: 0.9.5
2020

2121
- name: Set up Python 3.12
2222
run: uv python install 3.12
@@ -68,7 +68,7 @@ jobs:
6868
uses: astral-sh/setup-uv@v3
6969
with:
7070
enable-cache: true
71-
version: 0.7.2
71+
version: 0.9.5
7272

7373
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
7474
- uses: actions/cache@v4

.github/workflows/shared.yml

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,56 +13,63 @@ jobs:
1313
pre-commit:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v5
1717

18-
- uses: astral-sh/setup-uv@v5
18+
- uses: astral-sh/setup-uv@v7
1919
with:
2020
enable-cache: true
21-
version: 0.7.2
22-
21+
version: 0.9.5
2322
- name: Install dependencies
2423
run: uv sync --frozen --all-extras --python 3.10
2524

26-
- uses: pre-commit/[email protected].0
25+
- uses: pre-commit/[email protected].1
2726
with:
2827
extra_args: --all-files --verbose
2928
env:
3029
SKIP: no-commit-to-branch
3130

3231
test:
32+
name: test (${{ matrix.python-version }}, ${{ matrix.dep-resolution.name }}, ${{ matrix.os }})
3333
runs-on: ${{ matrix.os }}
3434
timeout-minutes: 10
3535
continue-on-error: true
3636
strategy:
3737
matrix:
3838
python-version: ["3.10", "3.11", "3.12", "3.13"]
39-
dep-resolution: ["lowest-direct", "highest"]
39+
dep-resolution:
40+
- name: lowest-direct
41+
install-flags: "--upgrade --resolution lowest-direct"
42+
- name: highest
43+
install-flags: "--upgrade --resolution highest"
4044
os: [ubuntu-latest, windows-latest]
4145

4246
steps:
43-
- uses: actions/checkout@v4
47+
- uses: actions/checkout@v5
4448

4549
- name: Install uv
46-
uses: astral-sh/setup-uv@v3
50+
uses: astral-sh/setup-uv@v7
4751
with:
4852
enable-cache: true
49-
version: 0.7.2
53+
version: 0.9.5
5054

5155
- name: Install the project
52-
run: uv sync --frozen --all-extras --python ${{ matrix.python-version }} --resolution ${{ matrix.dep-resolution }}
56+
run: uv sync ${{ matrix.dep-resolution.install-flags }} --all-extras --python ${{ matrix.python-version }}
5357

54-
- name: Run pytest
55-
run: uv run --frozen --no-sync pytest
58+
- name: Run pytest with coverage
59+
run: |
60+
uv run --frozen --no-sync coverage run -m pytest
61+
uv run --frozen --no-sync coverage combine
62+
uv run --frozen --no-sync coverage report
5663
5764
readme-snippets:
5865
runs-on: ubuntu-latest
5966
steps:
60-
- uses: actions/checkout@v4
67+
- uses: actions/checkout@v5
6168

62-
- uses: astral-sh/setup-uv@v5
69+
- uses: astral-sh/setup-uv@v7
6370
with:
6471
enable-cache: true
65-
version: 0.7.2
72+
version: 0.9.5
6673

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

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ coverage.xml
5252
*.py,cover
5353
.hypothesis/
5454
.pytest_cache/
55+
.ruff_cache/
5556
cover/
5657

5758
# Translations
@@ -88,7 +89,7 @@ ipython_config.py
8889
# pyenv
8990
# For a library or package, you might want to ignore these files since the code is
9091
# intended to run in multiple environments; otherwise, check them in:
91-
# .python-version
92+
.python-version
9293

9394
# pipenv
9495
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
@@ -168,3 +169,6 @@ cython_debug/
168169
.vscode/
169170
.windsurfrules
170171
**/CLAUDE.local.md
172+
173+
# claude code
174+
.claude/

.pre-commit-config.yaml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
fail_fast: true
22

33
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v6.0.0
6+
hooks:
7+
- id: end-of-file-fixer
8+
49
- repo: https://github.com/pre-commit/mirrors-prettier
510
rev: v3.1.0
611
hooks:
@@ -25,22 +30,22 @@ repos:
2530
hooks:
2631
- id: ruff-format
2732
name: Ruff Format
28-
entry: uv run ruff
33+
entry: uv run --frozen ruff
2934
args: [format]
3035
language: system
3136
types: [python]
3237
pass_filenames: false
3338
- id: ruff
3439
name: Ruff
35-
entry: uv run ruff
40+
entry: uv run --frozen ruff
3641
args: ["check", "--fix", "--exit-non-zero-on-fix"]
3742
types: [python]
3843
language: system
3944
pass_filenames: false
4045
exclude: ^README\.md$
4146
- id: pyright
4247
name: pyright
43-
entry: uv run pyright
48+
entry: uv run --frozen pyright
4449
language: system
4550
types: [python]
4651
pass_filenames: false
@@ -52,7 +57,7 @@ repos:
5257
pass_filenames: false
5358
- id: readme-snippets
5459
name: Check README snippets are up to date
55-
entry: uv run scripts/update_readme_snippets.py --check
60+
entry: uv run --frozen python scripts/update_readme_snippets.py --check
5661
language: system
5762
files: ^(README\.md|examples/.*\.py|scripts/update_readme_snippets\.py)$
5863
pass_filenames: false

CLAUDE.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ This document contains critical information about working with this codebase. Fo
4848
the problem it tries to solve, and how it is solved. Don't go into the specifics of the
4949
code unless it adds clarity.
5050

51-
- Always add `jerome3o-anthropic` and `jspahrsummers` as reviewer.
52-
5351
- NEVER ever mention a `co-authored-by` or similar aspects. In particular, never
5452
mention the tool used to create the commit message or PR.
5553

0 commit comments

Comments
 (0)