Skip to content

Investigate and fix warnings that are thrown during testing #562

@davidrudlstorfer

Description

@davidrudlstorfer

During testing a few warnings are thrown which

  1. do come from 3rd party packages
  2. could be deactivated because we purposefully get them during testing

Therefore, the warnings should be checked and "removed"

During our regular test suite the following warnings are there:

=============================== warnings summary ===============================
<frozen importlib._bootstrap>:241
  <frozen importlib._bootstrap>:241: DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute

<frozen importlib._bootstrap>:241
  <frozen importlib._bootstrap>:241: DeprecationWarning: builtin type SwigPyObject has no __module__ attribute

<frozen importlib._bootstrap>:241
  <frozen importlib._bootstrap>:241: DeprecationWarning: builtin type swigvarlink has no __module__ attribute

tests/integration/test_integration_core_mesh.py::test_integration_core_mesh_transformations_with_solid[True-0.2-False-context2]
  /home/runner/work/beamme/beamme/src/beamme/core/mesh.py:538: UserWarning: There are elements which are not parallel to the y-z or x-y plane. This will lead to distorted elements!
    _warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

On windows also this warning is thrown:

[7](https://github.com/beamme-py/beamme/actions/runs/21199690791/job/60982692361#step:5:99)
tests/other/test_other_examples.py::test_other_examples_notebooks[examples/example_1_finite_rotations.ipynb]
  C:\hostedtoolcache\windows\Python\3.13.11\x64\Lib\site-packages\zmq\_future.py:718: RuntimeWarning: Proactor event loop does not implement add_reader family of methods required for zmq. Registering an additional selector thread for add_reader support via tornado. Use `asyncio.set_event_loop_policy(WindowsSelectorEventLoopPolicy())` to avoid this warning.
    self._get_loop()

During our full test suite (with cubit) we get this additional warning:

tests/other/test_other_logo.py::test_other_logo
  /__w/beamme/beamme/src/beamme/mesh_creation_functions/beam_parametric_curve.py:156: IntegrationWarning: The maximum number of subdivisions (50) has been achieved.
    If increasing the limit yields no improvement it is advised to analyze 
    the integrand in order to determine the difficulties.  If the position of a 
    local difficulty can be determined (singularity, discontinuity) one will 
    probably gain from splitting up the interval and calling the integrator 
    on the subranges.  Perhaps a special-purpose integrator should be used.
    return _integrate.quad(ds, st, t)[0] + sS

And during our performance tests we get these warnings at runtime

WARNING: >>>>Poor Quality Shape Face Generated!<<<< on Surface 3
    (For example, the Shape metric for Face 10856 is 0.19802 .)
    The threshold for a Face is 0.2

WARNING: >>>>Poor Quality Shape Face Generated!<<<< on Surface 5
    (For example, the Shape metric for Face 12356 is 0.19802 .)
    The threshold for a Face is 0.2

and these additional warnings:

[4](https://github.com/beamme-py/beamme/actions/runs/21199478783/job/60982445846#step:7:56)
tests/performance/test_performance_beamme.py::test_performance_beamme_mespy_wrap_around_cylinder
  /github/home/miniconda3/envs/beamme/lib/python3.13/site-packages/beamme/core/mesh.py:538: UserWarning: There are elements which are not parallel to the y-z or x-y plane. This will lead to distorted elements!
    _warnings.warn(

tests/performance/test_performance_beamme.py::test_performance_beamme_wrap_around_cylinder_without_check
  /github/home/miniconda3/envs/beamme/lib/python3.13/site-packages/beamme/core/mesh.py:544: UserWarning: The nodes are not on the same y-z plane. This may lead to distorted elements!
    _warnings.warn(

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions