Skip to content

Comments

Fix issue when headers are parsed and a NaN is encountered#23

Merged
c-randall merged 3 commits intomainfrom
bugfix/nan-headers
Feb 17, 2026
Merged

Fix issue when headers are parsed and a NaN is encountered#23
c-randall merged 3 commits intomainfrom
bugfix/nan-headers

Conversation

@c-randall
Copy link
Collaborator

Description

For excel files with NaN in a given row the find_headers function would break because even when the row is converted to a str, the NaN remains a float. This has now been fixed by replacing NaN with empty strings during header parsing.

This PR also includes some minor changes to the error codes that ruff checks for.

Type of change

  • New feature (non-breaking change which adds functionality)
  • Optimization (back-end change that improves speed/readability/etc.)
  • Bug fix (non-breaking change which fixes an issue)
  • Chore (any other clean up, maintenance, etc.)

Key checklist:

  • No style issues: $ nox -s linter [-- format]
  • Code is free of misspellings: $ nox -s codespell [-- write]
  • All tests pass: $ nox -s tests
  • Badges are updated: $ nox -s badges

Further checks:

  • The documentation builds: $ nox -s docs.
  • Code is commented, particularly in hard-to-understand areas.
  • Tests are added that prove fix is effective or that feature works.

@codecov
Copy link

codecov bot commented Feb 17, 2026

Codecov Report

❌ Patch coverage is 25.00000% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 30.07%. Comparing base (8dcfec8) to head (a9c5a83).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
src/ampworks/_core/_read.py 25.00% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #23      +/-   ##
==========================================
- Coverage   30.09%   30.07%   -0.02%     
==========================================
  Files          40       40              
  Lines        1738     1739       +1     
==========================================
  Hits          523      523              
- Misses       1215     1216       +1     
Flag Coverage Δ
unittests 30.07% <25.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@c-randall c-randall marked this pull request as ready for review February 17, 2026 16:39
@c-randall c-randall merged commit d63473e into main Feb 17, 2026
11 of 13 checks passed
@c-randall c-randall deleted the bugfix/nan-headers branch February 17, 2026 16:40
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