fix(log): pass and log altloc_occ dict rather than float to get base map#169
fix(log): pass and log altloc_occ dict rather than float to get base map#169marcuscollins merged 2 commits intomainfrom
Conversation
📝 WalkthroughWalkthroughUpdates to base map path resolution in the grid-search script to pass altloc occupancies as a dict (A and B=1.0-A) and logging to match; tests extended to exercise ProteinConfig.get_base_map_path_for_occupancy with multiple occupancy scenarios and edge-case warnings. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
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. Comment |
| for occ in args.occupancies: | ||
| path = config.get_base_map_path_for_occupancy(occ) # will warn if not found | ||
| altloc_occ = {"A": occ, "B": 1.0 - occ} | ||
| path = config.get_base_map_path_for_occupancy(altloc_occ) # will warn if not found |
There was a problem hiding this comment.
Does this call actually work? (I'm just on a phone on the way to SFO so can't check rn) But I thought this method just took a float, not a dictionary?
There was a problem hiding this comment.
I believe Karson has changed the related utils function to handle dict now. I can add a few tests.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@tests/eval/test_eval_dataclasses.py`:
- Around line 136-174: The new fixture protein_config and the test methods in
class TestProteinConfigGetBaseMapPath (e.g., test_returns_path_when_file_exists,
test_returns_none_when_file_missing, test_zero_occ_altloc_dropped_from_filename,
test_all_zero_occupancies_returns_none_with_warning,
test_sum_exceeds_one_returns_none_with_warning) lack NumPy-style docstrings; add
concise NumPy-style docstrings to the protein_config fixture and each test
method describing purpose, parameters (if any), and return behavior (for the
fixture) following the repo's docstring pattern so linting passes.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 7dea3e41-203c-45da-ab4c-31d7c1b11f81
📒 Files selected for processing (1)
tests/eval/test_eval_dataclasses.py
marcuscollins
left a comment
There was a problem hiding this comment.
Thanks for the extra tests! LGTM.
|
Currently ignoring failing test in protenix-dev. This test passes when running locally. |
Address issue #160
Summary by CodeRabbit
Refactor
Tests