Skip to content

Commit 11f5ed2

Browse files
committed
Remove hardcoded override in Publications; rely on pipeline + data
- Publications.jsx: drop paper-specific URL override - PUBLICATION_PROCEDURE: point to central workflow, run sync script
1 parent b077f82 commit 11f5ed2

2 files changed

Lines changed: 28 additions & 53 deletions

File tree

PUBLICATION_PROCEDURE.md

Lines changed: 28 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,48 @@
11
# PROCEDURE FOR ADDING PUBLICATIONS
22

3+
**Lab website publications** come from the central repo. Do not edit `src/data/publications_by_year.json` by hand—it is generated by the sync script.
4+
5+
**Full pipeline:** See the central repo doc
6+
`/Users/tserre/Projects/prj_cv/CENTRAL_TO_LAB_AND_CV_WORKFLOW.md`
7+
38
## CENTRAL SOURCE OF TRUTH
49
**Location:** `/Users/tserre/Projects/prj_cv/data/publications_structured.json`
510

6-
This is the SINGLE file that controls all publications for both CV and lab website.
11+
Single source for both CV and lab website. Edit that file, then run the pipeline scripts.
712

8-
## STEP-BY-STEP PROCEDURE
13+
## PIPELINE (run after editing central file)
914

10-
### 1. Edit the Central File
11-
Edit `/Users/tserre/Projects/prj_cv/data/publications_structured.json`
15+
### 1. Edit Central File
16+
Edit `/Users/tserre/Projects/prj_cv/data/publications_structured.json`.
17+
Use the **official published URL** (Cell, OpenReview, etc.) once a paper is published; arXiv only for preprints.
1218

13-
**Structure:**
14-
```json
15-
{
16-
"under_review": [
17-
{
18-
"title": "Paper Title",
19-
"authors": "Author1, Author2 & T. Serre",
20-
"journal": "Journal Name",
21-
"url": "https://arxiv.org/abs/XXXX",
22-
"year": "2025"
23-
}
24-
],
25-
"peer_reviewed": [...],
26-
"unpublished_preprints": [...]
27-
}
19+
### 2. Sync to This Repo (Lab Website)
20+
From this repo:
21+
```bash
22+
cd /Users/tserre/Projects/Lab-Website
23+
python3 scripts/sync_from_central_publications.py
2824
```
25+
This overwrites `src/data/publications_by_year.json` from the central file (and keeps existing `pdfPath` values).
2926

30-
**Conventions:**
31-
- Use † for first equal authors, ‡ for last equal authors
32-
- Use sentence case capitalization (first word + after colons)
33-
- Include arXiv URLs when available
34-
- Place new papers at bottom of appropriate year section
35-
36-
### 2. Regenerate CV
27+
### 3. Regenerate CV (in central repo)
3728
```bash
3829
cd /Users/tserre/Projects/prj_cv/scripts
39-
python generate_cv.py
30+
python3 generate_cv.py
4031
```
4132

42-
### 3. Update Lab Website
43-
**Option A:** Edit HTML source in `/Users/tserre/Projects/Lab-Website/public/misc/publications`
44-
**Option B:** Run lab website update scripts (if available)
45-
46-
### 4. Commit Changes
33+
### 4. Rebuild and Deploy
4734
```bash
48-
cd /Users/tserre/Projects/prj_cv
49-
git add -A
50-
git commit -m "Add new publication: [Title]"
51-
git push origin main
35+
cd /Users/tserre/Projects/Lab-Website
36+
npm run build
37+
# then your normal deploy (e.g. push to trigger GitHub Actions)
5238
```
5339

5440
## CRITICAL RULES
55-
- ✅ ALWAYS edit the central JSON file first
56-
- ✅ NEVER edit generated LaTeX files directly
57-
- ✅ Use consistent formatting conventions
58-
- ❌ Never edit `/Users/tserre/Projects/prj_cv/latex/serre_cv.tex` directly
59-
- ❌ Never edit `/Users/tserre/Projects/prj_cv/latex/serre_cv.pdf` directly
41+
- ✅ Update the central file first, then run `sync_from_central_publications.py`
42+
- ❌ Do not edit `src/data/publications_by_year.json` directly—it is produced by the sync script
43+
- The file `src/data/officialPublicationUrls.js` is a display override map; keep it in sync with central when you add official links so it mirrors the single source of truth
6044

6145
## VERIFICATION
62-
1. Check generated CV PDF looks correct
63-
2. Check lab website displays correctly
64-
3. Ensure both sources are identical
46+
1. Central file has the correct URL for published papers
47+
2. After sync, lab website publications page shows the correct link
48+
3. CV PDF matches central data

src/pages/Publications/Publications.jsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,12 @@ export function Publications() {
1212
const [searchQuery, setSearchQuery] = useState("");
1313
const [selectedYear, setSelectedYear] = useState("All");
1414

15-
// Official journal URL overrides (used when mapping or publication.url could be stale/wrong)
16-
const BETTER_AI_JOURNAL_URL = "https://www.cell.com/trends/cognitive-sciences/fulltext/S1364-6613(25)00349-3";
17-
1815
// Function to get the official publication URL (journal/conference/OpenReview)
1916
const getOfficialUrl = (publication) => {
20-
// Explicit overrides for papers that must always link to the journal (not arXiv)
21-
if (publication.title && publication.title.includes("Better artificial intelligence does not mean better models of biology")) {
22-
return BETTER_AI_JOURNAL_URL;
23-
}
24-
// Then try the mapping
2517
const mappedUrl = getOfficialPublicationUrl(publication.title);
2618
if (mappedUrl) {
2719
return mappedUrl;
2820
}
29-
// If URL is not a PDF and not our internal publications page, use it as official URL
3021
if (publication.url &&
3122
!publication.url.endsWith('.pdf') &&
3223
!publication.url.includes('/papers/') &&

0 commit comments

Comments
 (0)