diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000..293ca5ad --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,36 @@ +name: Deploy docs to Pages + +on: + push: + branches: ["main"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Allow one concurrent deployment +concurrency: + group: "rtd" + cancel-in-progress: true + +jobs: + # Single deploy job since we're just deploying + build: + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + cache: 'pip' + cache-dependency-path: "docs/requirements.txt" + - name: Build Python + working-directory: python + run: | + python -m pip install -e . + python -m pip install -r ../docs/requirements.txt + - name: Build docs + working-directory: docs + run: | + mkdoc build diff --git a/docs/index.md b/docs/index.md index 7d10cdb8..fca36679 100644 --- a/docs/index.md +++ b/docs/index.md @@ -17,3 +17,4 @@ LanceDB's core is written in Rust 🦀 and is built using Lance, an open-source ## Documentation Quick Links * `Quick start` - search and filter a hello world vector dataset with LanceDB using the Python SDK. +* [`API Reference`](python.md) - detailed documentation for the LanceDB Python SDK. \ No newline at end of file diff --git a/docs/python.md b/docs/python.md new file mode 100644 index 00000000..c04c45a4 --- /dev/null +++ b/docs/python.md @@ -0,0 +1,12 @@ +# LanceDB Python API Reference + +## Installation + +```shell +pip install lancedb +``` + +::: lancedb +::: lancedb.db +::: lancedb.table +::: lancedb.query diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 00000000..1fbe6277 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,3 @@ +mkdocs==1.4.2 +mkdocs-material==9.1.3 +mkdocstrings[python]==0.20.0 diff --git a/mkdocs.yml b/mkdocs.yml index f988ae82..d23cdb90 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1 +1,12 @@ site_name: LanceDB Documentation + +theme: + name: "material" + +plugins: +- search +- mkdocstrings + +nav: +- Home: index.md +- Python API: python.md \ No newline at end of file