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

Add lower port tests #2981

Merged
merged 11 commits into from
Feb 5, 2024
Merged

Add lower port tests #2981

merged 11 commits into from
Feb 5, 2024

Conversation

je-cook
Copy link
Contributor

@je-cook je-cook commented Feb 2, 2024

Linked Issues

Closes #2253

Description

Adds some lower port tests and does some small rearrangement.

There is a choice here which limit should be imposed on the straight section size.

  1. scale to the maximum size but the minimum size is the user input (alternative 1)
  2. limit to the user input (alternative 2) taken forward

I've currently got 2) set up but up to the reviewer. I can't decide which is best.

The approximation of the TF coil being semi circular also leads to some failures in y point selection. For now I have just added a TODO (and will open an issue if agreed). This only affects extremes of input.

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 EU-DEMO Tasks relating to the EU-DEMO project tests Tasks relating to testing issues / improvements labels Feb 2, 2024
@je-cook je-cook requested review from a team as code owners February 2, 2024 09:12
@je-cook je-cook added the 📜 Papercut Papercut bug label Feb 2, 2024
Copy link
Contributor

github-actions bot commented Feb 2, 2024

⚠️ Warning Report

Found 0 new warnings, 0 fixed warnings. 🎉

All warnings (15)

On collect

  • /home/runner/miniconda3/envs/bluemira/lib/python3.8/site-packages/shiboken2/files.dir/shibokensupport/feature.py:139: DeprecationWarning: The module 'bluemira.utilities.opt_tools' is deprecated and will be removed in v2.0.0. See https://bluemira.readthedocs.io/en/latest/optimisation/optimisation.html for documentation of the new optimisation module.
  • /home/runner/miniconda3/envs/bluemira/lib/python3.8/site-packages/shiboken2/files.dir/shibokensupport/feature.py:139: DeprecationWarning: The module 'bluemira.utilities.opt_problems' is deprecated and will be removed in v2.0.0. See https://bluemira.readthedocs.io/en/latest/optimisation/optimisation.html for documentation of the new optimisation module.
  • /home/runner/miniconda3/envs/bluemira/lib/python3.8/site-packages/shiboken2/files.dir/shibokensupport/feature.py:139: DeprecationWarning: The module 'bluemira.equilibria.opt_problems' is deprecated and will be removed in v2.0.0. See https://bluemira.readthedocs.io/en/latest/optimisation/optimisation.html for documentation of the new optimisation module.
  • /home/runner/miniconda3/envs/bluemira/lib/python3.8/site-packages/shiboken2/files.dir/shibokensupport/feature.py:139: DeprecationWarning: The module 'bluemira.equilibria.opt_objectives' is deprecated and will be removed in v2.0.0. See https://bluemira.readthedocs.io/en/latest/optimisation/optimisation.html for documentation of the new optimisation module.
  • /home/runner/miniconda3/envs/bluemira/lib/python3.8/site-packages/shiboken2/files.dir/shibokensupport/feature.py:139: DeprecationWarning: The module 'bluemira.geometry.optimisation._optimisation_old' is deprecated and will be removed in v2.0.0. See https://bluemira.readthedocs.io/en/latest/optimisation/optimisation.html for documentation of the new optimisation module.
  • /home/runner/miniconda3/envs/bluemira/lib/python3.8/site-packages/shiboken2/files.dir/shibokensupport/feature.py:139: DeprecationWarning: The module 'bluemira.equilibria.opt_constraints' is deprecated and will be removed in v2.0.0. See https://bluemira.readthedocs.io/en/latest/optimisation/optimisation.html for documentation of the new optimisation module.
  • /home/runner/miniconda3/envs/bluemira/lib/python3.8/site-packages/pkg_resources/__init__.py:2868: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('mpl_toolkits'). Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
  • /home/runner/miniconda3/envs/bluemira/lib/python3.8/site-packages/shiboken2/files.dir/shibokensupport/feature.py:139: DeprecationWarning: The module 'bluemira.utilities.optimiser' is deprecated and will be removed in version 2.0.0. See https://bluemira.readthedocs.io/en/latest/optimisation/optimisation.html for documentation of the new optimisation module.
  • /home/runner/miniconda3/envs/bluemira/lib/python3.8/site-packages/pkg_resources/__init__.py:2868: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('sphinxcontrib'). Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
  • /home/runner/miniconda3/envs/bluemira/lib/python3.8/site-packages/shiboken2/files.dir/shibokensupport/feature.py:139: DeprecationWarning: The module 'bluemira.equilibria.opt_constraint_funcs' is deprecated and will be removed in v2.0.0. See https://bluemira.readthedocs.io/en/latest/optimisation/optimisation.html for documentation of the new optimisation module.
  • /home/runner/miniconda3/envs/bluemira/lib/python3.8/site-packages/shiboken2/files.dir/shibokensupport/feature.py:139: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html

