research_helpers.arxiv
Assembles and checks an arXiv submission. See arXiv and Zenodo.
- research_helpers.arxiv.manifest(*, patterns=DEFAULT_PATTERNS, extra=None)[source]
Return the upload set, keyed by the path each file takes inside the submission.
Names are taken relative to the directory holding the manuscript, so a table installed at ‘tex/tables/scores.tex’ and read as ‘input{tables/scores}’ is uploaded as ‘tables/scores.tex’ and resolves the same way on arXiv.
- Parameters:
- Return type:
- Returns:
Submission path to source file, in a stable order.
- research_helpers.arxiv.bbl_format(path)[source]
Return the format version declared in a biblatex .bbl.
- research_helpers.arxiv.check(files, *, engine=None, texlive=None, expected_bbl_format=None)[source]
Return every reason this submission would be rejected or would build wrongly.
- Parameters:
files (
Mapping[str,Path]) – the upload set, from ‘manifest’.engine (
str|None, default:None) – the LaTeX engine selected on arXiv. Defaults to the project’s setting.texlive (
int|None, default:None) – the TeX Live year selected on arXiv, used in messages.expected_bbl_format (
str|None, default:None) – the biblatex .bbl format that year reads. Defaults to the project’s setting.
- Return type:
- Returns:
One line per problem, empty when there is nothing wrong.
- research_helpers.arxiv.build(files, destination)[source]
Copy the upload set into a freshly emptied directory.
- research_helpers.arxiv.pack(source, archive=None)[source]
Pack a built submission as the tarball arXiv accepts.
The archive is byte-reproducible, so re-packing an unchanged submission gives an identical file and a resubmission can be told apart from a rebuild.
- research_helpers.arxiv.preview(source, destination, *, engine=None, passes=DEFAULT_PASSES)[source]
Compile a built submission with the engine arXiv will use.
- Parameters:
- Return type:
- Returns:
The PDF produced.
- Raises:
RuntimeError – if the engine produced no PDF.