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

Remove some repetition from Greens #3272

Merged
merged 6 commits into from
Aug 15, 2024

Conversation

geograham
Copy link
Contributor

@geograham geograham commented May 13, 2024

Linked Issues

Papercut #205 - three suggestions are made in this issue. The first addresses repetition and is covered by this pull request. The second is now a separate issue (#3273). The third was discussed by Bluemira developers but does not need to be implemented.

Description

Calculations that are repeated in multiple locations are now functions.

Checklist

I confirm that I have completed the following checks:

  • Tests run locally and pass pytest tests --reactor
  • Code quality checks run locally and pass pre-commit run --from-ref develop --to-ref HEAD
  • Documentation built locally and checked sphinx-build -W documentation/source documentation/build

@geograham geograham requested a review from a team as a code owner May 13, 2024 13:49
Copy link

sonarcloud bot commented May 13, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
2.7% Duplication on New Code

See analysis details on SonarCloud

@je-cook je-cook force-pushed the develop branch 5 times, most recently from 5a50acb to 7574352 Compare May 15, 2024 08:13
@je-cook je-cook added magnetostatics Tasks relating to the magnetostatics module quality Tasks relating to quality issues or improvements labels Aug 15, 2024
Georgina Graham and others added 5 commits August 15, 2024 11:34
Co-authored-by: je-cook <81617086+je-cook@users.noreply.github.com>
Co-authored-by: je-cook <81617086+je-cook@users.noreply.github.com>
Copy link

sonarcloud bot commented Aug 15, 2024

Copy link

codecov bot commented Aug 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.02%. Comparing base (b5b5b3f) to head (bd8b76f).
Report is 41 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3272      +/-   ##
===========================================
- Coverage    76.38%   76.02%   -0.36%     
===========================================
  Files          230      230              
  Lines        26640    26640              
===========================================
- Hits         20349    20254      -95     
- Misses        6291     6386      +95     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

⚠️ Warning Report

Found 0 new warnings, 0 fixed warnings. 🎉

All warnings (7)

On runtest

  • /home/runner/miniconda3/envs/bluemira/lib/python3.10/site-packages/ffcx/element_interface.py:26: DeprecationWarning: Converting elements created in UFL to Basix elements is deprecated. You should create the elements directly using basix.ufl.element instead
  • /home/runner/miniconda3/envs/bluemira/lib/python3.10/site-packages/ffcx/element_interface.py:23: DeprecationWarning: Use of elements created by UFL is deprecated. You should create elements directly using Basix.
  • /home/runner/miniconda3/envs/bluemira/lib/python3.10/site-packages/basix/ufl.py:1909: DeprecationWarning: Converting elements created in UFL to Basix elements is deprecated. You should create the elements directly using basix.ufl.element instead
  • /home/runner/miniconda3/envs/bluemira/lib/python3.10/site-packages/ufl/core/expr.py:275: DeprecationWarning: Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
  • /home/runner/work/bluemira/bluemira/bluemira/equilibria/optimisation/harmonics/harmonics_approx_functions.py:41: RuntimeWarning: divide by zero encountered in log10
  • /home/runner/work/bluemira/bluemira/bluemira/radiation_transport/radiation_tools.py:731: DeprecationWarning: interp2dis deprecated!interp2d` is deprecated in SciPy 1.10 and will be removed in SciPy 1.12.0.

For legacy code, nearly bug-for-bug compatible replacements are
RectBivariateSpline on regular grids, and bisplrep/bisplev for
scattered 2D data.

In new code, for regular grids use RegularGridInterpolator instead.
For scattered data, prefer LinearNDInterpolator or
CloughTocher2DInterpolator.

For more details see
https://gist.github.com/ev-br/8544371b40f414b7eaf3fe6217209bff
`

On collect

  • /home/runner/miniconda3/envs/bluemira/lib/python3.10/site-packages/ufl/core/ufl_type.py:56: DeprecationWarning: attach_operators_from_hash_data deprecated, please use UFLObject instead.

@je-cook je-cook self-assigned this Aug 15, 2024
@je-cook je-cook merged commit 5001647 into Fusion-Power-Plant-Framework:develop Aug 15, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
magnetostatics Tasks relating to the magnetostatics module quality Tasks relating to quality issues or improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants