Skip to content

Commit 00f509a

Browse files
committed
Merge branch 'develop' into gust_vanes
2 parents 7de5b52 + ffe3de5 commit 00f509a

File tree

186 files changed

+22057
-15508
lines changed

Some content is hidden

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

186 files changed

+22057
-15508
lines changed

.github/workflows/pypi_build.yaml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: Create and publish pypi image
2+
3+
on:
4+
# only runs when there are pushes to develop and main for publishing
5+
# and for testing, pull requests to develop and main
6+
# and if there are changes to the build process and github action
7+
push:
8+
branches:
9+
- develop
10+
- main
11+
paths:
12+
- 'setup.py'
13+
- '.github/workflows/pypi*'
14+
pull_request:
15+
branches:
16+
- main
17+
- develop
18+
- 'rc*'
19+
20+
jobs:
21+
create-pypi-image:
22+
name: >-
23+
Create .whl 🛞 from SHARPy distribution
24+
runs-on: ubuntu-20.04
25+
env:
26+
python-version-chosen: "3.10.8"
27+
permissions:
28+
contents: read
29+
packages: write
30+
31+
steps:
32+
- uses: actions/checkout@v2
33+
- name: Set up Python ${{ env.python-version-chosen }}
34+
uses: actions/setup-python@v2
35+
with:
36+
python-version: ${{ env.python-version-chosen }}
37+
- name: Set up GCC
38+
uses: egor-tensin/setup-gcc@v1
39+
with:
40+
version: 7
41+
platform: x64
42+
- name: Pre-Install dependencies
43+
run: |
44+
export QT_QPA_PLATFORM='offscreen'
45+
sudo apt install libeigen3-dev
46+
git submodule init
47+
git submodule update
48+
- name: Install pypa/build
49+
run: >-
50+
python3 -m
51+
pip install
52+
build
53+
--user
54+
- name: Install wheel
55+
run: python3 -m pip install wheel --user
56+
- name: Build a source tarball
57+
run: python setup.py sdist
58+
- name: Build a binary wheel
59+
run: python3 setup.py bdist_wheel
60+
- name: Find the wheel created during pip install
61+
run:
62+
python3 -m pip cache dir
63+
- name: Store the distribution packages
64+
uses: actions/upload-artifact@v4
65+
with:
66+
name: python-package-distributions
67+
path: dist/
68+
69+
publish-to-pypi:
70+
name: >-
71+
Publish Python 🐍 distribution 📦 to PyPI
72+
if: startsWith(github.ref, 'refs/tags/v') # only publish to PyPI on tag pushes
73+
needs:
74+
- create-pypi-image
75+
runs-on: ubuntu-latest
76+
environment:
77+
name: pypi
78+
url: https://pypi.org/p/ic_sharpy # Replace <package-name> with your PyPI project name
79+
permissions:
80+
id-token: write # IMPORTANT: mandatory for trusted publishing
81+
steps:
82+
- name: Download all the dists
83+
uses: actions/download-artifact@v4
84+
with:
85+
name: python-package-distributions
86+
path: dist/
87+
- name: Publish distribution 📦 to PyPI
88+
uses: pypa/gh-action-pypi-publish@release/v1
89+
# with:
90+
# path: dist/*

.github/workflows/readme.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SHARPy GitHub Workflows
22

3-
There are 4 automated workflows for SHARPy's CI/CD.
3+
There are 4(+1 experimental) automated workflows for SHARPy's CI/CD.
44

55
## SHARPy Tests
66

@@ -19,5 +19,12 @@ Python code, hence allowing the merge.
1919
Two nearly identical workflows, the only difference is that one pushes the Docker
2020
image to the SHARPy packages. Therefore:
2121

22-
* `docker_build.yaml`: Builds the Docker image but does not push. Runs on changes to the `docker*` workflows, changes to the `utils/` directory (environments) and changes to the `Dockerfile`. Required test for PRs to merge to `develop` and `main`.
22+
* `docker_build_test.yaml`: Builds the Docker image but does not push. Runs on changes to the `docker*` workflows, changes to the `utils/` directory (environments) and changes to the `Dockerfile`. Required test for PRs to merge to `develop` and `main`.
2323
* `docker_build.yaml`: Builds and pushes the Docker image. Runs on pushes to `develop`, `main` and annotated tags.
24+
25+
## Pypi (experimental!)
26+
27+
One workflow with two jobs, the first creates and the second pushes the wheel
28+
artifact to ic-sharpy @ pypi. Therefore:
29+
30+
* `pypi_build.yaml`: Builds and pushes the pypi wheel according to conditions. Runs on changes to the `pypi*` workflow, changes to the `setup.py`, and PRs and pushes to main and develop. Required test for PRs to merge to `develop` and `main`. Publishes on annotated tags.

