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 _entities #1260

Merged
merged 5 commits into from
Feb 11, 2023
Merged

Fix _entities #1260

merged 5 commits into from
Feb 11, 2023

Conversation

adam-urbanczyk
Copy link
Member

@adam-urbanczyk adam-urbanczyk commented Feb 3, 2023

Fix iteration over entities and avoid hash collisions. This should solve intermittent test failures.

Fix iteration over entities and avoid hash collisions
@adam-urbanczyk adam-urbanczyk marked this pull request as draft February 3, 2023 18:21
@codecov
Copy link

codecov bot commented Feb 4, 2023

Codecov Report

Merging #1260 (5945bea) into master (4d8bbf5) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #1260   +/-   ##
=======================================
  Coverage   94.09%   94.09%           
=======================================
  Files          26       26           
  Lines        5432     5434    +2     
  Branches      919      920    +1     
=======================================
+ Hits         5111     5113    +2     
  Misses        190      190           
  Partials      131      131           
Impacted Files Coverage Δ
cadquery/occ_impl/shapes.py 92.66% <100.00%> (+0.01%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@adam-urbanczyk adam-urbanczyk marked this pull request as ready for review February 5, 2023 17:04
item.HashCode(HASH_CODE_MAX)
] = item # needed to avoid pseudo-duplicate entities

# needed to avoid pseudo-duplicate entities
Copy link
Member Author

Choose a reason for hiding this comment

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

OCP does not wrap inner iterators (including MapOfShape), so this kind of construction is needed here.

appveyor.yml Show resolved Hide resolved
Copy link
Member

@lorenzncode lorenzncode left a comment

Choose a reason for hiding this comment

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

Given the test failures are intermittent I was unable to reproduce the issue with the old method to compare with the fix. I tested the PR branch and did not find any problem with the new implementation. Good find if this solves the intermittent test failures.

@adam-urbanczyk adam-urbanczyk merged commit 0364153 into master Feb 11, 2023
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.

3 participants