# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
+SOURCE_DATE:=$(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "+%a, %d %b %Y" || echo "xxx, xx xxx xxxx")
+SOURCE_TIME:=$(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "+%T" || echo "xx:xx:xx")
# Put it first so that "make" without argument is like "make help".
help:
mkdir -p $(BUILDDIR)/source/examples/notebooks/generated
# Black list notebooks from doc build here
$(TOOLSPATH)$(NOTEBOOKBUILD) --parallel --report-errors --skip-existing --execute-only --execution-blacklist statespace_custom_models
+ @echo "Copying notebooks that failed execution (there are usually several in Debian because some need network and/or dependencies we don't have)"
+ cp -nav ../examples/notebooks/*.ipynb -t source/examples/notebooks/generated || true
+ifneq ($(SOURCE_DATE_EPOCH),)
+ @echo "Replacing timestamps and build paths in examples output for reproducibility"
+ for html in `find source/examples/notebooks/generated -name "*.html" -o -name "*.ipynb" -o -name "*.ipynb.txt"` ; do \
+ sed -i -e 's#$(PYTHONPATH)/statsmodels/#/usr/lib/python3/dist-packages/statsmodels/#g' \
+ -e 's# at 0x[0-9a-f]\{8,16\}\(>\|>\)# at 0xadde5de1e8ed\1#g' \
+ -e 's#tmp/ipykernel_[0-9]\+#tmp/ipykernel_nnnnnnn#g' \
+ -e 's#^\s\+.\(iopub.execute_input\|iopub.status.busy\|iopub.status.idle\|shell.execute_reply\).:.*# #g' \
+ -e 's#\(Date:.*\)[A-Z][a-z]\+, \+[0-9]\+,\? \+[A-Z][a-z]\+,\? \+[0-9]\+#\1$(SOURCE_DATE)#g' \
+ -e 's#\(Time:.*\)[0-9][0-9]:[0-9][0-9]:[0-9][0-9]#\1$(SOURCE_TIME)#g' $${html} ; \
+ done
+endif
@echo "Running sphinx-build"
@echo @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(O)
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(O)
# nbsphinx options
nbsphinx_allow_errors = True
+ipython_warning_is_error = False
# sphinxcontrib-spelling options
spelling_word_list_filename = ['spelling_wordlist.txt', 'names_wordlist.txt']
spelling_ignore_pypi_package_names = True
"outputs": [],
"source": [
"mod = STL(y, period=period, seasonal=seasonal)\n",
- "%timeit mod.fit()\n",
+ "# removed for reproducibility: %timeit mod.fit()\n",
"res = mod.fit()\n",
"fig = res.plot(observed=False, resid=False)"
]
" trend_jump=trend_jump,\n",
" low_pass_jump=low_pass_jump,\n",
")\n",
- "%timeit mod.fit()\n",
+ "# removed for reproducibility: %timeit mod.fit()\n",
"res = mod.fit()\n",
"fig = res.plot(observed=False, resid=False)"
]