Skip to content

chore: normalize CSVs to LF + enforce in CI - #42

Merged
pierreleripoll merged 2 commits into
mainfrom
chore/normalize-csv-line-endings
Aug 5, 2026
Merged

chore: normalize CSVs to LF + enforce in CI#42
pierreleripoll merged 2 commits into
mainfrom
chore/normalize-csv-line-endings

Conversation

@pierreleripoll

Copy link
Copy Markdown
Collaborator

Normalize every tracked CSV to LF line endings with a final newline, and enforce it in CI.

Why

The hub's contribution-submit feature (see resslab-hub-data#41) re-serializes the primary CSV with LF endings when appending contributed rows. Five of the nine primary CSVs were stored with CRLF, so every contribution PR showed the entire file — header included — as changed, making diffs unreviewable and guaranteeing conflicts between concurrent contributions.

What

  • chore: normalize all CSVs to LF line endings with final newlines — 1,167 files: 1,165 CRLF→LF, 159 missing final newlines added (157 overlap). Verified: git diff --ignore-cr-at-eol against the base is completely empty, i.e. zero content changes; all 9 primary CSVs now round-trip byte-identically through the backend's submission serializer, so future contribution diffs are exactly the appended rows.
  • ci: enforce LF + final newline on CSVs.gitattributes gains *.csv text eol=lf (git clients auto-normalize on commit), and data-validation.yml gains an unconditional line-endings job (fails on any CR in a tracked CSV or any missing final newline) as the backstop for web uploads and API commits, which bypass .gitattributes.

Merging notes

  • Squash-merge with [skip ci] in the commit title — e.g. chore: normalize CSVs to LF + enforce in CI [skip ci]. Otherwise ci.yml re-uploads ~1,165 unchanged files to the prod database.
  • The PR-validation jobs for all 6 mapped types will run on this PR; content is unchanged so they should pass as they do today.
  • Open data PRs (including data(material): add 15 experiments (DEMO-MAT-001…) #41) merge cleanly afterwards: both sides make identical line-ending changes, which git auto-resolves.
  • Follow-up after merge: add .git-blame-ignore-revs containing the squashed commit's SHA (it can't be known before the squash), so GitHub blame and git blame skip this commit.

@pierreleripoll
pierreleripoll merged commit 9186bee into main Aug 5, 2026
3 of 4 checks passed
@pierreleripoll
pierreleripoll deleted the chore/normalize-csv-line-endings branch August 5, 2026 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant