Skip to content

Make uei_count optional - #436

Merged
johandahlberg merged 2 commits into
devfrom
feature/pna-3264
Aug 5, 2026
Merged

Make uei_count optional#436
johandahlberg merged 2 commits into
devfrom
feature/pna-3264

Conversation

@johandahlberg

@johandahlberg johandahlberg commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Description

Make the uei_count column optional.

Fixes: pna-3264

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

With the associated unit tests.

PR checklist:

  • This comment contains a description of changes (with reason).
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • If a new tool or package is included, I have updated dependencies in pyproject.toml and cited it properly
  • I have checked my code and documentation and corrected any misspellings
  • I have documented any significant changes to the code in CHANGELOG.md

Note

Low Risk
Backward-compatible schema relaxation with localized DuckDB/SQL branching; behavior when uei_count is present is unchanged, and molecule counts without it use edge count as documented.

Overview
uei_count is now optional on PNA edgelists in sample calling and graph component recovery. Edgelists that omit the column no longer fail on hard-coded SUM(uei_count) or SELECT lists.

Shared helpers has_uei_count (DuckDB DESCRIBE) and n_molecules_sql (SUM(uei_count) vs COUNT(*)) drive the behavior. Graph recovery uses them for molecule totals in get_count_statistics, PXL build stats, and create_working_edgelist (the column is dropped from the working parquet when missing). Sample calling builds the dehashed edgelist COPY without uei_count when it is not present.

CHANGELOG documents the change under Unreleased. Unit tests cover stats, working edgelist shape, and end-to-end sample calling without uei_count.

Reviewed by Cursor Bugbot for commit 5f4277f. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 51eaa3e. Configure here.

Comment thread src/pixelator/pna/graph/component_recovery.py
- Only select the uei column when it is present so sample
  calling works also without it.
- Make uei_count optional in graph component recovery.
  When uei_count is missing, use number of edges as a
  proxy for number of molecules

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@johandahlberg
johandahlberg requested a review from ptajvar August 5, 2026 07:59

@ptajvar ptajvar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@johandahlberg
johandahlberg merged commit 8468ae0 into dev Aug 5, 2026
17 checks passed
@johandahlberg
johandahlberg deleted the feature/pna-3264 branch August 5, 2026 08:15
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