Skip to content

Commit f54545b

Browse files
committed
integrated my CV into the website build
1 parent 4433ea8 commit f54545b

21 files changed

Lines changed: 1859 additions & 35 deletions

.github/workflows/site.yml

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build publications and deploy site
1+
name: Build publications, CV, and deploy site
22

33
on:
44
push:
@@ -40,37 +40,48 @@ jobs:
4040
cache: pip
4141
cache-dependency-path: requirements-publications.txt
4242

43-
- name: Install publication-build dependencies
43+
- name: Install Python dependencies
4444
run: python -m pip install --requirement requirements-publications.txt
4545

46+
- name: Install XeLaTeX for the CV
47+
run: |
48+
sudo apt-get update
49+
sudo apt-get install --yes --no-install-recommends \
50+
fonts-liberation2 \
51+
texlive-latex-extra \
52+
texlive-xetex
53+
4654
- name: Generate publication records
4755
run: python scripts/build_publications.py --strict
4856

57+
- name: Generate and compile the CV
58+
run: python scripts/build_cv.py --strict --compile
59+
4960
- name: Run repository tests
5061
run: python -m unittest discover -s tests -v
5162

5263
- name: Require generated files to be committed in pull requests
5364
if: github.event_name == 'pull_request'
5465
shell: bash
5566
run: |
56-
if [[ -n "$(git status --porcelain -- _papers pub.bib)" ]]; then
57-
git status --short -- _papers pub.bib
58-
echo "Generated publication files are not current. Run make publications and commit the result."
67+
if [[ -n "$(git status --porcelain -- _papers pub.bib cv/generated)" ]]; then
68+
git status --short -- _papers pub.bib cv/generated
69+
echo "Generated publication or CV source files are not current. Run make publications and make cv-source, then commit the result."
5970
exit 1
6071
fi
6172
62-
- name: Commit regenerated publication files
73+
- name: Commit regenerated publication and CV files
6374
if: github.event_name == 'push'
6475
shell: bash
6576
run: |
66-
git add --all -- _papers pub.bib
77+
git add --all -- _papers pub.bib cv/generated assets/ABoyle_CV.pdf
6778
if git diff --cached --quiet; then
68-
echo "Publication files are already current."
79+
echo "Publication and CV files are already current."
6980
exit 0
7081
fi
7182
git config user.name "github-actions[bot]"
7283
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
73-
git commit -m "Update generated publication records [skip ci]"
84+
git commit -m "Update generated publications and CV [skip ci]"
7485
git push origin "HEAD:${GITHUB_REF_NAME}"
7586
7687
- name: Configure GitHub Pages

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,10 @@ _site/
66
vendor/
77
__pycache__/
88
*.py[cod]
9+
# Jekyll and CV build products
10+
cv/build/
11+
*.aux
12+
*.log
13+
*.out
14+
*.toc
15+
*.xdv

