robbievanleeuwen / section-properties

Analysis of an arbitrary cross-section in python using the finite element method.
https://sectionproperties.rtfd.io
MIT License
423 stars 92 forks source link

invalid imports in the documentation #361

Closed BALOGHBence closed 11 months ago

BALOGHBence commented 11 months ago

The examples in the documentation ofter point to invalid references. For instance, the following imports

from sectionproperties.pre import Material
from sectionproperties.pre.library import i_section
from sectionproperties.analysis import Section

should be

from sectionproperties.pre.pre import Material
from sectionproperties.pre.library.steel_sections import i_section
from sectionproperties.analysis.section import Section

These could be avoided by either populating the init.py files or correcting the examples in the docs.

At the 'Results' section of the User Guide, the reference to the function plot_stress is invalid.

image

github-actions[bot] commented 11 months ago

Thanks for opening your first issue in sectionproperties :raised_hands: Pull requests are always welcome :wink:

robbievanleeuwen commented 11 months ago

Hi @BALOGHBence, are you getting any import errors? The __init__.py files already contain these references so they should work. This was introduced recently in v3.0.0 to improve readability (see features).

I cannot find the invalid reference to plot stress, could you clarify this?

BALOGHBence commented 10 months ago

Hi. I think the problem here is that I used the package under Python 3.8. I can see now that version 3.0.0 is only from Python 3.9.