On runtest

  • /home/runner/miniconda3/envs/bluemira/lib/python3.8/site-packages/h5py/__init__.py:36: UserWarning: h5py is running against HDF5 1.14.3 when it was built against 1.14.2, this may cause problems
  • /home/runner/work/bluemira/bluemira/bluemira/base/reactor.py:676: DeprecationWarning: Using kwarg 'dim' is no longer supported. Simply pass in the dimensions you would like to show, e.g. show_cad('xz')
  • /home/runner/work/bluemira/bluemira/tests/builders/test_tf_coils.py:46: DeprecationWarning: RippleConstrainedLengthGOP API has changed, please specify how you want to constrain TF ripple by using one of the available RipplePointSelector classes. Defaulting to an EquispacedSelector with n_rip_points=3 for now.
  • /home/runner/work/bluemira/bluemira/eudemo/eudemo/tf_coils/tf_coils.py:338: DeprecationWarning: Argument 'separatrix' is deprecated, argument 'ripple_wire' is used instead.

Copy link

codecov bot commented Feb 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e8737a5) 79.76% compared to head (8e864e6) 79.81%.
Report is 8 commits behind head on develop.

❗ Current head 8e864e6 differs from pull request most recent head a187267. Consider uploading reports for the commit a187267 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2981      +/-   ##
===========================================
+ Coverage    79.76%   79.81%   +0.05%     
===========================================
  Files          223      226       +3     
  Lines        24986    25053      +67     
===========================================
+ Hits         19929    19995      +66     
- Misses        5057     5058       +1     

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

Copy link
Contributor

@oliverfunk oliverfunk left a comment

Choose a reason for hiding this comment

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

Looks good, just remove comments

bluemira/utilities/opt_variables.py Show resolved Hide resolved
eudemo/eudemo/maintenance/lower_port/duct_designer.py Outdated Show resolved Hide resolved
eudemo/eudemo/maintenance/lower_port/duct_designer.py Outdated Show resolved Hide resolved
Copy link

sonarcloud bot commented Feb 5, 2024

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

7 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@oliverfunk oliverfunk merged commit 364a7b4 into develop Feb 5, 2024
2 checks passed
@oliverfunk oliverfunk deleted the je-cook/lower_port_tests branch February 5, 2024 16:48
OceanNuclear pushed a commit that referenced this pull request Feb 20, 2024
* 🚚 Organise eudemo maintenance tests

* 🧪 Failing test

* 🎨 Rearrange test

* ✅ Alternative 1

* ✅ Alternative 2

* 🏷️ Not required typing

* 🧪 Add duct touching tf coil assert

* 🔥 Remove some tests that should fail

* ✅ Error raising test

* 🎨 Cleanup

* 💡 Remove comments
OceanNuclear pushed a commit that referenced this pull request Jun 17, 2024
* 🚚 Organise eudemo maintenance tests

* 🧪 Failing test

* 🎨 Rearrange test

* ✅ Alternative 1

* ✅ Alternative 2

* 🏷️ Not required typing

* 🧪 Add duct touching tf coil assert

* 🔥 Remove some tests that should fail

* ✅ Error raising test

* 🎨 Cleanup

* 💡 Remove comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EU-DEMO Tasks relating to the EU-DEMO project 📜 Papercut Papercut bug tests Tasks relating to testing issues / improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve tests for lower port
2 participants