Skip to content

Version Attribute #43

@Czarified

Description

@Czarified

Is your feature request related to a problem? Please describe.
Am I missing something, or is there no version attribute/variable that one can easily call for this library?

Describe the solution you'd like

import sectionproperties as sp
print(f'SectionProperties Version: {sp.__version__}')

The above code will result, if a __version__ = '1.0.8' line is added to the overall init.py file (sectionproperties > init.py)

Additionally, your setup.py file and docs can reference this value, instead of manually updating them all for each release.

Describe alternatives you've considered
Some other python libraries use a version module. Not sure what the real purpose is of these, but I think a simple __version__ attribute for the library will suffice for basic checks.

Additional context
The reason for this consideration is to provide a user with a way to document what version of the library was used when performing an analysis. For engineering analysis, I typically like to log all library versions at the top, just so I can be sure I know how to repeat my results. As we start looking at overhauls to pre-, post-, testing suites, and meshing algorithms, this could be even more useful, and the change seems minor to me with no drawbacks.

Your thoughts, robbie? It's a simple change, but I could put in a PR for you to review? I'm trying to learn all the shapely and testing stuff along with the great work connor's doing, and I just noticed this while setting up. :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions