File tree 4 files changed +10
-14
lines changed
4 files changed +10
-14
lines changed Original file line number Diff line number Diff line change @@ -56,17 +56,14 @@ jobs:
56
56
57
57
- run : uv run python -c 'import docs.plugins.main'
58
58
59
- # Adding local symlinks gets nice source locations like
60
- # pydantic_core/core_schema.py
61
- # instead of
62
- # .venv/lib/python3.10/site-packages/pydantic_core/core_schema.py
59
+ # Taken from docs-build.sh
63
60
- name : prepare shortcuts for extra modules
64
61
run : |
65
62
ln -s .venv/lib/python*/site-packages/pydantic_core pydantic_core
66
63
ln -s .venv/lib/python*/site-packages/pydantic_settings pydantic_settings
67
64
ln -s .venv/lib/python*/site-packages/pydantic_extra_types pydantic_extra_types
68
65
69
- - run : uv run mkdocs build
66
+ - run : PYTHONPATH="$PWD${PYTHONPATH:+:${PYTHONPATH}}" uv run mkdocs build
70
67
71
68
test-memray :
72
69
name : Test memray
Original file line number Diff line number Diff line change 77
77
78
78
- run : uv run python -c 'import docs.plugins.main'
79
79
80
- # Adding local symlinks gets nice source locations like
81
- # pydantic_core/core_schema.py
82
- # instead of
83
- # .venv/lib/python3.10/site-packages/pydantic_core/core_schema.py
80
+ # Taken from docs-build.sh
84
81
- name : Prepare shortcuts for extra modules
85
82
run : |
86
83
ln -s .venv/lib/python*/site-packages/pydantic_core pydantic_core
92
89
git config --global user.name "${{ github.actor }}"
93
90
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
94
91
95
- - run : uv run mike deploy -b docs-site dev --push
92
+ - run : PYTHONPATH="$PWD${PYTHONPATH:+:${PYTHONPATH}}" uv run mike deploy -b docs-site dev --push
96
93
if : github.ref == 'refs/heads/main'
97
94
98
95
- if : github.ref == 'refs/heads/docs-update' || startsWith(github.ref, 'refs/tags/')
102
99
version_file_path : ' pydantic/version.py'
103
100
skip_env_check : true
104
101
105
- - run : uv run mike deploy -b docs-site ${{ steps.check-version.outputs.VERSION_MAJOR_MINOR }} latest --update-aliases --push
102
+ - run : PYTHONPATH="$PWD${PYTHONPATH:+:${PYTHONPATH}}" uv run mike deploy -b docs-site ${{ steps.check-version.outputs.VERSION_MAJOR_MINOR }} latest --update-aliases --push
106
103
if : ${{ (github.ref == 'refs/heads/docs-update' || startsWith(github.ref, 'refs/tags/')) && !fromJSON(steps.check-version.outputs.IS_PRERELEASE) }}
107
104
env :
108
105
PYDANTIC_VERSION : v${{ steps.check-version.outputs.VERSION }}
Original file line number Diff line number Diff line change @@ -16,8 +16,10 @@ python3 -m uv run python -c 'import docs.plugins.main'
16
16
# pydantic_core/core_schema.py
17
17
# instead of
18
18
# .venv/lib/python3.10/site-packages/pydantic_core/core_schema.py
19
+ # See also: mkdocs.yml:mkdocstrings:handlers:python:paths: [.]:
19
20
ln -s .venv/lib/python* /site-packages/pydantic_core pydantic_core
20
21
ln -s .venv/lib/python* /site-packages/pydantic_settings pydantic_settings
21
22
ln -s .venv/lib/python* /site-packages/pydantic_extra_types pydantic_extra_types
22
-
23
- python3 -m uv run --no-sync mkdocs build
23
+ # Put these at the front of PYTHONPATH (otherwise, symlinked
24
+ # entries will still have "Source code in .venv/lib/.../*.py ":
25
+ PYTHONPATH=" $PWD ${PYTHONPATH: +: ${PYTHONPATH} } " python3 -m uv run --no-sync mkdocs build
Original file line number Diff line number Diff line change @@ -244,7 +244,7 @@ plugins:
244
244
- mkdocstrings :
245
245
handlers :
246
246
python :
247
- paths : [.]
247
+ paths : [.] # see also: build-docs.sh
248
248
options :
249
249
members_order : source
250
250
separate_signature : true
You can’t perform that action at this time.
0 commit comments