CV.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Curriculum vitae build
2+
3+
Alan Boyle's CV is built inside the website repository so its publication list cannot drift from the Publications page.
4+
5+
## Sources and outputs
6+
7+
```text
8+
cv/cv.tex
9+
+
10+
bibliography/publications.bib
11+
+
12+
publication_metadata/*.yml
13+
+
14+
_people/*.md
15+
+
16+
cv/patents.bib
17+
|
18+
v
19+
scripts/build_cv.py
20+
|
21+
+--> cv/generated/publications.tex
22+
+--> cv/generated/patents.tex
23+
+--> assets/ABoyle_CV.pdf
24+
```
25+
26+
### Authored files
27+
28+
- `cv/cv.tex`: all CV sections except publications and patents.
29+
- `cv/patents.bib`: patent citation data, which are not part of the website publication bibliography.
30+
- `bibliography/publications.bib`: definitive publication citation data shared with the website.
31+
- `publication_metadata/*.yml`: publication-to-member relationships and publication-specific author mappings.
32+
- `_people/*.md`: canonical member identities keyed by Michigan `umid`.
33+
34+
### Generated files
35+
36+
- `cv/generated/publications.tex`: numbered publication list included by `cv/cv.tex`.
37+
- `cv/generated/patents.tex`: numbered patent list included by `cv/cv.tex`.
38+
- `assets/ABoyle_CV.pdf`: PDF linked from Alan Boyle's profile and deployed with the website.
39+
40+
Do not edit files under `cv/generated/` by hand. They are replaced by the Python generator.
41+
42+
The PDF build uses `SOURCE_DATE_EPOCH`. In a clean Git checkout, the default timestamp is the most recent commit that changed an authored CV input (`cv/cv.tex`, the publication bibliography and sidecars, `_people`, or `cv/patents.bib`). A bot commit that changes only generated files therefore does not alter the CV date or binary output on the next run.
43+
44+
## Author highlighting
45+
46+
The CV does not contain a hard-coded list of lab-member names. For each publication, the generator uses the same `members`, `author_member_map`, and `member_roles` metadata used by the website.
47+
48+
- Alan Boyle (`umid: apboyle`) is printed in bold.
49+
- Other Boyle Lab members attached to the byline are underlined.
50+
- Co-first and co-senior markers come from `*` and `\dag` markers in the BibTeX author field.
51+
- Consortium or other non-byline roles associate a paper with a member profile but do not insert or highlight a person who is absent from the byline.
52+
53+
A historical publication name belongs in that publication's sidecar:
54+
55+
```yaml
56+
bibkey: Mumm2023OnRamp
57+
members:
58+
- melyssae
59+
- apboyle
60+
author_member_map:
61+
melyssae: "Drexel, Melissa L"
62+
```
63+
64+
The same mapping then controls both the website link and CV underline.
65+
66+
## Commands
67+
68+
Generate the two included TeX files without compiling the PDF:
69+
70+
```bash
71+
make cv-source
72+
```
73+
74+
Generate the publication files and compile the PDF:
75+
76+
```bash
77+
make cv
78+
```
79+
80+
Check that committed generated TeX files are current:
81+
82+
```bash
83+
make cv-check
84+
```
85+
86+
Run all publication, CV, content, and workflow checks:
87+
88+
```bash
89+
make check
90+
```
91+
92+
Direct equivalents are:
93+
94+
```bash
95+
python3 scripts/build_cv.py --strict
96+
python3 scripts/build_cv.py --strict --compile
97+
python3 scripts/build_cv.py --check --strict
98+
```
99+
100+
## Local prerequisites
101+
102+
The source generator requires Python and the packages in `requirements-publications.txt`. PDF compilation also requires XeLaTeX with the standard LaTeX-extra packages and Liberation Sans.
103+
104+
On Ubuntu or Debian:
105+
106+
```bash
107+
sudo apt-get install fonts-liberation2 texlive-latex-extra texlive-xetex
108+
```
109+
110+
The GitHub Actions workflow installs these packages automatically.
111+
112+
## GitHub deployment
113+
114+
The site workflow runs automatically when `bibliography/publications.bib` changes and can also be started manually. It regenerates the website publication records, generates and compiles the CV, runs all tests, commits generated publication/CV outputs after a direct push, builds Jekyll, and deploys the site. Pull requests compare the deterministic YAML, BibTeX, and generated TeX outputs; they still compile the PDF to detect XeLaTeX failures without requiring the binary PDF to match local build-date metadata.
115+
116+
Because the automatic trigger is intentionally limited to `bibliography/publications.bib`, use **Run workflow** after changing only `cv/cv.tex`, `cv/patents.bib`, `_people`, or `publication_metadata` if an immediate CV rebuild and deployment is needed.
117+
118+
## Legacy CV repository
119+
120+
The integrated build replaces these former CV-repository components:
121+
122+
- `apb.bib`, which duplicated the website bibliography.
123+
- `bold_bib4tex.pl`, which hard-coded member names.
124+
- `mod_bib_html.pl` and the BibTeX2HTML binaries, which generated the former website bibliography.
125+
- `bib_to_yaml.py`, which did not create the current publication schema.
126+
- The custom publication `.bst` dependency and multibib publication build.
127+
128+
The old repository may be retained as an archive, but it is no longer required to build or deploy the CV.

DEVELOPMENT.md

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@
66
- Ruby compatible with the current `github-pages` gem.
77
- Bundler.
88
- Git.
9+
- XeLaTeX and Liberation Sans when compiling the CV locally.
910

1011
Install dependencies:
1112

1213
```bash
1314
python3 -m pip install --requirement requirements-publications.txt
1415
bundle install
16+
# Debian/Ubuntu only, for CV compilation:
17+
sudo apt-get install fonts-liberation2 texlive-latex-extra texlive-xetex
1518
```
1619

1720
The Python requirements support the publication generator and repository tests. The Gemfile uses the GitHub Pages dependency bundle so local Jekyll behavior remains close to production.
@@ -30,6 +33,24 @@ make publications-check
3033

3134
Reconstructs expected output in memory and fails if committed generated files are stale, missing, or obsolete.
3235

36+
```bash
37+
make cv-source
38+
```
39+
40+
Regenerates the CV publication and patent TeX files without compiling the PDF.
41+
42+
```bash
43+
make cv
44+
```
45+
46+
Regenerates publication data, compiles the CV, and writes `assets/ABoyle_CV.pdf`.
47+
48+
```bash
49+
make cv-check
50+
```
51+
52+
Fails when committed `cv/generated/*.tex` files are stale.
53+
3354
```bash
3455
make test
3556
```
@@ -40,13 +61,13 @@ Runs the full Python test suite.
4061
make check
4162
```
4263

43-
Runs the publication reproducibility check followed by all tests. Use this before every commit.
64+
Runs the publication and CV reproducibility checks followed by all tests. Use this before every commit.
4465

4566
```bash
4667
make build
4768
```
4869

49-
Regenerates publications, runs tests, and creates the production site in `_site/`.
70+
Regenerates publications, compiles the CV, runs tests, and creates the production site in `_site/`.
5071

5172
```bash
5273
make serve
@@ -63,6 +84,7 @@ Runs the same generate-test-build sequence with shell error handling and is usef
6384
## Test suite
6485

