From 6d5b689298ca719129830fbbfabf4d6b12e5963a Mon Sep 17 00:00:00 2001 From: Sydney Runkle <54324534+sydney-runkle@users.noreply.github.com> Date: Thu, 2 May 2024 08:00:22 -0500 Subject: [PATCH] Add docs link to demo, disable typescript docs for now (#299) --- .github/workflows/ci.yml | 10 +++++++--- Makefile | 9 +++++++++ README.md | 2 ++ build-docs.sh | 8 +++++--- demo/main.py | 2 ++ docs/api/typescript_components.md | 6 ++++-- 6 files changed, 29 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f10a151e..73f4723f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,13 +45,17 @@ jobs: with: python-version: '3.11' + # note: PPPR_TOKEN is not available on PRs sourced from forks, but the necessary + # dependencies are also listed in docs.txt :) - name: install run: | pip install --upgrade pip + pip install --extra-index-url https://pydantic:${PPPR_TOKEN}@pppr.pydantic.dev/simple/ mkdocs-material mkdocstrings-python pip install -r requirements/docs.txt - pip install --extra-index-url https://pydantic:${PPPR_TOKEN}@pppr.pydantic.dev/simple/ mkdocs-material mkdocstrings-python griffe-typedoc mkdocstrings-typescript - npm install - npm install -g typedoc + # note -- we can use these in the future when mkdocstrings-typescript and griffe-typedoc beocome publicly available + # pip install --extra-index-url https://pydantic:${PPPR_TOKEN}@pppr.pydantic.dev/simple/ mkdocs-material mkdocstrings-python griffe-typedoc mkdocstrings-typescript + # npm install + # npm install -g typedoc env: PPPR_TOKEN: ${{ secrets.PPPR_TOKEN }} diff --git a/Makefile b/Makefile index b30c3f3a..d402340c 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,15 @@ install: pip install -e $(path) pre-commit install + +.PHONY: install-docs +install-docs: + pip install -r requirements/docs.txt + +# note -- mkdocstrings-typescript and griffe-typedoc are not yet publicly available +# but the following can be added above the pip install -r requirements/docs.txt line in the future +# pip install mkdocstrings-python mkdocstrings-typescript griffe-typedoc + .PHONY: update-lockfiles update-lockfiles: @echo "Updating requirements files using pip-compile" diff --git a/README.md b/README.md index 5923b746..dbd12d47 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # FastUI +Find the documentation [here](https://docs.pydantic.dev/fastui/). + [![CI](https://github.com/pydantic/FastUI/actions/workflows/ci.yml/badge.svg)](https://github.com/pydantic/FastUI/actions?query=event%3Apush+branch%3Amain+workflow%3ACI) [![pypi](https://img.shields.io/pypi/v/fastui.svg)](https://pypi.python.org/pypi/fastui) [![versions](https://img.shields.io/pypi/pyversions/fastui.svg)](https://github.com/pydantic/FastUI) diff --git a/build-docs.sh b/build-docs.sh index 22f3875a..e32c75ec 100755 --- a/build-docs.sh +++ b/build-docs.sh @@ -5,9 +5,11 @@ set -x python3 -V +python3 -m pip install --extra-index-url https://pydantic:${PPPR_TOKEN}@pppr.pydantic.dev/simple/ mkdocs-material mkdocstrings-python python3 -m pip install -r ./requirements/docs.txt -pip install --extra-index-url https://pydantic:$PPPR_TOKEN@pppr.pydantic.dev/simple/ mkdocs-material mkdocstrings-python griffe-typedoc mkdocstrings-typescript -npm install -npm install -g typedoc +# note -- we can use these in the future when mkdocstrings-typescript and griffe-typedoc beocome publicly available +# python3 -m pip install --extra-index-url https://pydantic:$PPPR_TOKEN@pppr.pydantic.dev/simple/ mkdocs-material mkdocstrings-python griffe-typedoc mkdocstrings-typescript +# npm install +# npm install -g typedoc python3 -m mkdocs build diff --git a/demo/main.py b/demo/main.py index 00cee5c7..0ce0b167 100644 --- a/demo/main.py +++ b/demo/main.py @@ -16,6 +16,8 @@ def api_index() -> list[AnyComponent]: This site provides a demo of [FastUI](https://github.com/pydantic/FastUI), the code for the demo is [here](https://github.com/pydantic/FastUI/tree/main/demo). +You can find the documentation for FastUI [here](https://docs.pydantic.dev/fastui/). + The following components are demonstrated: * `Markdown` — that's me :-) diff --git a/docs/api/typescript_components.md b/docs/api/typescript_components.md index 29d706a6..4577df53 100644 --- a/docs/api/typescript_components.md +++ b/docs/api/typescript_components.md @@ -3,5 +3,7 @@ !!! warning "🚧 Work in Progress" This page is a work in progress. -::: @pydantic/fastui - handler: typescript + +