Skip to content

Commit e5bfa1e

Browse files
authored
Move mkdocs to use poetry as docs (#1486)
* poetry add $(cat mkdocs/requirements.txt | grep -v #) --group dev * add `make docs` * update instructions * strict mode * make docs-build * docs-serve * add comment * add docs as dep group * add make install-poetry
1 parent 59fffe3 commit e5bfa1e

File tree

7 files changed

+707
-46
lines changed

7 files changed

+707
-46
lines changed

.github/workflows/python-ci-docs.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ jobs:
3636

3737
steps:
3838
- uses: actions/checkout@v4
39+
- name: Install poetry
40+
run: make install-poetry
3941
- uses: actions/setup-python@v5
4042
with:
4143
python-version: 3.12
4244
- name: Install
43-
working-directory: ./mkdocs
44-
run: pip install -r requirements.txt
45-
- name: Build
46-
working-directory: ./mkdocs
47-
run: mkdocs build --strict
45+
run: make docs-install
46+
- name: Build docs
47+
run: make docs-build

.github/workflows/python-release-docs.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ jobs:
3131

3232
steps:
3333
- uses: actions/checkout@v4
34+
- name: Install poetry
35+
run: make install-poetry
3436
- uses: actions/setup-python@v5
3537
with:
3638
python-version: ${{ matrix.python }}
37-
- name: Install
38-
working-directory: ./mkdocs
39-
run: pip install -r requirements.txt
40-
- name: Build
41-
working-directory: ./mkdocs
42-
run: mkdocs build --strict
39+
- name: Install docs
40+
run: make docs-install
41+
- name: Build docs
42+
run: make docs-build
4343
- name: Copy
4444
working-directory: ./mkdocs
4545
run: mv ./site /tmp/site

Makefile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ install-poetry: ## Install poetry if the user has not done that yet.
2727
echo "Poetry is already installed."; \
2828
fi
2929

30-
install-dependencies: ## Install dependencies including dev and all extras
30+
install-dependencies: ## Install dependencies including dev, docs, and all extras
3131
poetry install --all-extras
3232

3333
install: | install-poetry install-dependencies
@@ -97,3 +97,12 @@ clean: ## Clean up the project Python working environment
9797
@find . -name "*.pyd" -exec echo Deleting {} \; -delete
9898
@find . -name "*.pyo" -exec echo Deleting {} \; -delete
9999
@echo "Cleanup complete"
100+
101+
docs-install:
102+
poetry install --with docs
103+
104+
docs-serve:
105+
poetry run mkdocs serve -f mkdocs/mkdocs.yml
106+
107+
docs-build:
108+
poetry run mkdocs build -f mkdocs/mkdocs.yml --strict

mkdocs/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ The pyiceberg docs are stored in `docs/`.
2222
## Running docs locally
2323

2424
```sh
25-
pip3 install -r requirements.txt
26-
mkdocs serve
27-
open http://localhost:8000/
25+
make docs-install
26+
make docs-serve
2827
```

mkdocs/requirements.txt

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)