Skip to content

Commit 189b20a

Browse files
Merge v2 development branch into master
Merge v2 branch into master 🙌
2 parents ce5f014 + aa93875 commit 189b20a

File tree

196 files changed

+98757
-9561
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

196 files changed

+98757
-9561
lines changed
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ appearance, race, religion, or sexual identity and orientation.
1111

1212
## Our Standards
1313

14-
Examples of behavior that contributes to creating a positive environment
14+
Examples of behaviour that contributes to creating a positive environment
1515
include:
1616

1717
* Using welcoming and inclusive language
@@ -20,9 +20,9 @@ include:
2020
* Focusing on what is best for the community
2121
* Showing empathy towards other community members
2222

23-
Examples of unacceptable behavior by participants include:
23+
Examples of unacceptable behaviour by participants include:
2424

25-
* The use of sexualized language or imagery and unwelcome sexual attention or
25+
* The use of sexualised language or imagery and unwelcome sexual attention or
2626
advances
2727
* Trolling, insulting/derogatory comments, and personal or political attacks
2828
* Public or private harassment
@@ -34,13 +34,13 @@ Examples of unacceptable behavior by participants include:
3434
## Our Responsibilities
3535

3636
Project maintainers are responsible for clarifying the standards of acceptable
37-
behavior and are expected to take appropriate and fair corrective action in
38-
response to any instances of unacceptable behavior.
37+
behaviour and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behaviour.
3939

4040
Project maintainers have the right and responsibility to remove, edit, or
4141
reject comments, commits, code, wiki edits, issues, and other contributions
4242
that are not aligned to this Code of Conduct, or to ban temporarily or
43-
permanently any contributor for other behaviors that they deem inappropriate,
43+
permanently any contributor for other behaviours that they deem inappropriate,
4444
threatening, offensive, or harmful.
4545

4646
## Scope
@@ -54,7 +54,7 @@ further defined and clarified by project maintainers.
5454

5555
## Enforcement
5656

57-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
57+
Instances of abusive, harassing, or otherwise unacceptable behaviour may be
5858
reported by contacting the project team at robbie.vanleeuwen@gmail.com. All
5959
complaints will be reviewed and investigated and will result in a response that
6060
is deemed necessary and appropriate to the circumstances. The project team is

.github/CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
TBC...

.github/workflows/black.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Lint with Black
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- uses: psf/black@stable
16+
with:
17+
options: "--check --verbose"

.github/workflows/build_deploy.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# This workflow will upload a Python Package using Twine when a release is created
2+
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3+
4+
# This workflow uses actions that are not certified by GitHub.
5+
# They are provided by a third-party and are governed by
6+
# separate terms of service, privacy policy, and support
7+
# documentation.
8+
9+
name: Build and Deploy
10+
11+
on:
12+
release:
13+
types: [published]
14+
15+
jobs:
16+
deploy:
17+
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
23+
- name: Set up Python 3.9
24+
uses: actions/setup-python@v2
25+
with:
26+
python-version: '3.9'
27+
28+
- name: Install dependencies
29+
run: |
30+
python -m pip install --upgrade pip
31+
pip install build
32+
33+
- name: Build a binary wheel and a source tarball
34+
run: python -m build --sdist --wheel --outdir dist/
35+
36+
# uncomment to publish to TestPyPI
37+
# - name: Publish distribution to Test PyPI
38+
# uses: pypa/gh-action-pypi-publish@master
39+
# with:
40+
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
41+
# repository_url: https://test.pypi.org/legacy/
42+
43+
# uncomment to publish to PyPI
44+
- name: Publish distribution to PyPI
45+
uses: pypa/gh-action-pypi-publish@master
46+
with:
47+
password: ${{ secrets.PYPI_API_TOKEN }}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Code Coverage
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
tests:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: [ '3.8' ]
15+
16+
name: Code coverage with python ${{ matrix.python-version }}
17+
steps:
18+
- uses: actions/checkout@v2
19+
20+
- name: Setup python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v2
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
25+
- name: Update pip
26+
run: pip install --upgrade pip
27+
28+
- name: Install package
29+
run: python -m pip install -e .
30+
31+
- name: Generate report
32+
run: |
33+
pip install pytest-cov
34+
pytest --cov=./ --cov-report=xml
35+
36+
- name: Upload coverage to Codecov
37+
uses: codecov/codecov-action@v2.1.0

.github/workflows/tests.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Run Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
tests:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
os: [ubuntu-latest, macos-latest, windows-latest]
16+
python-version: ['3.7', '3.8', '3.9']
17+
18+
name: Runs tests with python ${{ matrix.python-version }} using ${{ matrix.os }}
19+
steps:
20+
- uses: actions/checkout@v2
21+
22+
- name: Setup python ${{ matrix.python-version }}
23+
uses: actions/setup-python@v2
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
27+
- name: Update pip
28+
run: pip install --upgrade pip
29+
30+
- name: Install package
31+
run: python -m pip install -e .
32+
33+
- name: Run package tests
34+
run: python -m pytest

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
# doc generated
1313
/docs/build
14+
/docs/source/sphinx_gallery_examples/
1415

