-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 1080 #1088
Issue 1080 #1088
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1088 +/- ##
==========================================
- Coverage 90.64% 90.64% -0.01%
==========================================
Files 61 61
Lines 6231 6240 +9
==========================================
+ Hits 5648 5656 +8
- Misses 583 584 +1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR pretty much looks good, thanks for the contribution @RainierBarrett @chrisjonesBSU.
) | ||
for bound in bounds: | ||
if not isinstance(bound, (Box, list)): | ||
raise ValueError( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A unit test that this error is called would be great in test_packing.py. Same for the error on line 368.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Second this.
An example of how to invoke an error for testing with pytest:
def test_n_bonds_particle(self):
comp = mb.Compound(name="A", pos=[0, 0, 0])
with pytest.raises(MBuildError):
comp.n_bonds
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/psf/black: 22.12.0 → 23.1.0](psf/black@22.12.0...23.1.0) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Produce n=2 when ports are not capped * Add option to not scale charges in lj units, and update docs for consistency * Update mbuild/formats/lammpsdata.py Co-authored-by: Co Quach <43968221+daico007@users.noreply.github.com> --------- Co-authored-by: Co Quach <43968221+daico007@users.noreply.github.com>
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
PR Summary:
Addresses #1080. Added some more aggressive input checks around the
bounds
arg forfill_region
. Not sure if new unit tests are warranted but happy to add if so.PR Checklist