Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
4f8c391
Define the w-correlation matrix in the manual
Apr 8, 2025
a59cb99
Merge branch 'main' into Jupyter
Apr 11, 2025
6c9c827
Fix typo in reconstruction summation
Apr 18, 2025
faaf91a
Add some clarifcation on EOF construction
Apr 18, 2025
6221e3a
More minor edits
Apr 18, 2025
aecfab8
Use git clone to generate doxygen xml tags
Jul 23, 2025
0749d05
Enable minimal pyEXP build
Jul 23, 2025
a873085
Add some missing packages
Jul 24, 2025
d2a4dae
Add some some print statements to debug weird missing build
Jul 24, 2025
b921e42
Attempt to adjust the install location in the readthedocs build
Jul 24, 2025
522dc29
Add build directory to Python pah
Jul 24, 2025
fffb6f5
Remove install directory from cmake command
Jul 24, 2025
0c84e62
Forgot to import sys
Jul 24, 2025
e890a44
Remove print statements
Jul 24, 2025
f6ea5ef
Drop back to 22.04
Jul 24, 2025
8621e9a
Downgrade sphinx for 22.04
Jul 24, 2025
4c77e17
Hack to downgrade CMake requirement
Jul 24, 2025
173f430
Workaround for 22.04 CMake version check
Jul 24, 2025
5bff2d7
Fix bugs in workaround
Jul 24, 2025
98f50a6
Another bug fix in workaround
Jul 24, 2025
5e8ab5c
Fix typo in module string
Jul 24, 2025
510b8f3
Added comments to conf.py. Works locally but I can't get it
Jul 24, 2025
fa9abed
Update conf.py for github action workflow
Jul 24, 2025
bbba704
Switch to push on Doxygen branch
Jul 24, 2025
c4ae049
Added ipython
Jul 24, 2025
235f1fc
Try pushing to Github Pages
Jul 25, 2025
fd464b4
Merge branch 'Doxygen' of github.com:EXP-code/EXP-docs into Doxygen
Jul 25, 2025
994d3b2
Remove ReadTheDocs trigger and publish to github pages
Jul 25, 2025
5ccc051
Merge branch 'Doxygen' of github.com:EXP-code/EXP-docs into Doxygen
Jul 25, 2025
2b4455a
Change subdirectory for pushing pages
Jul 25, 2025
72604f6
Downgrade CMake requirements for readthedocs
Jul 25, 2025
dccf897
Merge branch 'Doxygen' of github.com:EXP-code/EXP-docs into Doxygen
Jul 25, 2025
8cf1e13
Fix typo in subprocess
Jul 25, 2025
e97bd89
Fix typo in subprocess, again
Jul 25, 2025
5105d5c
Try running on 24.04 at readthedocs
Jul 25, 2025
dbedf2c
Add some readthedocs conditionals
Jul 25, 2025
2533412
Another typo fix
Jul 25, 2025
54dee07
Another try at tag logic
Jul 25, 2025
425d64c
Change from note to warn
Jul 25, 2025
921a24d
Change from note to warning
Jul 25, 2025
abaad58
One more time with indentation and line skips
Jul 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
43 changes: 43 additions & 0 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build and Deploy Sphinx Docs

on:
push:
branches:
- main # Trigger on pushes to the main branch
- Doxygen # Trigger on pushes to the devel branch

jobs:
build:
runs-on: ubuntu-24.04 # Specify the operating system

steps:
- uses: actions/checkout@v4 # Checkout the repository
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x' # Specify your Python version
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential libeigen3-dev libfftw3-dev libhdf5-dev libopenmpi-dev libomp-dev python3-numpy python3-venv python3-ipython ipython3 doxygen graphviz cmake make pandoc
python3 -m venv .venv # Create a virtual environment
source .venv/bin/activate # Activate the environment
pip install sphinx sphinx-rtd-theme # Install Sphinx and theme
pip install -r requirements.txt # Install any additional dependencies (optional)
- name: Build Sphinx documentation
run: |
source .venv/bin/activate # Activate the environment
make html # Build the HTML documentation
- name: Upload built documentation (optional)
uses: actions/upload-artifact@v4
with:
name: html-docs
path: _build/html # Path to your built documentation
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/html
force_orphan: true
12 changes: 10 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,23 @@ version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
os: ubuntu-24.04
tools:
python: "3.11"
python: "3.12"
# You can also specify other tool versions:
# nodejs: "20"
# rust: "1.70"
# golang: "1.20"
apt_packages:
- graphviz
- cmake
- make
- libeigen3-dev
- libfftw3-dev
- libhdf5-dev
- libopenmpi-dev
- openmpi-bin
- openmpi-common

