<commit_before>#!/bin/bash

set -eu
set -o pipefail

# prevent "Couldn't read xref table" errors
cd patterns
for f in *.pdf; do pdftk $f cat output $f.new && mv $f.new $f; done
cd ..

# compile a single bib file
cat bib/*.bib > ms.bib
mv ldbc-snb-specification.tex ms.tex
sed -i 's/\\bibliography{.*}/\\bibliography{ms}/' ms.tex

# Even though the file exists, arXiv still states the following:
# "We do not run bibtex in the auto-TeXing procedure. If you use bibtex, you must compile the .bbl file on your computer then include that in your uploaded source files. See using bibtex.
# The name of the .bbl file must match the name of the main .tex file for the system to process the references correctly."
# If the ms.bbl file is there, just ignore this problem.

# build
./generate-tex.py
latexmk -pdf --interaction=batchmode ms

# cleanup 
rm -f *.aux *.dvi *.thm *.lof *.log *.lot *.fls *.out *.toc *.blg *.fdb_latexmk *.pdf
rm -f ms.zip<commit_msg>Document release process<commit_after>#!/bin/bash

set -eu
set -o pipefail

# Release process
# ---------------
#
# 1. Edit ldbc.cls
#    - Set a stable version number for `\ldbcsnbdocversion`
#    - Under "The specification was built on the source code available at", uncomment the GitHub URL with the tag
#
# 2. Edit README.md
#    - Adjust the version number in the table
#
# 3. Commit and push to GitHub
#
# 4. On GitHub, create a new release with a tag of the same name, following the pattern `v1.2.3`.
#
# 5. Locally, run `./arxiv.sh`
#
# 6. Go to arXiv, log in, replace submission, and upload the new ms.zip file.
#
# 7. Check the output and submit it.
#
# 8. Edit ldbc.cls
#    - Set a snapshot version number for `\ldbcsnbdocversion`
#    - Under "The specification was built on the source code available at", uncomment the GitHub URL pointing to the main branch
#
# 9. Commit and push to GitHub

# prevent "Couldn't read xref table" errors
cd patterns
for f in *.pdf; do pdftk $f cat output $f.new && mv $f.new $f; done
cd ..

# compile a single bib file
cat bib/*.bib > ms.bib
mv ldbc-snb-specification.tex ms.tex
sed -i 's/\\bibliography{.*}/\\bibliography{ms}/' ms.tex

# Even though the file exists, arXiv still states the following:
# "We do not run bibtex in the auto-TeXing procedure. If you use bibtex, you must compile the .bbl file on your computer then include that in your uploaded source files. See using bibtex.
# The name of the .bbl file must match the name of the main .tex file for the system to process the references correctly."
# If the ms.bbl file is there, just ignore this problem.

# build
./generate-tex.py
latexmk -pdf --interaction=batchmode ms

# cleanup 
rm -f *.aux *.dvi *.thm *.lof *.log *.lot *.fls *.out *.toc *.blg *.fdb_latexmk *.pdf
rm -f ms.zip
{'fraction_non_alphanumeric': 0.11293260473588343, 'fraction_numerical': 0.004371584699453552, 'mean_word_length': 3.1859756097560976, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2413470', 'n_tokens_mistral': 958, 'n_tokens_neox': 872, 'n_words': 414}