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

Equilibria analysis feature branch #3338

Draft
wants to merge 9 commits into
base: develop
Choose a base branch
from
Draft

Conversation

je-cook
Copy link
Contributor

@je-cook je-cook commented Jun 6, 2024

Description

Equilibria analysis feature branch closes #675.
(Other relevant issues: #431, #985, #3080, #3376)

Interface Changes

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

@je-cook je-cook added enhancement New feature or request equilibria Tasks relating to the equilibria module labels Jun 6, 2024
Copy link

codecov bot commented Jun 6, 2024

Codecov Report

Attention: Patch coverage is 12.99342% with 529 lines in your changes missing coverage. Please review.

Project coverage is 75.00%. Comparing base (104fc74) to head (749d754).
Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
bluemira/equilibria/plotting.py 11.44% 294 Missing ⚠️
bluemira/equilibria/analysis.py 0.00% 212 Missing ⚠️
bluemira/utilities/plot_tools.py 10.52% 17 Missing ⚠️
...quilibria/optimisation/problem/_minimal_current.py 37.50% 5 Missing ⚠️
bluemira/equilibria/diagnostics.py 96.87% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3338      +/-   ##
===========================================
- Coverage    76.42%   75.00%   -1.43%     
===========================================
  Files          230      232       +2     
  Lines        26721    27313     +592     
===========================================
+ Hits         20422    20485      +63     
- Misses        6299     6828     +529     

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

Copy link
Contributor

github-actions bot commented Jun 6, 2024

⚠️ Warning Report

Found 0 new warnings, 0 fixed warnings. 🎉

All warnings (7)

On runtest

  • /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/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/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/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
`

  • /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

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 force-pushed the feature/eq_analysis_tools branch 3 times, most recently from 0513c8c to fe1191a Compare June 28, 2024 14:43
@je-cook je-cook force-pushed the feature/eq_analysis_tools branch 2 times, most recently from a51f25f to 0d03612 Compare July 9, 2024 08:18
@je-cook je-cook force-pushed the feature/eq_analysis_tools branch 2 times, most recently from dfe56b1 to 9f6c09f Compare August 16, 2024 10:01
je-cook and others added 9 commits October 10, 2024 10:31
* 🎨 Small cleanup

* 🚧 Initial structure
* Create equilibrium comparison plotter class

- compare equilibrium object with reference equilibrium
- split psi plotting
- plotting percentage difference between current and reference equilibrium
- plot reference lcfs

* work on plots before work to update plot instead of producing new plots

* make subplots have the same axes limits

* remove unused argument in call to EquilibriumComparisonPlotter class in _minimal_current

* Add xz_plot_setup to plot_tools.py

* working on updating plot

* remove blank line after docstring

* trying to update colorbar (from stackexchange)

* colorbar updating instead of multiple colorbars

* add # noqa: BLE001 to Exception

* update typing

* pre-commit changes

* fix from github comment

* 🚨 Few missing imports

---------

Co-authored-by: james <james.cook1@ukaea.uk>
Copy link

sonarcloud bot commented Oct 10, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request equilibria Tasks relating to the equilibria module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Equilibrium analysis tools
3 participants