diff --git a/docs/Doxyfile_core b/docs/Doxyfile_core new file mode 100644 index 00000000..c74b0118 --- /dev/null +++ b/docs/Doxyfile_core @@ -0,0 +1,13 @@ +PROJECT_NAME = "SRW Core" +OUTPUT_DIRECTORY = build +XML_OUTPUT = doxyxml_core +GENERATE_LATEX = NO +GENERATE_MAN = NO +GENERATE_RTF = NO +CASE_SENSE_NAMES = NO +INPUT = ../src/core +RECURSIVE = YES +QUIET = YES +JAVADOC_AUTOBRIEF = YES +GENERATE_HTML = NO +GENERATE_XML = YES \ No newline at end of file diff --git a/docs/Doxyfile_lib b/docs/Doxyfile_lib new file mode 100644 index 00000000..50f4f976 --- /dev/null +++ b/docs/Doxyfile_lib @@ -0,0 +1,13 @@ +PROJECT_NAME = "SRW Lib" +OUTPUT_DIRECTORY = build +XML_OUTPUT = doxyxml_lib +GENERATE_LATEX = NO +GENERATE_MAN = NO +GENERATE_RTF = NO +CASE_SENSE_NAMES = NO +INPUT = ../src/lib +RECURSIVE = YES +QUIET = YES +JAVADOC_AUTOBRIEF = YES +GENERATE_HTML = NO +GENERATE_XML = YES \ No newline at end of file diff --git a/docs/Makefile b/docs/Makefile index b3dbb02c..3f41e1ff 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -2,7 +2,7 @@ # # You can set these variables from the command line. -SPHINXOPTS = "-W" # This flag turns warnings into errors. +SPHINXOPTS = #"-W" # This flag turns warnings into errors. SPHINXBUILD = sphinx-build SPHINXPROJ = srwpy SOURCEDIR = source @@ -17,4 +17,6 @@ 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 + @doxygen Doxyfile_core + @doxygen Doxyfile_lib @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/source/api/cpp/core.rst b/docs/source/api/cpp/core.rst new file mode 100644 index 00000000..90fad6a0 --- /dev/null +++ b/docs/source/api/cpp/core.rst @@ -0,0 +1,5 @@ +SRW Core +======== + +.. doxygenindex:: + :project: SRWCore diff --git a/docs/source/api/cpp/index.rst b/docs/source/api/cpp/index.rst new file mode 100644 index 00000000..21343bcf --- /dev/null +++ b/docs/source/api/cpp/index.rst @@ -0,0 +1,8 @@ +SRW C++ +======= + +.. toctree:: + :maxdepth: 1 + + core + lib diff --git a/docs/source/api/cpp/lib.rst b/docs/source/api/cpp/lib.rst new file mode 100644 index 00000000..433296cf --- /dev/null +++ b/docs/source/api/cpp/lib.rst @@ -0,0 +1,5 @@ +SRW Lib +======= + +.. doxygenindex:: + :project: SRWLib diff --git a/docs/source/api/index.rst b/docs/source/api/index.rst index edff8508..b1668a92 100644 --- a/docs/source/api/index.rst +++ b/docs/source/api/index.rst @@ -2,8 +2,13 @@ API === .. toctree:: - :maxdepth: 2 + :maxdepth: 1 :caption: Python python/_modules/modules.rst +.. toctree:: + :maxdepth: 1 + :caption: C++ + + cpp/index.rst diff --git a/docs/source/api/python/_modules/modules.rst b/docs/source/api/python/_modules/modules.rst index 717fcac5..0eecc93a 100644 --- a/docs/source/api/python/_modules/modules.rst +++ b/docs/source/api/python/_modules/modules.rst @@ -1,5 +1,5 @@ -srwpy -===== +SRW Python +========== .. toctree:: :maxdepth: 4 diff --git a/docs/source/conf.py b/docs/source/conf.py index 2677ae6c..1916db01 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -17,6 +17,7 @@ # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. +import breathe import os import sys import re @@ -36,7 +37,7 @@ # ones. extensions = [ 'sphinx.ext.autodoc', - 'sphinx.ext.autosummary', + # 'sphinx.ext.autosummary', 'sphinx.ext.githubpages', 'sphinx.ext.intersphinx', 'sphinx.ext.mathjax', @@ -47,6 +48,7 @@ 'numpydoc', 'sphinx_copybutton', 'sphinx_gallery.gen_gallery', + 'breathe' ] autodoc_mock_imports = ["pykern", "skimage"] @@ -208,8 +210,6 @@ ] - - # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = { 'python': ('https://docs.python.org/3/', None), @@ -218,3 +218,12 @@ 'pandas': ('https://pandas.pydata.org/pandas-docs/stable', None), 'matplotlib': ('https://matplotlib.org', None), } + +# -- Options for Breathe output -------------------------------- + +# Breath configuration +breathe_projects = { + 'SRWCore': '../build/doxyxml_core', + 'SRWLib': '../build/doxyxml_lib' +} +breathe_default_project = 'SRWCore' diff --git a/python/requirements-dev.txt b/python/requirements-dev.txt index fe643c0e..3e630881 100644 --- a/python/requirements-dev.txt +++ b/python/requirements-dev.txt @@ -13,6 +13,8 @@ pillow # required by sphinx-gallery sphinx-copybutton sphinx-gallery sphinx_rtd_theme +doxygen +breathe # PyPI deployment tools setuptools twine