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

[infra] Move mkdocs to use poetry as docs group dep #1486

Merged
merged 9 commits into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from 5 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
8 changes: 3 additions & 5 deletions .github/workflows/python-ci-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ jobs:
with:
python-version: 3.12
- name: Install
working-directory: ./mkdocs
run: pip install -r requirements.txt
- name: Build
working-directory: ./mkdocs
run: mkdocs build --strict
run: make install
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will probably slow down the runs of the docs builds (since we install everything), do you have any numbers?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

@kevinjqliu kevinjqliu Jan 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

im not sure if this is apple-to-apple.
alternatively, we can add the mkdoc deps as a new poetry group and just install those

poetry install --with docs

- name: Build docs
run: make docs-build
8 changes: 3 additions & 5 deletions .github/workflows/python-release-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,9 @@ jobs:
with:
python-version: ${{ matrix.python }}
- name: Install
working-directory: ./mkdocs
run: pip install -r requirements.txt
- name: Build
working-directory: ./mkdocs
run: mkdocs build --strict
run: make install
- name: Build docs
run: make docs-build
- name: Copy
working-directory: ./mkdocs
run: mv ./site /tmp/site
Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,9 @@ clean: ## Clean up the project Python working environment
@find . -name "*.pyd" -exec echo Deleting {} \; -delete
@find . -name "*.pyo" -exec echo Deleting {} \; -delete
@echo "Cleanup complete"

docs:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we call this one docs-serve for completeness?

poetry run mkdocs serve -f mkdocs/mkdocs.yml

docs-build:
poetry run mkdocs build -f mkdocs/mkdocs.yml --strict
5 changes: 2 additions & 3 deletions mkdocs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ The pyiceberg docs are stored in `docs/`.
## Running docs locally

```sh
pip3 install -r requirements.txt
mkdocs serve
open http://localhost:8000/
make install
make docs
```
28 changes: 0 additions & 28 deletions mkdocs/requirements.txt

This file was deleted.

Loading
Loading