# Build documentation in the "docs/" directory with Sphinx
sphinx:
Expand Down
79 changes: 73 additions & 6 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,78 @@
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
import os, sys
import subprocess

on_rtd = os.environ.get("READTHEDOCS") == "True"


# -- Generate doxygen xml prior to build --------------------------------------

# Define the repository URL and target directory
#
repo_url = "https://github.com/EXP-code/EXP.git"
clone_dir = "exp_repo"
branch = "SLboundaries"
doxyfile = "exp.cfg.breathe"
doxy_dir = "doc"

# Cache the current working directory
#
build_dir = os.getcwd()

# Clone the EXP repository if it doesn't exist
#
if not os.path.exists(clone_dir):
subprocess.run(["git", "clone", repo_url, clone_dir], check=True)

# Move to source and get the desired branch
#
os.chdir(clone_dir)
subprocess.run(["git", "checkout", branch])
subprocess.run(["cp", "CMakeLists.txt", "CMakeLists.txt.orig"])
command = ["sed", "-i", "-e", 's/VERSION 3.25/VERSION 3.22/g', "CMakeLists.txt"]
result = subprocess.run(command, capture_output=True, text=True, check=True)

# Initialize submodules
#
os.chdir(doxy_dir)
os.system("git submodule update --init --recursive")

# Ensure Doxygen is installed and its executable is in your PATH
#
subprocess.run(["doxygen", doxyfile], check=True)

if not on_rtd:
# Build pyEXP to populate Python API documenation
#
os.chdir('..')

# Make build directory and begin
#
if not os.path.exists('build'):
subprocess.run(["mkdir", "build"], check=True)
os.chdir('build')
subprocess.run(['cmake', '-DCMAKE_BUILD_TYPE=Release -DENABLE_USER=NO -DENABLE_NBODY=NO -DEigen3_DIR=$EIGEN_BASE/share/eigen3/cmake -Wno-dev', '..'])
subprocess.run(['make', '-j8'])

# Return to top level
#
os.chdir(build_dir)

# Add 'my_module_path' to the beginning of sys.path
#
my_module_path = os.path.join(build_dir, 'exp_repo/build/pyEXP')
sys.path.insert(0, my_module_path)

# Begin Sphinx configuration

# -- project information -----------------------------------------------------
#
project = 'EXP'
copyright = '2023-2025, EXP-code collaboration'
author = 'EXP-code collaboration'
release = '0.16'
release = '0.17'
version = '7.x'

# -- General configuration ---------------------------------------------------
Expand All @@ -36,7 +101,7 @@
templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'README.rst']

breathe_projects = {"EXP": "doxyxml/"}
breathe_projects = {"EXP": "exp_repo/doc/xml/"}
breathe_default_project = "EXP"

# -- Options for HTML output -------------------------------------------------
Expand All @@ -46,14 +111,16 @@
html_logo = 'exp_logo_white.png'
html_static_path = ['_static']

# -- A readthedocs conditional ----------------------------------------------
if on_rtd:
tags.add('rtd')

# -- Turn on figure numering -------------------------------------------------
numfig = True

# -- Extension configuration -------------------------------------------------
nbsphinx_execute = 'never'

# -- Grab files from pyEXP-examples -----------------------------------------
import os

os.system("cd intro/Tutorials; rm *ipynb*; wget -L https://raw.githubusercontent.com/EXP-code/pyEXP-examples/refs/heads/main/Tutorials/Introduction/Part1-Coefficients.ipynb; wget -L https://raw.githubusercontent.com/EXP-code/pyEXP-examples/refs/heads/main/Tutorials/Introduction/Part2-Analysis.ipynb")

Loading