summaryrefslogtreecommitdiff
path: root/check
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2022-02-19 10:29:17 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2022-02-19 10:29:17 +0000
commit0dc12b2f9b4db34e89ad7f5d83531d4cbac7f932 (patch)
tree555e63abd3f4216909f6b66cf6246a0a121d4781 /check
parent7617c66cfd56fd416d812ad8b3e8953dc06afdd0 (diff)
downloadsubplot-0dc12b2f9b4db34e89ad7f5d83531d4cbac7f932.tar.gz
(check): Determine and use the first template when running docgen
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'check')
-rwxr-xr-xcheck11
1 files changed, 8 insertions, 3 deletions
diff --git a/check b/check
index 00fb41c..4db9f92 100755
--- a/check
+++ b/check
@@ -131,7 +131,7 @@ class Runcmd:
**kwargs,
)
- def docgen(self, md, output, **kwargs):
+ def docgen(self, md, template, output, **kwargs):
"""Run the Subplot document generator"""
# GitLab CI, and other CI engines, runs tests under Docker, which uses
@@ -155,6 +155,7 @@ class Runcmd:
"--",
f"--resources={os.path.abspath('share')}",
"docgen",
+ f"--template={template}",
md,
f"--output={output}",
],
@@ -271,7 +272,11 @@ def check_subplots(r):
md = os.path.basename(md0)
base, _ = os.path.splitext(md)
+ doc_template = None
+
for template in r.get_templates(md0):
+ if doc_template is None:
+ doc_template = template
if template == "python":
test_py = os.path.join(output, f"test-{base}.py")
test_log = os.path.join(output, f"test-{base}.log")
@@ -309,8 +314,8 @@ def check_subplots(r):
base = os.path.basename(md)
base, _ = os.path.splitext(md)
base = os.path.join(output, base)
- r.docgen(md, base + ".pdf", cwd=dirname)
- r.docgen(md, base + ".html", cwd=dirname)
+ r.docgen(md, doc_template, base + ".pdf", cwd=dirname)
+ r.docgen(md, doc_template, base + ".html", cwd=dirname)
def tail(filename, numlines=100):