Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3.0 #277

Merged
merged 192 commits into from
Oct 3, 2023
Merged

v3.0 #277

merged 192 commits into from
Oct 3, 2023

Conversation

robbievanleeuwen
Copy link
Owner

@robbievanleeuwen robbievanleeuwen commented Jun 10, 2023

sectionproperties v3.0

💥 Breaking Changes

  • Update section property get() methods behaviour as per Unexpected behavior calculating 2nd Moments of Area (.get_ic) with Material #272. The behaviour is unchanged for analyses without material properties, however composite analyses now require material specific get methods to be used.
    • e.g. for a composite analysis, get_ic() will raise an error telling the user to instead use get_eic().
  • Stress plotting methods have been simplified to improve maintainability and code repetition.
    • Stress plots are now generated by calling the StressPost.plot_stress() method, with a string determining the type of stress to plot. The previous implementation had a separate method for each different type of stress plot which was very repetitive.
    • There is a similar implementation for generate vector stress plots.
  • get_stress_at_point() method removed, user can use more versatile get_stress_at_points() method instead.
  • Pythonic renaming of methods and variables, e.g. get_As() becomes get_as() for retrieving shear areas, moments and shears change from Mxx and Vx to mxx and vx.
  • Concrete section library:
    • Added option for variable covers to top, bottom and side reinforcement.
    • Renamed argument names to be more pythonic.
    • Reinforcement now requires an area and diameter (area used to determine discretised circle geometry, diameter used to calculate cover and location).

🚀 Features

  • Packaging and dependency management with poetry.
  • Improve length/readability of imports by placing key classes in __init__.py files.
    • e.g. from sectionproperties.pre.library.primitive_sections import rectangular_section becomes from sectionproperties.pre.library import rectangular_section and from sectionproperties.analysis.section import Section becomes from sectionproperties.analysis import Section (note not a breaking feature as previous imports still work).
  • Better mesh size control in triangle #259
  • Pass through DXF import options for better geometry creation #274

🐛 Fixes

🚨 Testing

  • Use nox & nox-poetry for testing.
  • Move test_plastic_centroid() to test_plastic.py.
  • Further TBC.

👷 Continuous Integration

  • Added dependabot.
  • Added labeller and release drafter automation.
  • Added pre-commit checks.
  • Updated all workflows.

📚 Documentation

  • Changed documentation theme to furo.
  • General overhaul of the documentation.
  • Auto-generate API documentation using sphinx autodoc.
  • Auto-generate images in documentation using matplotlib plot directive.
  • Change examples from sphinx gallery to notebook style with nbsphinx.
  • Add intersphinx mappings.

💄 Style

  • Fully implement typing.
  • Added flake8 linter to pre-commit.
  • Added darglint docstring linter to pre-commit.
  • Added isort to pre-commit.
  • Added pyupgrade to pre-commit.
  • General refactor to improve readability and maintainability, e.g. reduce amount of code in section.py: PlasticSection -> plastic_section.py, StressPost and StressResult -> stress_post.py, SectionProperties -> post.py.
  • Generally changed type of a point from list[float] to a tuple[float, float].

Other

  • Restructured package by adding src folder.

TLCFEM and others added 22 commits September 30, 2023 15:02
Add cache, improve performance
When the geometries resulting from an operation result in a MultiPolygon that only touch at points, a hole is not recognized in shapely but it is "recognized" by humans. To fix this problem, the hole needs to be recognized by shapely as part of a Polygon. One solution to fix this would be to buffer the geometry by a very small amount to force this switch from MultiPolygon to Polygon.
Add python 3.11 support, drop python 3.8
@robbievanleeuwen robbievanleeuwen marked this pull request as ready for review October 2, 2023 12:46
@robbievanleeuwen robbievanleeuwen merged commit 02b50d0 into master Oct 3, 2023
25 checks passed
@robbievanleeuwen robbievanleeuwen deleted the hypermodern branch October 3, 2023 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

section.calculate_warping_properties(solver_type='cgs') fails due to NameError
6 participants