Skip to content
This repository was archived by the owner on Oct 23, 2022. It is now read-only.

fix assert error in choosecluster#360

Merged
BrianGun merged 9 commits intomainfrom
BrianGun/issue359
Feb 7, 2022
Merged

fix assert error in choosecluster#360
BrianGun merged 9 commits intomainfrom
BrianGun/issue359

Conversation

@BrianGun
Copy link
Copy Markdown
Contributor

@BrianGun BrianGun commented Feb 2, 2022

# Pull Request Template

## Description

choosecluster asserts that the cluster diameter is <= pupil diameter. It should actually be equal but because of roundoff error it is sometimes a bit larger. this caused assertion failures that shouldn't have happened. Used isapprox to compare cluster diameter and pupil diameter to make the assertion work properly.

Fixes # (359)

## Type of change

- [ x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

## How Has This Been Tested?

added tests to verify that previous failures no longer happen

## Checklist:

- [x ] My code follows the style guidelines of this project
- [ x] I have performed a self-review of my own code
- [ x] I have commented my code, particularly in hard-to-understand areas
- [ x] I have made corresponding changes to the documentation
- [ x] My changes generate no new warnings
- [ x] I have added tests that prove my fix is effective or that my feature works
- [ x] New and existing unit tests pass locally with my changes
- [ x] Any dependent changes have been merged and published in downstream modules
- [ x] I have checked my code and corrected any misspellings

@BrianGun BrianGun changed the title CompatHelper: bump compat for Luxor to 3, (keep existing compat) (#354) fix assert error in choosecluster Feb 2, 2022
@BrianGun BrianGun requested a review from galran February 3, 2022 01:06
BrianGun and others added 5 commits February 2, 2022 19:17
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 7, 2022

Codecov Report

Merging #360 (d324a2e) into main (9997b5f) will increase coverage by 2.38%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #360      +/-   ##
==========================================
+ Coverage   52.12%   54.51%   +2.38%     
==========================================
  Files          81       81              
  Lines        7802     7802              
==========================================
+ Hits         4067     4253     +186     
+ Misses       3735     3549     -186     
Impacted Files Coverage Δ
src/Examples/other_examples.jl 1.78% <ø> (ø)
src/RepeatingStructures/Multilens/Analysis.jl 67.36% <100.00%> (+67.36%) ⬆️
src/RepeatingStructures/Cluster.jl 75.00% <0.00%> (+5.76%) ⬆️
src/RepeatingStructures/Lattice.jl 31.81% <0.00%> (+15.15%) ⬆️
src/RepeatingStructures/HexagonalLattice.jl 66.19% <0.00%> (+16.90%) ⬆️
src/RepeatingStructures/Multilens/HexClusters.jl 70.27% <0.00%> (+56.75%) ⬆️
src/RepeatingStructures/Multilens/HexTilings.jl 87.75% <0.00%> (+87.75%) ⬆️

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 9997b5f...d324a2e. Read the comment docs.

@BrianGun BrianGun merged commit 4f8986e into main Feb 7, 2022
@BrianGun BrianGun deleted the BrianGun/issue359 branch February 7, 2022 20:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants