Skip to content

Comment out the header line - #12

Merged
fbaensch-beilstein merged 1 commit into
mainfrom
comment-header-line
Aug 21, 2026
Merged

Comment out the header line#12
fbaensch-beilstein merged 1 commit into
mainfrom
comment-header-line

Conversation

@fbaensch-beilstein

Copy link
Copy Markdown
Collaborator

What

abbreviations.smi line 1 becomes # Abbreviation<TAB>SMILES.

Consumers that treat the file as pure data currently read the header as a row and try to parse the literal string SMILES as a structure. In BChemXtract that surfaces as a WARN Invalid SMILES with a CDKException stack trace on every JVM start. # is the comment convention those parsers already skip.

Why the second file

index.html uses line 1 for the DataTables column titles and splits it on whitespace, so a bare # would have produced three columns and misaligned the data. It now strips a leading # from the header line before splitting — the viewer renders Abbreviation / SMILES exactly as before.

Verification

  • pd.read_csv(sep='\t') → columns ['# Abbreviation', 'SMILES'], to_csv(sep='\t', index=False) round-trip byte-identical, so lint.py passes
  • ./scripts/check_duplicates_abbreviations.sh passes; cut -f1 | sort | uniq -d also clean
  • index.html parse re-run in node: headers ["Abbreviation","SMILES"], 300 data rows, last row NHMe → [*]NC

No data rows were added, removed, or changed.

🤖 Generated with Claude Code

Parsers that treat the file as pure data read `Abbreviation<TAB>SMILES` as a
row and try to parse "SMILES" as a structure. Prefixing the header with `#`
makes it skippable by the usual convention.

index.html strips a leading `#` from the header line so the viewer still
renders two named columns. lint.py's pandas round-trip and the duplicate
check are unaffected.
@fbaensch-beilstein
fbaensch-beilstein merged commit afae916 into main Aug 21, 2026
2 checks passed
@fbaensch-beilstein
fbaensch-beilstein deleted the comment-header-line branch August 21, 2026 13:46
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