Skip to content

Commit

Permalink
Generate api stubs as part of doc build
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Kienzle committed Oct 7, 2024
1 parent 66b543a commit 962de3a
Show file tree
Hide file tree
Showing 18 changed files with 13 additions and 260 deletions.
16 changes: 12 additions & 4 deletions doc/sphinx/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,18 @@ SPHINXOPTS = -W --keep-going -n
SPHINXBUILD = $(PYTHON) -m sphinx
PAPER =
BUILDDIR = _build
ifdef ComSpec
RMDIR = rmdir /s/q
else
RMDIR = rm -rf
endif

# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .

.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest build
.PHONY: help api clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest build

help:
@echo "Please use \`make <target>' where <target> is one of"
Expand All @@ -29,9 +34,13 @@ help:
@echo " doctest to run all doctests embedded in the documentation (if enabled)"

clean:
-rm -rf _build/* build/* plots/*.pyc plots/*.png
-rm -rf _build/* build/* plots/*.pyc plots/*.png api

html:
api: genmods.py
-$(RMDIR) api
"$(PYTHON)" genmods.py

html: api
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html
@echo
@echo "Build finished. The HTML pages are in _build/html."
Expand Down Expand Up @@ -91,4 +100,3 @@ doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) _build/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in _build/doctest/output.txt."

15 changes: 0 additions & 15 deletions doc/sphinx/api/activation.rst

This file was deleted.

15 changes: 0 additions & 15 deletions doc/sphinx/api/constants.rst

This file was deleted.

15 changes: 0 additions & 15 deletions doc/sphinx/api/core.rst

This file was deleted.

15 changes: 0 additions & 15 deletions doc/sphinx/api/covalent_radius.rst

This file was deleted.

15 changes: 0 additions & 15 deletions doc/sphinx/api/cromermann.rst

This file was deleted.

15 changes: 0 additions & 15 deletions doc/sphinx/api/crystal_structure.rst

This file was deleted.

15 changes: 0 additions & 15 deletions doc/sphinx/api/density.rst

This file was deleted.

15 changes: 0 additions & 15 deletions doc/sphinx/api/fasta.rst

This file was deleted.

15 changes: 0 additions & 15 deletions doc/sphinx/api/formulas.rst

This file was deleted.

30 changes: 0 additions & 30 deletions doc/sphinx/api/index.rst

This file was deleted.

15 changes: 0 additions & 15 deletions doc/sphinx/api/magnetic_ff.rst

This file was deleted.

15 changes: 0 additions & 15 deletions doc/sphinx/api/mass.rst

This file was deleted.

15 changes: 0 additions & 15 deletions doc/sphinx/api/nsf.rst

This file was deleted.

15 changes: 0 additions & 15 deletions doc/sphinx/api/plot.rst

This file was deleted.

15 changes: 0 additions & 15 deletions doc/sphinx/api/util.rst

This file was deleted.

15 changes: 0 additions & 15 deletions doc/sphinx/api/xsf.rst

This file was deleted.

2 changes: 1 addition & 1 deletion doc/sphinx/genmods.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ def genfiles(package, package_name, modules, dir='api'):
#('__init__', 'Top level namespace'),
('core', 'Core table'),
('formulas', 'Chemical formula operations'),
#('chemicals', 'Chemical database'),
('covalent_radius', 'Covalent radius'),
('constants', 'Fundamental constants'),
('crystal_structure', 'Crystal structure'),
Expand All @@ -69,6 +68,7 @@ def genfiles(package, package_name, modules, dir='api'):
('cromermann', 'X-ray scattering factor f0 calculations'),
('plot', 'Element plotter'),
('util', 'Utility functions'),
('mass_2001', 'Deprecated mass/abundance values'),
]
package='periodictable'
package_name='Reference'
Expand Down

0 comments on commit 962de3a

Please sign in to comment.