Skip to content

Commit 2d252ce

Browse files
committed
Build also the doc
1 parent 5e4ac21 commit 2d252ce

File tree

4 files changed

+28
-2
lines changed

4 files changed

+28
-2
lines changed

build-doc.py

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/usr/bin/env python3
2+
import os
3+
import sys
4+
import logging
5+
import bootstrap
6+
from sphinx.cmd.build import main
7+
logger = logging.getLogger(__name__)
8+
PROJECT_DIR = os.path.dirname(os.path.abspath(__file__))
9+
PROJECT_NAME = bootstrap.get_project_name(PROJECT_DIR)
10+
logger.info("Project name: %s", PROJECT_NAME)
11+
LIBPATH = bootstrap.build_project(PROJECT_NAME, PROJECT_DIR)
12+
if __name__ == '__main__':
13+
sys.path.insert(0, LIBPATH)
14+
dest_dir = os.path.join(PROJECT_DIR, "build", "sphinx")
15+
if not os.path.isdir(dest_dir):
16+
os.makedirs(dest_dir)
17+
18+
argv = ["-b", "html",
19+
os.path.join(PROJECT_DIR,"doc","source"),
20+
dest_dir ]
21+
print(argv)
22+
sys.exit(main(argv))

doc/source/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
master_doc = 'index'
132132

133133
# General information about the project.
134-
from dahu._version import strictversion, version, __date__ as _date
134+
from dahu.version import strictversion, version, __date__ as _date
135135
year = _date.split("/")[-1]
136136
copyright = u'2014-%s, Data analysis unit, European Synchrotron Radiation Facility, Grenoble' % year
137137

pyproject.toml

+4
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ classifiers = ["Development Status :: 3 - Alpha",
2727
"Programming Language :: Python :: 3.6",
2828
"Programming Language :: Python :: 3.7",
2929
"Programming Language :: Python :: 3.8",
30+
"Programming Language :: Python :: 3.9",
31+
"Programming Language :: Python :: 3.10",
32+
"Programming Language :: Python :: 3.11",
33+
"Programming Language :: Python :: 3.12",
3034
"Programming Language :: Python :: Implementation :: CPython",
3135
"Topic :: Scientific/Engineering :: Physics",
3236
"Topic :: Software Development :: Libraries :: Python Modules",

src/dahu/app/reprocess.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def process(args):
105105
print(result)
106106
basename = os.path.join(working_dir, "%05i_%s" % (idx, plugin.get_name()))
107107
with open(basename + ".out", "w") as fp:
108-
fp.write(result)
108+
fp.write(result)
109109
with open(basename + ".inp", "w") as fp:
110110
json.dump(plugin.input, fp, indent=4, cls=NumpyEncoder)
111111

0 commit comments

Comments
 (0)