Skip to content

Commit 510b8f3

Browse files
author
Martin D. Weinberg
committed
Added comments to conf.py. Works locally but I can't get it
to work in the readthedocs CI/CD. Not sure what's up.
1 parent 5e8ab5c commit 510b8f3

1 file changed

Lines changed: 18 additions & 5 deletions

File tree

conf.py

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,59 +3,72 @@
33
# For the full list of built-in configuration values, see the documentation:
44
# https://www.sphinx-doc.org/en/master/usage/configuration.html
55

6-
# -- Generate doxygen xml prior to build --------------------------------------
76
import os, sys
87
import subprocess
98

9+
# -- Generate doxygen xml prior to build --------------------------------------
10+
1011
# Define the repository URL and target directory
12+
#
1113
repo_url = "https://github.com/EXP-code/EXP.git"
1214
clone_dir = "exp_repo"
1315
branch = "SLboundaries"
1416
doxyfile = "exp.cfg.breathe"
1517
doxy_dir = "doc"
1618

1719
# Cache the current working directory
20+
#
1821
build_dir = os.getcwd()
1922

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

2428
# Move to source and get the desired branch
29+
#
2530
os.chdir(clone_dir)
2631
subprocess.run(["git", "checkout", branch])
2732
os.chdir(doxy_dir)
2833

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

3238
# Build pyEXP to populate Python API documenation
39+
#
3340
os.chdir('..')
3441

3542
# Workaround for cmake version
43+
#
3644
subprocess.run(['cp', 'CMakeLists.txt', 'CMakeLists.txt.orig'])
3745
command_to_pipe = subprocess.Popen(['cat', 'CMakeLists.txt.orig'], stdout=subprocess.PIPE)
3846
foutput = open('CMakeLists.txt', 'w')
3947
sed_command = subprocess.Popen(['sed', 's/VERSION 3.25/VERSION 3.22/'], stdin=command_to_pipe.stdout, stdout=foutput)
4048
foutput.close()
4149
command_to_pipe.stdout.close()
4250

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

5059
# Return to top level
60+
#
5161
os.chdir(build_dir)
5262

53-
my_module_path = os.path.join(build_dir, 'exp_repo/build/pyEXP')
5463

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

58-
# -- Project information -----------------------------------------------------
69+
# Begin Sphinx configuration
70+
71+
# -- project information -----------------------------------------------------
5972
#
6073
project = 'EXP'
6174
copyright = '2023-2025, EXP-code collaboration'

0 commit comments

Comments
 (0)