diff --git a/docs/Makefile b/docs/Makefile index f314f67a..ea57da8b 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -17,4 +17,4 @@ help: # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile - @OCS_DOC_BUILD=True $(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/conf.py b/docs/conf.py index 35320a4f..1151305b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -75,6 +75,8 @@ # Have __init__ and class docstrings both show up autoclass_content = "both" +autodoc_mock_imports = ['spt3g', 'so3g'] + # -- Options for HTML output ------------------------------------------------- diff --git a/ocs/agent/aggregator.py b/ocs/agent/aggregator.py index bb0e90a3..cb997f63 100644 --- a/ocs/agent/aggregator.py +++ b/ocs/agent/aggregator.py @@ -9,13 +9,8 @@ from ocs import ocs_feed -if os.getenv('OCS_DOC_BUILD') != 'True': - from spt3g import core - import so3g - G3Module = core.G3Module -else: - # Alias classes that are needed for clean import in docs build. - G3Module = object +from spt3g import core +import so3g HKAGG_VERSION = 2 @@ -456,7 +451,7 @@ def to_frame(self, hksess=None, clear=False): return frame -class G3FileRotator(G3Module): +class G3FileRotator(core.G3Module): """ G3 module which handles file rotation. After time_per_file has elapsed, the rotator will end that file and create