Skip to content

test(utils): check loss inputs carry the model array's elements - #583

Merged
k-chrispens merged 1 commit into
mainfrom
badtest/20261026-1306-modal
Nov 5, 2026
Merged

k-chrispens merged 1 commit into
mainfrom
badtest/20261026-1306-modal

Conversation

@k-chrispens

@k-chrispens k-chrispens commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Tests
    • Added coverage to verify that loss inputs preserve the model array’s elements when it differs from the structure array.

@k-chrispens
k-chrispens requested a review from a team as a code owner November 4, 2026 01:33
Copilot AI balanced review requested due to automatic review settings November 4, 2026 01:33
@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The updated test checks that to_loss_inputs() derives element indices from the model array and preserves that array in loss_inputs.atom_array, even when the structure array has the same length but different elements.

Changes: Loss input atom array

Layer / File(s) Summary
Verify model array in loss inputs
tests/utils/test_loss_atom_array.py
The test checks that loss element indices match the model array, differ from the structure array, and that loss_inputs.atom_array is the model array.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Possibly related PRs

Suggested reviewers: marcuscollins

Merge Risk: Minimal · up to 4210b

The change adds checks without changing production behavior. No merge-blocking risk is evident.

Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly describes the test of the model array's elements in loss inputs.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files.

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1866aecd-29c5-4928-8c87-c114bc4856e7
Commits

Reviewing files that changed from the base of the PR and between 8cf0d88 and 4210b6e.

Files selected for processing: 1

  • tests/utils/test_loss_atom_array.py

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@DorisMai DorisMai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm. nitpick: I might suggest rename the function to something like test_loss_inputs_use_model_topology_and_elements, since the coordinate and b-factor are not mapped yet between the model atom array and the loss inputs.

@k-chrispens
k-chrispens force-pushed the badtest/20261026-1306-modal branch from 31c1c7e to 4210b6e Compare November 5, 2026 22:42
@k-chrispens
k-chrispens merged commit 0a8e6d1 into main Nov 5, 2026
12 of 15 checks passed

This branch is waiting to be deployed

1 waiting deployment
gpu-testing — 4210b6e2 Waiting Nov 5, 2026 by k-chrispens via protenix-dev #1151
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.

3 participants