Skip to content

[FIX/MAINT] tests in pubget - #64

Merged
jdkent merged 2 commits into
neuroquery:mainfrom
jdkent:claude/zealous-noether-58egzp
Sep 25, 2026
Merged

jdkent merged 2 commits into
neuroquery:mainfrom
jdkent:claude/zealous-noether-58egzp

Conversation

@jdkent

@jdkent jdkent commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

The article set used by the tests gained a table with 10 coordinate rows
and 24 columns, and its <body> was re-indented, which left three tests
asserting on the previous fixture:

- the whole corpus now has 20 coordinate rows instead of 12;
- `test_extract_data_to_csv_with_tables` read `text.csv` row 0, but the
  rows are in the order in which the article directories are visited, so
  row 0 is not necessarily an article with an "X Y Z" table (this test
  failed from the commit that introduced it). Look articles up by pmcid
  instead, and also check that the wide table is inserted in full;
- the re-indented body makes the labelbuddy document start the body with
  a newline, so match the whitespace after the "Body" heading loosely.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019toBA75BjG7HiUmmMChBzd
`DataFrame.fillna("")` raises in pandas 3.0 when a column is empty for
every article in the chunk: pandas gives it the float dtype and refuses
to store empty strings in it. Read the text fields as strings and
missing values as empty strings instead, which also stops a purely
numeric title or abstract from being parsed as a number.

The pinned CI environments still use pandas 2.x, but the whole test
suite fails on a plain `pip install .[dev]` without this.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019toBA75BjG7HiUmmMChBzd

@jdkent jdkent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jdkent
jdkent merged commit 0585e9b into neuroquery:main Sep 25, 2026
8 checks passed
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.

2 participants