Skip to content

Conversation

@Ahzyuan
Copy link
Member

@Ahzyuan Ahzyuan commented Jun 23, 2025

Prep Steps

Before we dive in, let's confirm you've unlocked all these steps

  • πŸ” I've checked for duplicate PRs (click to check)
  • πŸ“œ I've followed contribution guidelines
    • ✨ I've linted and formatted my code (how?)
    • πŸ”§ I've formatted the PR title appropriately (how?)
    • 🎯 I've targeted the master branch (how?)
    • πŸ‘ I've allowed maintainer edits on my branch (how? β†’ See step 6)
  • πŸ›‘οΈ I've added/updated tests to cover my changes if prossible (how?)
  • πŸ“ I've added/updated the documentation for any new logic introduced (how?)
  • ⏳ I understand @Ahzyuan has been busy lately and may need time to review. (we appreciate your patience!)

Type of changes

  • 🐞 Bug fix
  • 🌟 New feature
  • πŸ§ͺ Tests
  • πŸ— Refactoring
  • ⚑ Performance improvement
  • πŸ“– Documentation / docstrings
  • ↩️ Revert
  • 🧩 Other

Description

Purpose

The purpose of this PR is to prevent an error from occurring during the rendering of the tabular report in the event that one or more columns have all null values.

Changes:

  • torchmeter/display.py: use column type to identify a all null column, so as to treat it with a different method.
  • tests/test_display.py: add an all-null column in fixture example_df so as to simulate the case talking here. By the way, modify all cases related to the structure/content of example_df.

@github-actions github-actions bot added the bug-fix Fix something that isn't working as expected. label Jun 23, 2025
@github-actions
Copy link

Coverage

Coverage Details on macos under Python 3.8
FileStmtsMissCoverMissing
_stat_numeric.py1130100%Β 
config.py2801096%330, 367, 509, 515, 579–584
core.py3701396%423–424, 429, 467–468, 529, 671, 736, 799, 863, 1827, 1833, 1838
display.py437698%83, 437–438, 440, 803, 905
engine.py1060100%Β 
statistic.py4431596%54, 60, 66, 72, 77, 207, 792, 850–855, 868–869
unit.py410100%Β 
utils.py127199%71
TOTAL19174597%Β 

Summary (on macos under Python 3.8)

Tests Skipped Failures Errors Time
806 2 πŸ’€ 0 ❌ 0 πŸ”₯ 7.917s ⏱️

@github-actions
Copy link

Coverage

Coverage Details on ubuntu under Python 3.8
FileStmtsMissCoverMissing
_stat_numeric.py1130100%Β 
config.py2801096%330, 367, 509, 515, 579–584
core.py3701396%423–424, 429, 467–468, 529, 671, 736, 799, 863, 1827, 1833, 1838
display.py437698%83, 437–438, 440, 803, 905
engine.py1060100%Β 
statistic.py4431596%54, 60, 66, 72, 77, 207, 792, 850–855, 868–869
unit.py410100%Β 
utils.py127199%71
TOTAL19174597%Β 

Summary (on ubuntu under Python 3.8)

Tests Skipped Failures Errors Time
806 2 πŸ’€ 0 ❌ 0 πŸ”₯ 11.632s ⏱️

@github-actions
Copy link

Coverage

Coverage Details on windows under Python 3.8
FileStmtsMissCoverMissing
_stat_numeric.py1130100%Β 
config.py2801096%330, 367, 509, 515, 579–584
core.py3701396%423–424, 429, 467–468, 529, 671, 736, 799, 863, 1827, 1833, 1838
display.py437698%83, 437–438, 440, 803, 905
engine.py1060100%Β 
statistic.py4431596%54, 60, 66, 72, 77, 207, 792, 850–855, 868–869
unit.py410100%Β 
utils.py127199%71
TOTAL19174597%Β 

Summary (on windows under Python 3.8)

Tests Skipped Failures Errors Time
806 2 πŸ’€ 0 ❌ 0 πŸ”₯ 13.187s ⏱️

@Ahzyuan Ahzyuan merged commit 1d0ef43 into master Jun 23, 2025
20 checks passed
@Ahzyuan Ahzyuan deleted the bugfix/all-null-col-render branch June 23, 2025 09:57
@Ahzyuan Ahzyuan self-assigned this Jun 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix Fix something that isn't working as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant