-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Bug Fix Summary: Result Labels False "Omitted" Message
Technical Details
Root Cause
In datalab/adapters_metadata/common.py at line 368, the code used:
num_rows = len(adapter.result)However, TableResult.__len__() (defined in sigima/objects/scalar/table.py:349) returns:
def __len__(self) -> int:
"""Return the number of names in the table."""
return len(self.headers) # Returns column count, not row count!This caused confusion between columns and rows, leading to false truncation messages.
Solution
Changed to use the correct row count from the DataFrame:
num_rows = len(df) # Correctly returns the number of data rowsImpact Analysis
- Severity: Low (cosmetic/display issue only)
- Affected: All table-based result labels (pulse features, statistics, etc.)
- User Impact: Confusing display suggesting hidden data when none exists
- Data Integrity: No impact - only affects label display
Testing
Created datalab/tests/features/signal/pulse_label_test.py which:
- Creates a signal with pulse features (single row, 13 columns)
- Generates the HTML label
- Verifies no "omitted" text appears in the label
- Confirms the DataFrame has exactly 1 row
- Notes that
len(adapter.result)returns column count by design
Test passes with the fix applied.
French Translation Fix
The translation "%s omitted" → "%s non affichés" was corrected to the feminine form
"%s non affichées" because the %s placeholder contains feminine nouns:
- "lignes" (lines) - feminine
- "colonnes" (columns) - feminine
This grammatical correction ensures proper French language agreement.
Files Modified
- datalab/adapters_metadata/common.py: Core bug fix (1 line)
- datalab/locale/fr/LC_MESSAGES/datalab.po: French translation fix
- datalab/locale/fr/LC_MESSAGES/datalab.mo: Compiled translation (auto-generated)
- datalab/tests/features/signal/pulse_label_test.py: New test file
- doc/release_notes/release_1.00.md: Release notes updated
- issues/pulse_label_omitted_bug.md: Bug documentation
Verification Steps
-
Run the new test:
python scripts/run_with_env.py python -m pytest datalab/tests/features/signal/pulse_label_test.py -v
-
Manual verification:
- Open DataLab
- Create a signal
- Run pulse features extraction
- Check that the label shows only the data table without false "omitted" text
-
Check with ROIs:
- Add ROIs to a signal
- Run pulse features
- Verify truncation still works correctly when there actually are multiple rows
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working