Skip to content
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

Merged
merged 12 commits into from
Feb 8, 2023
Merged

Issue 1080 #1088

merged 12 commits into from
Feb 8, 2023

Conversation

RainierBarrett
Copy link
Contributor

@RainierBarrett RainierBarrett commented Feb 3, 2023

PR Summary:

Addresses #1080. Added some more aggressive input checks around the bounds arg for fill_region. Not sure if new unit tests are warranted but happy to add if so.

PR Checklist


  • Includes appropriate unit test(s)
  • Appropriate docstring(s) are added/updated
  • Code is (approximately) PEP8 compliant
  • Issue(s) raised/addressed?

@codecov
Copy link

codecov bot commented Feb 3, 2023

Codecov Report

Attention: Patch coverage is 92.30769% with 1 line in your changes missing coverage. Please review.

Project coverage is 90.64%. Comparing base (c15fb1a) to head (0ea5c9a).
Report is 100 commits behind head on main.

Files Patch % Lines
mbuild/packing.py 90.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@CalCraven CalCraven left a 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(
Copy link
Contributor

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.

Copy link
Member

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 bot and others added 8 commits February 7, 2023 10:34
* [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 <[email protected]>

---------

Co-authored-by: Co Quach <[email protected]>
Copy link
Member

@daico007 daico007 left a comment

Choose a reason for hiding this comment

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

LGTM!

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.

4 participants