.github/workflows/sharpy_tests.yaml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,20 @@ jobs:
2121
python-version: [3.7]
2222

2323
steps:
24-
- uses: actions/checkout@v2
24+
- uses: actions/checkout@v4
25+
with:
26+
submodules: "recursive"
27+
fetch-tags: true
2528
- name: Set up Python ${{ matrix.python-version }}
26-
uses: actions/setup-python@v2
29+
uses: actions/setup-python@v5
2730
with:
2831
python-version: ${{ matrix.python-version }}
2932
- name: Set up GCC
3033
uses: egor-tensin/setup-gcc@v1
3134
with:
3235
version: 10
3336
platform: x64
37+
<<<<<<< HEAD
3438
- name: Setup conda
3539
uses: s-weigand/setup-conda@v1
3640
with:
@@ -57,8 +61,19 @@ jobs:
5761
git fetch -t
5862
mkdir build && cd build
5963
cmake .. && make install -j 4 && cd ..
64+
=======
65+
- name: Check that gfortran works
66+
run: gfortran --version
67+
- name: Install build package dependencies
68+
run: sudo apt install libblas-dev liblapack-dev libeigen3-dev
69+
- name: Install sharpy and coverage using pip
70+
run: |
71+
export QT_QPA_PLATFORM='offscreen'
72+
>>>>>>> develop
6073
pip install .
6174
pip install coverage
75+
- name: Run coverage
76+
run: |
6277
coverage run -m unittest discover
6378
- name: Upload Coverage to Codecov
6479
uses: codecov/codecov-action@v2

.readthedocs.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# .readthedocs.yaml
2+
# Read the Docs configuration file
3+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4+
5+
# Required
6+
version: 2
7+
8+
# Set the version of Python and other tools you might need
9+
build:
10+
os: ubuntu-22.04
11+
tools:
12+
python: "3.10"
13+
14+
python:
15+
install:
16+
- requirements: docs/requirements_rtd
17+
18+
# Build documentation in the docs/ directory with Sphinx
19+
sphinx:
20+
configuration: docs/source/conf.py
21+
22+
# We recommend specifying your dependencies to enable reproducible builds:
23+
# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
24+
# python:
25+
# install:
26+
# - requirements: docs/requirements.txt

.version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"schemaVersion": 1,
33
"label": "release version",
4-
"message": "2.1",
4+
"message": "2.4",
55
"color": "green"
66
}

CHANGELOG.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,79 @@
11
# Changelog
22

