upb-lea / FEM_Magnetics_Toolbox

An Open-Source FEM Magnetics Toolbox for Power Electronic Magnetic Components
https://upb-lea.github.io/FEM_Magnetics_Toolbox/
GNU General Public License v3.0
66 stars 11 forks source link

Rename femmt.py due to same pip-package name #11

Closed gituser789 closed 2 years ago

gituser789 commented 2 years ago

Describe the bug Package problems when having a package name 'femmt' which imports .femmt.py Seems to be that the package is builds successfully, but problems occour when generating the documentation. When renaming 'femmt.py' e.g. to 'femmt_classes.py', this works fine.

To Reproduce Steps to reproduce the behavior:

  1. cd sphinx/
  2. make clean
  3. make html
  4. See error
    WARNING: autodoc: failed to import class 'MagneticComponent.VirtualWindingWindow' from module 'femmt'; the following exception was raised:
    attempted relative import with no known parent package

    When opening sphinx/build/html/index.html, the MagneticComponent-Class description is empty.

Expected behavior Build documentation without mentioned warning, and display a documentation for MagneticComponent-class.