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 meep mpi #1358

Merged
merged 3 commits into from Feb 26, 2023
Merged

Fix meep mpi #1358

merged 3 commits into from Feb 26, 2023

Conversation

simbilod
Copy link
Collaborator

Fixes a bug where simulation parameters were not passed to the MEEP MPI plugin
Add test to catch this in the future

This reverts some changes made in e34f42f that introduced the bug. Was there a reason for these changes?

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Feb 26, 2023

Sourcery Code Quality Report

❌  Merging this PR will decrease code quality in the affected files by 1.82%.

Quality metrics Before After Change
Complexity 6.43 ⭐ 6.49 ⭐ 0.06 👎
Method Length 129.00 😞 139.17 😞 10.17 👎
Working memory 9.83 🙂 10.13 😞 0.30 👎
Quality 57.67% 🙂 55.85% 🙂 -1.82% 👎
Other metrics Before After Change
Lines 373 395 22
Changed files Quality Before Quality After Quality Change
gdsfactory/simulation/gmeep/test_write_sparameters_meep.py 76.22% ⭐ 73.86% 🙂 -2.36% 👎
gdsfactory/simulation/gmeep/write_sparameters_meep_mpi.py 35.48% 😞 33.99% 😞 -1.49% 👎

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
gdsfactory/simulation/gmeep/write_sparameters_meep_mpi.py write_sparameters_meep_mpi 17 🙂 479 ⛔ 19 ⛔ 23.06% ⛔ Try splitting into smaller methods. Extract out complex expressions
gdsfactory/simulation/gmeep/test_write_sparameters_meep.py test_sparameters_straight_batch 1 ⭐ 203 😞 6 ⭐ 66.27% 🙂 Try splitting into smaller methods
gdsfactory/simulation/gmeep/test_write_sparameters_meep.py test_sparameters_straight_mpi 0 ⭐ 208 ⛔ 6 ⭐ 66.90% 🙂 Try splitting into smaller methods
gdsfactory/simulation/gmeep/test_write_sparameters_meep.py test_sparameters_lazy_parallelism 0 ⭐ 144 😞 5 ⭐ 75.21% ⭐ Try splitting into smaller methods
gdsfactory/simulation/gmeep/test_write_sparameters_meep.py test_sparameters_straight_symmetric 0 ⭐ 150 😞 4 ⭐ 77.19% ⭐ Try splitting into smaller methods

Legend and Explanation

The emojis denote the absolute quality of the code:

  • ⭐ excellent
  • 🙂 good
  • 😞 poor
  • ⛔ very poor

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Help us improve this quality report!

@codecov
Copy link

codecov bot commented Feb 26, 2023

Codecov Report

Merging #1358 (fbd91b6) into main (9c7fd35) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1358   +/-   ##
=======================================
  Coverage   69.82%   69.82%           
=======================================
  Files         365      365           
  Lines       21762    21762           
  Branches     3117     3117           
=======================================
  Hits        15196    15196           
  Misses       5671     5671           
  Partials      895      895           

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

@joamatab
Copy link
Contributor

Thank you Simon!

@joamatab joamatab merged commit 1389d8b into gdsfactory:main Feb 26, 2023
@simbilod simbilod deleted the fix_meep_mpi branch April 5, 2023 16:27
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.

None yet

2 participants