diff --git a/.gitignore b/.gitignore index d02a028..400b39d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,109 +1,108 @@ .DS_Store tmp* -docs/xml -docs/html +docs/_doxygen # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] *$py.class # C extensions *.so # Distribution / packaging .Python build/ develop-eggs/ dist/ downloads/ eggs/ .eggs/ lib/ lib64/ parts/ sdist/ var/ wheels/ *.egg-info/ .installed.cfg *.egg MANIFEST # PyInstaller # Usually these files are written by a python script from a template # before PyInstaller builds the exe, so as to inject date/other infos into it. *.manifest *.spec # Installer logs pip-log.txt pip-delete-this-directory.txt # Unit test / coverage reports htmlcov/ .tox/ .coverage .coverage.* .cache nosetests.xml coverage.xml *.cover .hypothesis/ .pytest_cache/ # Translations *.mo *.pot # Django stuff: *.log local_settings.py db.sqlite3 # Flask stuff: instance/ .webassets-cache # Scrapy stuff: .scrapy # Sphinx documentation docs/_build/ # PyBuilder target/ # Jupyter Notebook .ipynb_checkpoints # pyenv .python-version # celery beat schedule file celerybeat-schedule # SageMath parsed files *.sage.py # Environments .env .venv env/ venv/ ENV/ env.bak/ venv.bak/ # Spyder project settings .spyderproject .spyproject # Rope project settings .ropeproject # mkdocs documentation /site # mypy .mypy_cache/ diff --git a/.readthedocsenv.yml b/.readthedocsenv.yml index 3f7f02e..b4d0d9e 100644 --- a/.readthedocsenv.yml +++ b/.readthedocsenv.yml @@ -1,10 +1,12 @@ channels: - conda-forge dependencies: - doxygen - breathe - sphinx - sphinx_rtd_theme + - cmake + - setuptools_scm - python-goosefem - pyxtensor - eigen diff --git a/docs/conf.py b/docs/conf.py index 94e3772..de203fb 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,74 +1,76 @@ # Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If extensions (or modules to document with autodoc) are in another directory, # 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 os import sys +import tempfile # sys.path.insert(0, os.path.abspath('.')) # -- Run Doxygen ------------------------------------------------------------- import subprocess -read_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True' +doxydir = "_doxygen" -if read_the_docs_build: - - subprocess.call('doxygen', shell=True) +if not os.path.isdir(doxydir): + os.mkdir(doxydir) +subprocess.call('cmake .. -B{0:s} -DBUILD_DOCS=1'.format(doxydir), shell=True) +subprocess.call('cd {0:s}; make docs'.format(doxydir), shell=True) # -- Project information ----------------------------------------------------- project = 'GooseFEM' copyright = '2017-2021, Tom de Geus' author = 'Tom de Geus' # -- General configuration --------------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ "breathe", 'sphinx.ext.imgmath', 'sphinx.ext.todo', 'sphinx.ext.autodoc', 'sphinx.ext.autosummary', ] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path. exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # html_theme = 'sphinx_rtd_theme' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] # -- Breathe configuration --------------------------------------------------- breathe_projects = { - "GooseFEM": "../build/xml/", + "GooseFEM": "{0:s}/xml/".format(doxydir), }