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

feat: Add __len__ to Burst writer #1575

Merged
merged 3 commits into from Jun 19, 2023
Merged

feat: Add __len__ to Burst writer #1575

merged 3 commits into from Jun 19, 2023

Conversation

b-butler
Copy link
Member

Description

Adds a __len__ method to Burst.

Motivation and context

This is useful for custom actions which use Burst.

How has this been tested?

Added a new test.

Change log

``hoomd.write.Burst`` now has a ``__len__`` method.

Checklist:

@b-butler b-butler requested review from a team as code owners June 14, 2023 20:47
@b-butler b-butler requested review from tommy-waltmann and shihkual and removed request for a team June 14, 2023 20:47
Comment on lines 143 to 145
assert (burst_writer) == 3
burst_writer.dump()
assert (burst_writer) == 0
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these supposed to say len(burst_writer) and not (burst_writer)?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes 😂 they were.

@joaander joaander added the validate Execute long running validation tests on pull requests label Jun 16, 2023
@joaander joaander merged commit 11880ed into trunk-minor Jun 19, 2023
72 of 73 checks passed
@joaander joaander deleted the feat/burst-len branch June 19, 2023 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
validate Execute long running validation tests on pull requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants