Skip to content

Commit

Permalink
update python docs action
Browse files Browse the repository at this point in the history
  • Loading branch information
emgeee committed Nov 14, 2024
1 parent 381d56f commit ef577e7
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 11 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/python-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: py-denormalized
working-directory: ./py-denormalized
steps:
- uses: actions/checkout@v4

Expand All @@ -29,13 +29,20 @@ jobs:
with:
version: "0.5.1"
enable-cache: true
cache-dependency-glob: "uv.lock"
cache-dependency-glob: "py-denormalized/uv.lock"

- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version-file: "py-denormalized/pyproject.toml"

- name: Set up Python
run: uv python install
- name: Install the project
run: uv sync --all-extras --dev
- run: pdoc -t pdocs/ python/denormalized/ -o pdocs/_build
run: uv sync --no-dev --group docs --extra feast

- name: Configure Virtual Environment
run: |
source .venv/bin/activate
pdoc -t pdocs/ python/denormalized/ -o pdocs/_build
- uses: actions/upload-pages-artifact@v3
with:
Expand All @@ -48,7 +55,7 @@ jobs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: py-denormalized
working-directory: ./py-denormalized
permissions:
pages: write
id-token: write
Expand Down
7 changes: 6 additions & 1 deletion py-denormalized/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ dependencies = [
"datafusion>=40.1.0",
]

[project.optional-dependencies]
feast = ["feast"]

[dependency-groups]
dev = [
"pdoc>=15.0.0",
Expand All @@ -25,7 +28,9 @@ dev = [
"pdoc>=15.0.0",
"pip>=24.3.1",
]
feast = ["feast"]
docs = [
"pdoc>=15.0.0",
]

[tool.maturin]
python-source = "python"
Expand Down
2 changes: 2 additions & 0 deletions py-denormalized/python/denormalized/feast_data_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ class FeastDataStream(DataStream, metaclass=FeastDataStreamMeta):
This class extends DataStream to provide integration with Feast feature stores
and related functionality.
You must install with the extra 'feast': `pip install denormalized[feast]`
"""

def __init__(self, stream: Union[PyDataStream, DataStream]) -> None:
Expand Down
12 changes: 9 additions & 3 deletions py-denormalized/uv.lock

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

0 comments on commit ef577e7

Please sign in to comment.