Skip to content

Latest commit

 

History

History
67 lines (48 loc) · 3.15 KB

developer_guide.md

File metadata and controls

67 lines (48 loc) · 3.15 KB

Developer Guide

This is a guide for developing in the plugin. It explains the most important concepts and ideas that are used.

Minimum supported version

Reasons to drop support for versions < 9

  • Mock unittesting is not available
  • return value is not correct in older version, makes use of wrapper necessary
  • PointerVectorSet not working with py-2 (infinite recursion)
  • filtering on subgeom seems not to work
  • well, python2 ...
  • some other methods inside of salome are not working (e.g. GetSalomeObject from identifier, or some classes only have type "instance")
  • study management much easier, since now there is only one study and I don't have to maintain two different versions

Interaction with Salome Meshes

Mesh identifier of Salome is used. This is supposed to be unique. Note that the mesh names can be duplicated!

Using Salome functionalities

Useful: PrintObjectInfo

Debugging

  • Increase the logger level
  • Check the logs

Testing

The plugin is heavily tested to ensure not only the functionalities but also to check if the things are still working with newer versions of Salome.

Testing without Salome

Many tests are set up to work indepedently of Salome.

Testing with Salome

The CI tests with and without Salome. It runs the tests with every supported version of Salome.

Documentation in the code

The documentation of functions & modules follows PEP 257 -- Docstring Conventions.

Github Actions:

  • Version 8.3 and 8.4 do NOT return failure (i.e. sys.exit(1)) even if they fail in TUI-mode! => hence have to be checked manually!

Github Actions: triggering workflows externally http://www.btellez.com/posts/triggering-github-actions-with-webhooks.html https://stackoverflow.com/questions/57903836/how-to-fail-a-job-in-github-actions

This file contains a collection of links that are useful for the development

Salome

Testing Mock objects are not used because it is not included in Salome => Mock is only part of unittest since python3.3 "terminate called after throwing an instance of 'CORBA::OBJECT_NOT_EXIST'" called after tests in Version 9, related to study clearing but nothing to worry about

Plugin works directly with meshes. This makes the usage easier, esp since Salome is currently updating from the GEOM module to the Shaper module

PythonDump seems to be not automatically supported for the moment...

Testing PyQt