3+
## [2.3](https://github.com/imperialcollegelondon/sharpy/tree/2.3) (2024-05-10)
4+
5+
[Full Changelog](https://github.com/imperialcollegelondon/sharpy/compare/2.2...2.3)
6+
7+
**Implemented enhancements:**
8+
9+
- Version 2.3 update [\#289](https://github.com/ImperialCollegeLondon/sharpy/pull/289) ([ben-l-p](https://github.com/ben-l-p))
10+
- Update develop branch with main [\#284](https://github.com/ImperialCollegeLondon/sharpy/pull/284) ([ben-l-p](https://github.com/ben-l-p))
11+
- Added pip install \(with docs\) [\#280](https://github.com/ImperialCollegeLondon/sharpy/pull/280) ([ben-l-p](https://github.com/ben-l-p))
12+
- Update beamplot.py to have stride option, consistent with aerogridplot.py [\#279](https://github.com/ImperialCollegeLondon/sharpy/pull/279) ([kccwing](https://github.com/kccwing))
13+
14+
**Fixed bugs:**
15+
16+
- Fix Github Runner Docker build failing [\#285](https://github.com/ImperialCollegeLondon/sharpy/pull/285) ([ben-l-p](https://github.com/ben-l-p))
17+
- Add scipy version info to env yml [\#277](https://github.com/ImperialCollegeLondon/sharpy/pull/277) ([SJ-Innovation](https://github.com/SJ-Innovation))
18+
19+
**Closed issues:**
20+
21+
- Scipy 1.12.0 Incompatible [\#276](https://github.com/ImperialCollegeLondon/sharpy/issues/276)
22+
- BeamLoader postprocessor squishing answers [\#270](https://github.com/ImperialCollegeLondon/sharpy/issues/270)
23+
- Solving Environment gets killed. [\#268](https://github.com/ImperialCollegeLondon/sharpy/issues/268)
24+
- Error when running sharpy unittest: module scipy.sparse.\_sputils not found [\#227](https://github.com/ImperialCollegeLondon/sharpy/issues/227)
25+
- Potential bug in /sharpy/structure/utils/modalutils.py [\#208](https://github.com/ImperialCollegeLondon/sharpy/issues/208)
26+
27+
**Merged pull requests:**
28+
29+
- Added ability to turn aligned grid off [\#288](https://github.com/ImperialCollegeLondon/sharpy/pull/288) ([ben-l-p](https://github.com/ben-l-p))
30+
- Update with main for mamba fixes [\#286](https://github.com/ImperialCollegeLondon/sharpy/pull/286) ([ben-l-p](https://github.com/ben-l-p))
31+
- Correct typos caught by Divya Sanghi [\#283](https://github.com/ImperialCollegeLondon/sharpy/pull/283) ([bbahiam](https://github.com/bbahiam))
32+
- Develop: Update environment.yml to fix scipy version issue [\#282](https://github.com/ImperialCollegeLondon/sharpy/pull/282) ([kccwing](https://github.com/kccwing))
33+
- Update noaero.py for consistency in function input [\#275](https://github.com/ImperialCollegeLondon/sharpy/pull/275) ([kccwing](https://github.com/kccwing))
34+
- A few minor bug fixes [\#273](https://github.com/ImperialCollegeLondon/sharpy/pull/273) ([sduess](https://github.com/sduess))
35+
- Update XBeam version to include compiler optimisation [\#272](https://github.com/ImperialCollegeLondon/sharpy/pull/272) ([ben-l-p](https://github.com/ben-l-p))
36+
- Update XBeam version to include compiler optimisation [\#271](https://github.com/ImperialCollegeLondon/sharpy/pull/271) ([ben-l-p](https://github.com/ben-l-p))
37+
- Improve docs and code of newmark\_ss [\#267](https://github.com/ImperialCollegeLondon/sharpy/pull/267) ([bbahiam](https://github.com/bbahiam))
38+
- Changed Github runner from Conda to Mamba [\#266](https://github.com/ImperialCollegeLondon/sharpy/pull/266) ([ben-l-p](https://github.com/ben-l-p))
39+
- Changed Github runner from Conda to Mamba [\#265](https://github.com/ImperialCollegeLondon/sharpy/pull/265) ([ben-l-p](https://github.com/ben-l-p))
40+
- Hotfix for documentation search [\#264](https://github.com/ImperialCollegeLondon/sharpy/pull/264) ([kccwing](https://github.com/kccwing))
41+
- Hotfix for documentation - develop [\#263](https://github.com/ImperialCollegeLondon/sharpy/pull/263) ([kccwing](https://github.com/kccwing))
42+
- Hotfix for documentation - main [\#262](https://github.com/ImperialCollegeLondon/sharpy/pull/262) ([kccwing](https://github.com/kccwing))
43+
- Merging v2.2 into develop [\#261](https://github.com/ImperialCollegeLondon/sharpy/pull/261) ([kccwing](https://github.com/kccwing))
44+
45+
46+
## [2.2](https://github.com/imperialcollegelondon/sharpy/tree/2.2) (2023-10-18)
47+
48+
[Full Changelog](https://github.com/imperialcollegelondon/sharpy/compare/2.1...2.2)
49+
50+
**Implemented enhancements:**
51+
52+
- Added environment for Apple Silicon \(ARM64\) [\#254](https://github.com/ImperialCollegeLondon/sharpy/pull/254) ([ben-l-p](https://github.com/ben-l-p))
53+
- New Fuselage Model plus Minor Improvements [\#249](https://github.com/ImperialCollegeLondon/sharpy/pull/249) ([sduess](https://github.com/sduess))
54+
55+
**Fixed bugs:**
56+
57+
- fix polars concatenation in assembly of aeroinformation - develop [\#253](https://github.com/ImperialCollegeLondon/sharpy/pull/253) ([kccwing](https://github.com/kccwing))
58+
- fix polars concatenation in assembly of aeroinformation - main [\#252](https://github.com/ImperialCollegeLondon/sharpy/pull/252) ([kccwing](https://github.com/kccwing))
59+
- Minor bug fixes in aero util functions and save data postprocessor [\#247](https://github.com/ImperialCollegeLondon/sharpy/pull/247) ([sduess](https://github.com/sduess))
60+
61+
**Closed issues:**
62+
63+
- Automated tests failed : UnicodeEncodeError: 'ascii' codec can't encode character '\xe9' in position 47: ordinal not in range\(128\) [\#245](https://github.com/ImperialCollegeLondon/sharpy/issues/245)
64+
- Wrong key in settings for /cases/templates/flying\_wings.py [\#205](https://github.com/ImperialCollegeLondon/sharpy/issues/205)
65+
66+
**Merged pull requests:**
67+
68+
- merging develop into main for v2.2 [\#259](https://github.com/ImperialCollegeLondon/sharpy/pull/259) ([kccwing](https://github.com/kccwing))
69+
- fix \[docker\] use correct environment name in docker bashrc [\#257](https://github.com/ImperialCollegeLondon/sharpy/pull/257) ([sduess](https://github.com/sduess))
70+
- Update docker environment [\#255](https://github.com/ImperialCollegeLondon/sharpy/pull/255) ([sduess](https://github.com/sduess))
71+
- Update README.md [\#246](https://github.com/ImperialCollegeLondon/sharpy/pull/246) ([rafapalacios](https://github.com/rafapalacios))
72+
- bringing commits to main into develop [\#244](https://github.com/ImperialCollegeLondon/sharpy/pull/244) ([rafapalacios](https://github.com/rafapalacios))
73+
- Updates to plotutils.py and the cantilever\_wing demo [\#242](https://github.com/ImperialCollegeLondon/sharpy/pull/242) ([boltyboi](https://github.com/boltyboi))
74+
- Small additions to the installation guide. [\#241](https://github.com/ImperialCollegeLondon/sharpy/pull/241) ([boltyboi](https://github.com/boltyboi))
75+
- Tutorial for closed-Loop Simulation with SHARPy as a hardware-in-the-loop system [\#240](https://github.com/ImperialCollegeLondon/sharpy/pull/240) ([sduess](https://github.com/sduess))
76+
377
## [2.1](https://github.com/imperialcollegelondon/sharpy/tree/2.1) (2023-05-31)
478

579
[Full Changelog](https://github.com/imperialcollegelondon/sharpy/compare/2.0...2.1)

Dockerfile

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM centos:8
33
ENV PYTHONDONTWRITEBYTECODE=true
44
ENV BASH_ENV ~/.bashrc
55
SHELL ["/bin/bash", "-c"]
6-
ENV PATH=${PATH}:/miniconda3/bin
6+
ENV PATH=${PATH}:/mamba/bin
77

88
# CENTOS 8 has reached end of life - Not yet an updated Docker base for CentOS stream
99
# Point to the CentOS 8 vault in order to download dependencies
@@ -14,40 +14,38 @@ RUN cd /etc/yum.repos.d/ && \
1414

1515
# Development tools including compilers
1616
RUN yum groupinstall "Development Tools" -y --nogpgcheck && \
17-
yum install -y --nogpgcheck mesa-libGL libXt libXt-devel wget gcc-gfortran lapack vim tmux && \
17+
yum install dnf-plugins-core && \
18+
yum config-manager --set-enabled powertools && \
19+
yum install -y --nogpgcheck mesa-libGL libXt libXt-devel wget gcc-gfortran lapack vim tmux eigen3-devel && \
1820
yum clean all
1921

20-
# Install miniconda
21-
RUN wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /miniconda.sh && \
22-
chmod +x /miniconda.sh && \
23-
/miniconda.sh -b -p /miniconda3/ && \
24-
rm /miniconda.sh && hash -r
22+
# Install Mamba - swapped from Conda to Mamba due to Github runner memory constraint
23+
# Mambaforge is deprecated in latest miniforge https://github.com/conda-forge/miniforge/pull/704
24+
RUN wget --no-check-certificate https://github.com/conda-forge/miniforge/releases/download/24.7.1-0/Mambaforge-Linux-x86_64.sh -O /mamba.sh && \
25+
chmod +x /mamba.sh && \
26+
/mamba.sh -b -p /mamba/ && \
27+
rm /mamba.sh && hash -r
2528

2629
ADD / /sharpy_dir/
2730

28-
# Update conda and make it run with no user interaction
29-
# Cleanup conda installation
30-
RUN conda init bash && \
31-
conda config --set always_yes yes --set changeps1 no && \
32-
conda update -q conda && \
33-
conda config --set auto_activate_base false && \
34-
conda env create -f /sharpy_dir/utils/environment_minimal.yml && conda clean -afy && \
35-
find /miniconda3/ -follow -type f -name '*.a' -delete && \
36-
find /miniconda3/ -follow -type f -name '*.pyc' -delete && \
37-
find /miniconda3/ -follow -type f -name '*.js.map' -delete
38-
39-
#COPY /utils/docker/* /root/
31+
# Initialise mamba installation
32+
RUN mamba init bash && \
33+
mamba update -q conda && \
34+
mamba env create -f /sharpy_dir/utils/environment.yml && \
35+
find /mamba/ -follow -type f -name '*.a' -delete && \
36+
find /mamba/ -follow -type f -name '*.pyc' -delete && \
37+
find /mamba/ -follow -type f -name '*.js.map' -delete
38+
4039
RUN ln -s /sharpy_dir/utils/docker/* /root/
4140

4241
RUN cd sharpy_dir && \
43-
conda activate sharpy_minimal && \
42+
mamba activate sharpy && \
4443
git submodule update --init --recursive && \
4544
mkdir build && \
4645
cd build && \
47-
CXX=g++ FC=gfortran cmake .. && make install -j 2 && \
46+
CXX=g++ FC=gfortran cmake .. && make install -j 4 && \
4847
cd .. && \
4948
pip install . && \
5049
rm -rf build
5150

5251
ENTRYPOINT ["/bin/bash", "--init-file", "/root/bashrc"]
53-

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3531965.svg)](https://doi.org/10.5281/zenodo.3531965)
1010

1111
SHARPy is a nonlinear aeroelastic analysis package originally developed at the Department of Aeronautics, Imperial
12-
College London. It can be used for the structural, aerodynamic and aeroelastic analysis of flexible wings, aircraft and wind turbines.
12+
College London. It can be used for the structural, aerodynamic and aeroelastic analysis of flexible wings, aircraft and wind turbines. It is shared here under a BSD 3-Clause permissive license.
1313

1414
![XHALE](./docs/source/_static/XHALE-render.jpg)
1515

@@ -33,6 +33,8 @@ vortex ring lattice with the boundary conditions enforced at the collocation poi
3333
The Kutta condition is also enforced at the trailing edge. The wake can be simulated by either additional vortex rings
3434
or by infinitely long horseshoe vortices, which are ideally suited for steady simulations only.
3535

36+
The aerodynamic model has recently been extended by a linear source panel method (SPM) to model nonlifting bodies for example fuselages. The SPM and UVLM can be coupled to model fuselage-wing configuration and a junction handling approach, based on phantom panels and circulation interpolation, has been added.
37+
3638
The input problems can be structural, aerodynamic or coupled, yielding an aeroelastic system.
3739

3840
## [Capabilities](http://ic-sharpy.readthedocs.io/en/latest/content/capabilities.html)
@@ -42,7 +44,7 @@ wings and wind turbines. In addition, it supports linearisation of these nonline
4244
arbitrary conditions and includes various tools such as: model reduction or frequency analysis.
4345

4446
In short, SHARPy offers (amongst others) the following solutions to the user:
45-
* Static aerodynamic, structural and aeroelastic solutions
47+
* Static aerodynamic, structural and aeroelastic solutions including fuselage effects
4648
* Finding trim conditions for aeroelastic configurations
4749
* Nonlinear, dynamic time domain simulations under a large number of conditions such as:
4850
+ Prescribed trajectories.

docs/requirements_rtd

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
sphinx>=3.0
1+
sphinx>=3.0,<7
22
ipykernel
33
nbsphinx
4-
sphinx-rtd-theme==0.5.0
4+
sphinx-rtd-theme>=1.2.2
5+
recommonmark

0 commit comments

Comments
 (0)