6586
- `test_publication_tools.py`: BibTeX parsing, member matching, generated schema, stable filenames, featured records, citation metrics, and deterministic output.
87+
- `test_cv_tools.py`: CV source generation, member highlighting, legacy dependency removal, and PDF presence.
6688
- `test_people_data.py`: unique `umid` values, list-valued statuses, YAML date types, role history, assets, alumni sorting, and current positions.
6789
- `test_news_data.py`: required front matter, teaser assets, member links, publication links, award metadata, and layout support.
6890
- `test_site_structure.py`: valid includes/layouts, current dependencies, CSS parsing and use, primary navigation, and required documentation.
@@ -77,12 +99,13 @@ Add a regression test whenever a content mistake causes a build failure. For exa
7799
The build job:
78100

79101
1. Checks out full Git history.
80-
2. Installs Python dependencies.
102+
2. Installs Python dependencies and XeLaTeX.
81103
3. Regenerates publication output in strict mode.
82-
4. Runs all tests.
83-
5. On pull requests, fails if `_papers/` or `pub.bib` differ from committed files.
84-
6. On direct pushes, commits changed generated publication files with the GitHub Actions bot.
85-
7. Builds Jekyll and uploads the Pages artifact.
104+
4. Generates and compiles the CV from the same publication and people data.
105+
5. Runs all tests.
106+
6. On pull requests, fails if generated publication records or generated CV TeX differ from committed files; the PDF is still compiled so XeLaTeX errors are caught.
107+
7. On direct pushes, commits changed publication records, generated CV TeX, and the canonical CV PDF with the GitHub Actions bot.
108+
8. Builds Jekyll and uploads the Pages artifact.
86109

87110
The deploy job runs only outside pull requests and publishes the artifact to the `github-pages` environment.
88111

@@ -94,7 +117,7 @@ A commit created by `GITHUB_TOKEN` does not need a second workflow run: the acti
94117

95118
## Editing publication sources in GitHub
96119

97-
When `bibliography/publications.bib` changes directly on GitHub, the workflow regenerates the website records and `pub.bib`, commits those outputs, and deploys the generated site. A new BibTeX key still requires a matching `publication_metadata/*.yml` sidecar; otherwise strict generation fails with a clear missing-sidecar message.
120+
When `bibliography/publications.bib` changes directly on GitHub, the workflow regenerates the website records, `pub.bib`, and CV, commits those outputs, and deploys the generated site. A new BibTeX key still requires a matching `publication_metadata/*.yml` sidecar; otherwise strict generation fails with a clear missing-sidecar message.
98121

99122
## Troubleshooting
100123

@@ -106,7 +129,7 @@ Run:
106129
make publications
107130
```
108131

109-
Commit `_papers/` and `pub.bib` with the source changes.
132+
Run `make publications` and `make cv-source`, then commit `_papers/`, `pub.bib`, and `cv/generated/`. Running `make cv` also refreshes the local PDF; the direct-push workflow produces and commits the canonical deployed PDF.
110133

111134
### Liquid comparison errors on the People page
112135

@@ -119,3 +142,7 @@ Confirm the `umid` in the sidecar, then add `author_member_map` for a historical
119142
### Jekyll pagination is missing
120143

121144
Run through Bundler and confirm `_config.yml` contains `jekyll-paginate` under `plugins`.
145+
146+
### XeLaTeX is unavailable
147+
148+
Run `make cv-source` to generate the CV publication data without compiling. To create the PDF, install `fonts-liberation2`, `texlive-latex-extra`, and `texlive-xetex`, then run `make cv`.

Makefile

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,35 @@ PYTHON ?= python3
22
BUNDLE ?= bundle
33
JEKYLL_ENV ?= development
44

5-
.PHONY: publications publications-check test check build serve clean
5+
.PHONY: publications publications-check cv-source cv cv-check test check build serve clean
66

77
publications:
88
$(PYTHON) scripts/build_publications.py --strict
99

1010
publications-check:
1111
$(PYTHON) scripts/build_publications.py --check --strict
1212

13+
cv-source: publications
14+
$(PYTHON) scripts/build_cv.py --strict
15+
16+
cv: publications
17+
$(PYTHON) scripts/build_cv.py --strict --compile
18+
19+
cv-check: publications-check
20+
$(PYTHON) scripts/build_cv.py --check --strict
21+
1322
test:
1423
$(PYTHON) -m unittest discover -s tests -v
1524

16-
check: publications-check test
25+
check: publications-check cv-check test
1726

18-
build: publications test
27+
build: publications cv test
1928
JEKYLL_ENV=production $(BUNDLE) exec jekyll build --trace
2029

21-
serve: publications
30+
serve: publications cv-source
2231
$(BUNDLE) exec jekyll serve --livereload
2332

2433
clean:
25-
rm -rf _site .jekyll-cache .sass-cache
34+
rm -rf _site .jekyll-cache .sass-cache cv/build
2635
find . -type d -name __pycache__ -prune -exec rm -rf {} +
2736
find . -type f \( -name '*.pyc' -o -name '*.pyo' \) -delete

0 commit comments

Comments
 (0)