Skip to content

Commit

Permalink
Add docs link to demo, disable typescript docs for now (#299)
Browse files Browse the repository at this point in the history
  • Loading branch information
sydney-runkle authored May 2, 2024
1 parent 3f90dfb commit 6d5b689
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 8 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
8 changes: 5 additions & 3 deletions build-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions demo/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 :-)
Expand Down
6 changes: 4 additions & 2 deletions docs/api/typescript_components.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@
!!! warning "🚧 Work in Progress"
This page is a work in progress.

::: @pydantic/fastui
handler: typescript
<!-- Note -- we will enable this in the future when mkdocstrings-typescript and griffe-typedoc
Have publicly available options -->
<!-- ::: @pydantic/fastui
handler: typescript -->

0 comments on commit 6d5b689

Please sign in to comment.