Skip to content

Don't trigger neighbor list warnings on ignored constant keys that are actually present#1121

Merged
cbkerr merged 15 commits into
mainfrom
fix/neighbors-constant-ignore
Jul 13, 2026
Merged

Don't trigger neighbor list warnings on ignored constant keys that are actually present#1121
cbkerr merged 15 commits into
mainfrom
fix/neighbors-constant-ignore

Conversation

@cbkerr

@cbkerr cbkerr commented Jul 2, 2026

Copy link
Copy Markdown
Member

Description

Fixes an errant warning that would appear when ignoring a constant parameter.
Neighbor list calculation filtered out constant state point parameters, but then purposefully ignoring such a parameter would trigger a warning that the ignored key was not present. This adds tests for the structure of the neighbor list while fixing this.

Motivation and Context

Discovered while working on glotzerlab/signac-dashboard#320

Checklist:

@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 0.00%. Comparing base (43655ee) to head (fe903d0).

Files with missing lines Patch % Lines
signac/project.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main   #1121   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files         21      21           
  Lines       3632    3633    +1     
=====================================
- Misses      3632    3633    +1     

☔ View full report in Codecov by Harness.
📢 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.

@bdice bdice left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approving with a couple ideas. I don't need to review further.

Comment thread signac/project.py Outdated
Comment thread tests/test_neighborlist.py Outdated
assert neighbor_list[job.id] == {}

def test_neighborlist_structure(self):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change

Comment thread tests/test_neighborlist.py Outdated
assert key

def test_neighborlist_structure_with_constant(self):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change

@cbkerr cbkerr merged commit 4716634 into main Jul 13, 2026
13 checks passed
@cbkerr cbkerr deleted the fix/neighbors-constant-ignore branch July 13, 2026 17:43
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