Add the original OUP journal project to the publisher matrix
This commit is contained in:
1 parent
050ff5bde2
commit
893b46baae
4 files changed
+55
-3
No files matched your search
@@ -25,6 +25,8 @@ CASES = [
|
||||
("aapm-revtex", "journal-two-columns", "revtex", "revtex/sample/aapm/aapmsamp.tex"),
|
||||
("aip-revtex-jmp", "journal-single-column", "revtex", "revtex/sample/aip/aipsamp.tex"),
|
||||
("sor-revtex-jor", "journal-single-column", "revtex", "revtex/sample/sor/sorsamp.tex"),
|
||||
("oup-contemporary-large", "journal-two-columns", "oup-authoring-template",
|
||||
"oup-authoring-template/oup-authoring-template.tex"),
|
||||
("springer-lncs", "conference", "springer-lncs", "samplepaper.tex"),
|
||||
("ieee-conference", "conference", "ieee", "IEEEtran/bare_conf.tex"),
|
||||
("acl", "conference", "acl", "acl-style-files-master/acl_latex.tex"),
|
||||
@@ -65,12 +67,12 @@ def unpack(path, directory):
|
||||
archive.extractall(directory)
|
||||
|
||||
|
||||
def run(command, cwd, env, label, evidence):
|
||||
def run(command, cwd, env, label, evidence, *, timeout=90):
|
||||
with (evidence / f"{label}.stdout.log").open("wb") as output, \
|
||||
(evidence / f"{label}.stderr.log").open("wb") as errors:
|
||||
try:
|
||||
status = subprocess.run(command, cwd=cwd, env=env, stdout=output, stderr=errors,
|
||||
timeout=90).returncode
|
||||
timeout=timeout).returncode
|
||||
except subprocess.TimeoutExpired:
|
||||
status = 124
|
||||
return {"command": list(map(str, command)), "exit_code": status, "label": label}
|
||||
@@ -193,7 +195,7 @@ def compile_sample(template, entry, evidence, args, engine, figures):
|
||||
if engine == "native":
|
||||
command = [*latex[:-2], "--resource-manifest", evidence / f"{label}.resources.json",
|
||||
"--layout-manifest", evidence / f"{label}.layout.json", *latex[-2:]]
|
||||
step = run(command, cwd, env, label, evidence)
|
||||
step = run(command, cwd, env, label, evidence, timeout=args.latex_timeout)
|
||||
recorder = job_directory / f"{jobname}.fls"
|
||||
if engine == "reference" and recorder.is_file():
|
||||
shutil.copyfile(recorder, evidence / f"{label}.fls")
|
||||
@@ -255,9 +257,13 @@ def main():
|
||||
parser.add_argument("--ghostscript", type=lambda p: Path(p).resolve(strict=True),
|
||||
help="Ghostscript executable for explicit conversion of the original EPS figures")
|
||||
parser.add_argument("--max-passes", type=int, choices=range(4, 13), default=4)
|
||||
parser.add_argument("--latex-timeout", type=int, default=90, metavar="SECONDS",
|
||||
help="maximum time per LaTeX pass (default: 90 seconds)")
|
||||
parser.add_argument("--case", action="append", choices=[item[0] for item in CASES],
|
||||
help="run selected cases; omit to run the complete matrix")
|
||||
args = parser.parse_args()
|
||||
if args.latex_timeout <= 0:
|
||||
parser.error("--latex-timeout must be positive")
|
||||
if args.font_map and args.font_map.name != "pdftex.map":
|
||||
parser.error("--font-map must name a pdftex.map file")
|
||||
selected = [item for item in CASES if not args.case or item[0] in args.case]
|
||||
@@ -308,6 +314,7 @@ def main():
|
||||
"native_format_sha256": sha(args.native_format),
|
||||
"reference_format_sha256": sha(args.reference_format), "texmf_overlay": additions,
|
||||
"font_map_sha256": font_map_sha256,
|
||||
"latex_timeout_seconds": args.latex_timeout,
|
||||
"archive_preparation": archive_preparation, "templates": results}
|
||||
assert not args.texmf_overlay or inputs(args.texmf_overlay) == additions
|
||||
assert not args.font_map or sha(args.font_map) == font_map_sha256
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
"ea3a8a0fdbac77f95de47639541b09ef1583e059ace6783367490af9fa0b9a60",
|
||||
"https://journals.plos.org/plosone/s/file?id=1457%2FPLOS_latex_template.zip"
|
||||
],
|
||||
"oup-authoring-template": [
|
||||
"025434f53ed3a46b9fd84d50a78c734c309476bc47b1cb7a90c383734df38e97",
|
||||
"https://mirrors.mit.edu/CTAN/macros/latex/contrib/oup-authoring-template.zip"
|
||||
],
|
||||
"springer-journal": [
|
||||
"812e76dcaa9c28dc1bff1fb6065d51729b67d4ea140552a05088317414a3ecae",
|
||||
"https://cms-resources.apps.public.k8s.springernature.io/springer-cms/rest/v1/content/18782940/data/v12"
|
||||
|
||||
Reference in new issue
Block a user