Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 2 additions & 0 deletions .github/workflows/gh-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ jobs:
run: |
tox -e spec-docs
touch .tox/docs/.nojekyll
env:
DOCC_SKIP_DIFFS: ${{ (github.event_name != 'push' || github.ref_name != github.event.repository.default_branch) && '1' || '' }}
Comment thread
kevaundray marked this conversation as resolved.

- name: Upload Pages Artifact
id: artifact
Expand Down
5 changes: 5 additions & 0 deletions src/ethereum_spec_tools/docc.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import dataclasses
import logging
import os
from collections import defaultdict
from itertools import tee, zip_longest
from pathlib import PurePath
Expand Down Expand Up @@ -89,6 +90,10 @@ def discover(self, known: FrozenSet[T]) -> Iterator[Source]:
"""
Find sources.
"""
if os.environ.get("DOCC_SKIP_DIFFS"):
logging.info("Skipping diff discovery (DOCC_SKIP_DIFFS)")
return

forks = {f.path: f for f in self.forks if f.path is not None}

by_fork: Dict[Hardfork, Dict[PurePath, Source]] = defaultdict(dict)
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ commands =
[testenv:spec-docs]
description = Generate documentation for the specification code using docc
basepython = python3
passenv = DOCC_SKIP_DIFFS
commands =
docc --output "{toxworkdir}/docs"
python -c 'import pathlib; print("documentation available under file://\{0\}".format(pathlib.Path(r"{toxworkdir}") / "docs" / "index.html"))'
Expand Down
Loading