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

fix writevtk() bug where types=all was ignored #3290

Merged
merged 2 commits into from
Oct 31, 2019

Conversation

christophlohrmann
Copy link
Contributor

Description of changes:

  • fixed bug where the argument types='all' was ignored by system.part.writevtk()

PR Checklist

  • Tests?
    • Interface
    • Core
  • Docs?

@jngrad jngrad self-requested a review October 31, 2019 15:18
Copy link
Member

@jngrad jngrad left a comment

Choose a reason for hiding this comment

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

There is an issue with the conditionals when using types = 'all': TypeError: 'in <string>' requires string as left operand, not int, can be avoided using Python's short-circuit evaluation.

src/python/espressomd/particle_data.pyx Outdated Show resolved Hide resolved
src/python/espressomd/particle_data.pyx Outdated Show resolved Hide resolved
src/python/espressomd/particle_data.pyx Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Oct 31, 2019

Codecov Report

Merging #3290 into python will increase coverage by <1%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           python   #3290    +/-   ##
=======================================
+ Coverage      85%     85%   +<1%     
=======================================
  Files         534     534            
  Lines       25524   25524            
=======================================
+ Hits        21948   21949     +1     
+ Misses       3576    3575     -1
Impacted Files Coverage Δ
src/core/particle_data.cpp 96% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cf00e2e...9a7fc45. Read the comment docs.

@jngrad jngrad added this to the Espresso 4.1.1 milestone Oct 31, 2019
switch conditionals as suggested by JNGrad

Co-Authored-By: Jean-Noël Grad <[email protected]>
@jngrad
Copy link
Member

jngrad commented Oct 31, 2019

bors r+

bors bot added a commit that referenced this pull request Oct 31, 2019
3288: core: Simplify particle removal r=RudolfWeeber a=fweik

Fixes #3286.

Description of changes:
 - Simplify particle removal by doing one linear pass over all particles
   instead using index


3290: fix writevtk() bug where types=all was ignored r=jngrad a=christophlohrmann

Description of changes:
 - fixed bug where the argument ``types='all'`` was ignored by ``system.part.writevtk()`` 


PR Checklist
------------
 - [ ] Tests?
   - [ ] Interface
   - [ ] Core 
 - [ ] Docs?


Co-authored-by: Florian Weik <[email protected]>
Co-authored-by: Christoph Lohrmann <[email protected]>
Co-authored-by: christophlohrmann <[email protected]>
@bors
Copy link
Contributor

bors bot commented Oct 31, 2019

Build succeeded

@bors bors bot merged commit 9a7fc45 into espressomd:python Oct 31, 2019
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