Skip to content

Commit

Permalink
Cleanup configuration files
Browse files Browse the repository at this point in the history
  • Loading branch information
tdegeus committed Oct 16, 2022
1 parent 0d5b208 commit baf7de4
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 94 deletions.
8 changes: 0 additions & 8 deletions .ci_environment_docs.yaml

This file was deleted.

15 changes: 0 additions & 15 deletions .ci_environment_py.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:
with:
fetch-depth: 0

- name: Set conda environment (using micromamba for speed)
- name: Set conda environment
uses: mamba-org/provision-with-micromamba@main
with:
environment-file: .ci_environment_docs.yaml
environment-file: environment.yaml
environment-name: myenv

- name: Configure using CMake
Expand Down
6 changes: 1 addition & 5 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

sphinx:
configuration: docs/conf.py

version: 2

conda:
environment: .readthedocsenv.yml
environment: environment.yaml
13 changes: 0 additions & 13 deletions .readthedocsenv.yml

This file was deleted.

3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ string(TOUPPER "${PROJECT_NAME}" PROJECT_NAME_UPPER)
option(BUILD_ALL "${PROJECT_NAME}: Build tests, Python API & docs" OFF)
option(BUILD_TESTS "${PROJECT_NAME}: Build tests" OFF)
option(BUILD_PYTHON "${PROJECT_NAME}: Build Python API" OFF)
option(BUILD_DOCS "${PROJECT_NAME}: Build docs" OFF)
option(BUILD_DOCS "${PROJECT_NAME}: Build docs (use `make html`)" OFF)
option(USE_WARNINGS "${PROJECT_NAME}: Build with runtime warnings" ON)
option(USE_ASSERT "${PROJECT_NAME}: Build with assertions" ON)
option(USE_DEBUG "${PROJECT_NAME}: Build in debug mode" OFF)
Expand Down Expand Up @@ -200,6 +200,7 @@ if(BUILD_DOCS OR BUILD_ALL)
set(DOXYGEN_QUIET YES)
set(DOXYGEN_WARN_IF_UNDOCUMENTED YES)
set(DOXYGEN_WARN_AS_ERROR NO)
set(DOXYGEN_HTML_COLORSTYLE TOGGLE)
set(DOXYGEN_WARN_LOGFILE "${CMAKE_CURRENT_BINARY_DIR}/doxygen_warnings.log")
set(DOXYGEN_ALIASES "license=@par License:")
set(DOXYGEN_USE_MDFILE_AS_MAINPAGE "README.md")
Expand Down
58 changes: 9 additions & 49 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,40 +1,21 @@
# 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 subprocess

# sys.path.insert(0, os.path.abspath('.'))
# -- Run Doxygen -------------------------------------------------------------

doxydir = "_doxygen"

if not os.path.isdir(doxydir):
os.mkdir(doxydir)

subprocess.call(f"cmake .. -B{doxydir:s} -DBUILD_DOCS=1", shell=True)
subprocess.call(f"cd {doxydir:s}; make html", shell=True)
subprocess.call(f"python -m breathe.apidoc -m -f -p GooseFEM -o api {doxydir:s}/xml", shell=True)

# -- Project information -----------------------------------------------------
import sys

project = "GooseFEM"
copyright = "2017-2021, Tom de Geus"
author = "Tom de Geus"

subprocess.call("cd ..; python setup.py build --build-type Release -vv", shell=True)
mybuild = os.listdir("../_skbuild")[0]
sys.path.insert(0, os.path.abspath(f"../_skbuild/{mybuild}/cmake-install/python"))

# -- General configuration ---------------------------------------------------
doxydir = "_doxygen"
os.makedirs(doxydir, exist_ok=True)
subprocess.call(f"cmake .. -B{doxydir} -DBUILD_DOCS=1", shell=True)
subprocess.call(f"cd {doxydir}; make html", shell=True)
subprocess.call(f"python -m breathe.apidoc -m -f -p GooseFEM -o api {doxydir}/xml", shell=True)

# 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.mathjax",
Expand All @@ -44,31 +25,10 @@
"sphinx_tabs.tabs",
]

# 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"
html_theme = "furo"

# 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": f"{doxydir:s}/xml/",
}
1 change: 0 additions & 1 deletion environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ dependencies:
- scipy
- setuptools_scm
- sphinx
- sphinx_rtd_theme
- sphinx-tabs
- xsimd
- xtensor
Expand Down

0 comments on commit baf7de4

Please sign in to comment.