Skip to content

Commit 9fbb0e8

Browse files
committed
docs: update Makefile targets to use uv (docs, docs-full)
1 parent f44f40c commit 9fbb0e8

File tree

1 file changed

+20
-16
lines changed

1 file changed

+20
-16
lines changed

Makefile

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ PIP := $(PYTHON) -m pip
2020
MKDOCS := mkdocs
2121
MIKE := mike
2222

23-
.PHONY: check checkinstall checkupdate install docsinstall docsbuild clean test
23+
.PHONY: check checkinstall checkupdate install docs docs-full clean test
2424

2525
check:
2626
@echo "Running pre-commit checks..."
@@ -42,23 +42,27 @@ checkupdate: checkinstall
4242
pre-commit autoupdate
4343

4444
install:
45-
@echo "Installing dependencies..."
46-
@if [ -f requirements-dev.txt ]; then \
47-
$(PIP) install -r requirements-dev.txt; \
48-
else \
49-
echo "Error: requirements-dev.txt not found."; \
50-
exit 1; \
51-
fi
45+
@echo "(Deprecated shim) Use 'uv sync --group docs --group dev' instead of 'make install'."
46+
@command -v uv >/dev/null 2>&1 || (echo 'uv not found, install via: curl -LsSf https://astral.sh/uv/install.sh | sh' && exit 1)
47+
uv sync --group docs --group dev
5248

53-
docsinstall:
54-
@echo "Installing documentation dependencies..."
55-
$(PIP) install -r requirements-docs.txt
49+
docs:
50+
@echo "Building MkDocs site (dependencies via uv)"
51+
@command -v uv >/dev/null 2>&1 || (echo 'uv not found, install via: curl -LsSf https://astral.sh/uv/install.sh | sh' && exit 1)
52+
uv sync --group docs
53+
uv run mkdocs serve
5654

57-
docsbuild: docsinstall
58-
@echo "Building documentation..."
59-
$(MKDOCS) build
60-
$(MIKE) deploy --update-aliases latest-snapshot -b website -p
61-
$(MIKE) serve
55+
docs-full:
56+
@echo "Building full documentation (MkDocs + Sphinx Python API)"
57+
@command -v uv >/dev/null 2>&1 || (echo 'uv not found, install via: curl -LsSf https://astral.sh/uv/install.sh | sh' && exit 1)
58+
uv sync --group docs
59+
SPARK_VERSION=$$(mvn help:evaluate -Dexpression=spark.version -q -DforceStdout); \
60+
uv pip install pyspark==$$SPARK_VERSION; \
61+
uv pip install -e python/.[all]; \
62+
uv run bash -c 'cd python/sedona/doc && make clean && make html'; \
63+
mkdir -p docs/api/pydocs; \
64+
cp -r python/sedona/doc/_build/html/* docs/api/pydocs/; \
65+
uv run mkdocs build
6266

6367
clean:
6468
@echo "Cleaning up generated files... (TODO)"

0 commit comments

Comments
 (0)