Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include typehints in pdoc #379

Merged
merged 3 commits into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 6 additions & 18 deletions .github/workflows/docs-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
- name: Setup venv
run: |
python3 -m venv .venv
.venv/bin/python -m pip install poetry

- uses: dtolnay/rust-toolchain@nightly

Expand All @@ -40,27 +41,15 @@ jobs:
- name: Install Protoc
uses: arduino/setup-protoc@v2
with:
version: "23.2"
version: "27.1"
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install dependencies
run: |
.venv/bin/pip install \
grpcio \
grpcio-tools \
"protobuf==3.20.3" \
mkdocs \
pdoc \
mkdocs-material \
mkdocs-redirects \
pymdown-extensions \
ghp-import \
pdoc \
cairosvg \
pillow \
typing_extensions \
mypy

cd libs/gl-client-py/
poetry export --without-hashes --with=docs > /tmp/requirements.txt
.venv/bin/pip install -U -r /tmp/requirements.txt

- name: Build and install gl-client-py
run: |
(cd libs/gl-client-py; ../../.venv/bin/maturin develop)
Expand All @@ -71,7 +60,6 @@ jobs:
DOCSREMOTE: "origin"
GITHUB_TOKEN: "${{ secrets.GH_PAGES_PAT }}"
run: |
rm libs/gl-client-py/glclient/*.pyi
PATH=$(pwd)/.venv/bin:$PATH make docs

- name: Deploy
Expand Down
7 changes: 4 additions & 3 deletions libs/gl-client-py/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ PROTODIR=${REPO}/libs/proto

PYPROTOC_OPTS = \
-I ${PROTODIR} \
--python_out=. \
--grpc_python_out=. \
--mypy_out=. \
--python_out=${PYDIR} \
--grpc_python_out=${PYDIR} \
--mypy_out=${PYDIR} \
--mypy_grpc_out=${PYDIR} \
--experimental_allow_proto3_optional

PYPROTOS = \
Expand Down
5 changes: 3 additions & 2 deletions libs/gl-client-py/glclient/greenlight_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading