Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
13 changes: 8 additions & 5 deletions .github/workflows/jekyll-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ jobs:
with:
python-version: "3.12"

- name: Install UV
uses: astral-sh/setup-uv@v8.0.0

- name: Install pymatgen with docs dependencies
run: |
pip install -e ".[docs]"
pip install sphinx sphinx-rtd-theme sphinx_markdown_builder
run: uv sync --group docs

- name: Generate Sphinx API docs
working-directory: docs
Expand All @@ -49,12 +50,14 @@ jobs:
rsync -a ../pymatgen-core/src/pymatgen/ "$MERGED/"
rsync -a ../src/pymatgen/ "$MERGED/"
echo ".. This file is required as the Sphinx master_doc entry point. Content is generated by sphinx-apidoc." > apidoc/index.rst
sphinx-apidoc --implicit-namespaces -M -d 7 -o apidoc -f "$MERGED"
sphinx-build -b html apidoc html
uv run sphinx-apidoc --implicit-namespaces -M -d 7 -o apidoc -f "$MERGED"
uv run sphinx-build -b html apidoc html
rm -rf .apidoc_merge
rm apidoc/*.rst
mv html/pymatgen*.html .
mv html/modules.html .
cp -r html/_static _static
touch .nojekyll

- name: Setup Pages
uses: actions/configure-pages@v5
Expand Down
5 changes: 4 additions & 1 deletion docs/_config.yml

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

3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,7 @@ reportInvalidTypeForm = false
exclude = ["**/tests"]

[tool.uv]
# TODO: remove `docs` once doc generation is automated
default-groups = ["dev", "test", "lint", "docs"]
default-groups = ["dev", "test", "lint"]

[dependency-groups]
dev = [
Expand Down
Loading