1516
# Python egg metadata, regenerated from source files by setuptools.
1617
/*.egg-info

.readthedocs.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Required
2+
version: 2
3+
4+
# Set the version of Python and other tools you might need
5+
build:
6+
os: ubuntu-20.04
7+
tools:
8+
python: "3.8"
9+
10+
# Build documentation in the docs/ directory with Sphinx
11+
sphinx:
12+
configuration: docs/source/conf.py
13+
14+
# Default is HTML
15+
formats:
16+
- pdf
17+
18+
# Optionally declare the Python requirements required to build your docs
19+
python:
20+
install:
21+
- requirements: docs/source/requirements_docs.txt

.travis.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

CHANGELOG.rst

Lines changed: 74 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,75 @@
1-
Change Log:
2-
===========
1+
Changelog:
2+
==========
3+
4+
v2.0.0:
5+
-------
6+
7+
*sectionproperties* v2 incorporates significant changes to the pre-processor, which now uses the
8+
`Shapely <https://github.com/shapely/shapely>`_ package to power advanced geometry creation and
9+
manipulation, and vastly improves the performance and robustness of the plastic section property
10+
algorithm. v2.x.x introduces many breaking changes from v1.x.x when creating and manipulating
11+
``Geometry``, refer to the `documentation <https://sectionproperties.readthedocs.io>`_ for more
12+
information.
13+
14+
Pre-Processor:
15+
^^^^^^^^^^^^^^
16+
17+
A special mention to `@connorferster <https://github.com/connorferster>`_ for a majority of these
18+
fantastic additions!
19+
20+
- ``sections.py`` renamed to ``geometry.py``
21+
- All ``Geometry`` objects are defined by a shapely ``Polygon``
22+
- Addition of new geometry manipulation methods and geometry set operators
23+
- Added .dxf import, thanks to `@aegis1980 <https://github.com/aegis1980>`_
24+
- Added .3dm import, thanks to `@normanrichardson <https://github.com/normanrichardson>`_
25+
- Introduction of a ``CompoundGeometry`` class for geometries with multiple regions
26+
- ``Geometry`` objects are assigned a ``Material`` property object, ``CompoundGeometry`` objects
27+
can contain multiple ``Geometry`` objects (each with their own ``Material`` object)
28+
enabling composite analysis
29+
- ``Geometry`` and ``CompoundGeometry`` objects contain mesh information and meshing must be
30+
performed before initialising a ``Section`` object
31+
- Improved ``.offset_perimeter()`` logic
32+
- Meshing is now performed by `triangle <https://github.com/drufat/triangle>`_, *meshpy* is no
33+
longer a dependency
34+
- ``Material`` class now requires a ``.density`` parameter
35+
- The section library (``sectionproperties.pre.library``) now contains the built-in
36+
*sectionproperties* geometries
37+
- Added ``triangular_section()`` and ``triangular_radius_section()`` to the ``primitive_sections``
38+
library
39+
- Added ``concrete_sections`` library - contains ``concrete_rectangular_section()``,
40+
``concrete_tee_section()`` and ``concrete_circular_section()``
41+
- Added ``bridge_section`` library, thanks to `@ccaprani <https://github.com/ccaprani>`_ - contains
42+
``super_t_girder_section()`` and ``i_girder_section()``
43+
44+
Analysis:
45+
^^^^^^^^^
46+
47+
- ``cross_section.py`` renamed to ``section.py``
48+
- ``CrossSection`` object renamed to ``Section`` and is now initialised with only a ``Geometry`` or
49+
``CompoundGeometry`` object
50+
- Added calculation of cross-section mass
51+
- Added calculation of weighted material properties - E_eff, G_eff, nu_eff
52+
- The plastic algorithm is now performed by shapely, improving performance and robustness
53+
- Added calculation of principal stresses, thanks to `@ccaprani <https://github.com/ccaprani>`_
54+
- Shape factors are no longer calculated for composite sections (irrelevant property)
55+
56+
Post-Processor:
57+
^^^^^^^^^^^^^^
58+
59+
- Improved contour plotting behaviour
60+
- Added plotting of Mohr's circle of stresses for any given point, thanks to
61+
`@ccaprani <https://github.com/ccaprani>`_
62+
- ``.display_results()`` now reports E.J and E.Iw instead of G.J and G.Iw
63+
- ``.display_results()`` now reports modulus weighted shear areas for composite sections
64+
65+
Misc.:
66+
^^^^^^
67+
68+
- Many spelling and code style fixes, thanks to `@Spectre5 <https://github.com/Spectre5>`_
69+
- Updated documentation to include theoretical background
70+
- Updated examples to be performed by sphinx-gallery, thanks to
71+
`@normanrichardson <https://github.com/normanrichardson>`_ and
72+
`@Spectre5 <https://github.com/Spectre5>`_
373

474
v1.0.8:
575
-------
@@ -33,7 +103,7 @@ v1.0.5:
33103
-------
34104

35105
- Added calculation of monosymmetric constants
36-
- Added tapered flange I-section and channel sections
106+
- Added tapered flange I Section and channel sections
37107
- Added solid elliptical and hollow elliptical sections (BenjaminFraser)
38108
- Added polygonal section (Agent6-6-6)
39109
- Handle zero radius for all section classes; handle r_out < t for relevant sections
@@ -42,7 +112,7 @@ v1.0.5:
42112
v1.0.4:
43113
-------
44114

45-
- Added a monosymmetric I-section class
115+
- Added a monosymmetric I Section class
46116
- Extend the plastic centroid search range to the entire section
47117
- Remove the pc_region variable from the plastic centroid calculation as it is no longer relevant
48118
- Better verbose output for the plastic centroid calculation

0 commit comments

Comments
 (0)