Skip to content

Commit

Permalink
Merge pull request #236 from ImperialCollegeLondon/develop
Browse files Browse the repository at this point in the history
Merge to main for version 2.0.1 release
  • Loading branch information
kccwing committed May 31, 2023
2 parents a2095ed + c34fcae commit 0ab9869
Show file tree
Hide file tree
Showing 135 changed files with 7,634 additions and 6,491 deletions.
2 changes: 1 addition & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ignore:
- "*/tests/*
- '*/tests/*'
45 changes: 45 additions & 0 deletions .github/workflows/docker_build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Create and publish Docker image

on:
push:
branches:
- develop
- master
tags:
- 'v*'

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@v3.2.0
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
49 changes: 49 additions & 0 deletions .github/workflows/docker_build_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Test Docker image build

on:
pull_request:
branches:
- master
- develop
- 'rc*'
push:
paths:
- 'utils/*'
- 'Dockerfile'
- '.github/workflows/docker*'

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
test_image_build:
runs-on: ubuntu-latest
name: Test Docker image build
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build Docker image
uses: docker/build-push-action@v3.2.0
with:
context: .
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
23 changes: 23 additions & 0 deletions .github/workflows/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# SHARPy GitHub Workflows

There are 4 automated workflows for SHARPy's CI/CD.

## SHARPy Tests

The related to the SHARPy tests that run the `SHARPy Tests` job are:

* `sharpy_tests.yaml`: when Python or the submodules files are edited
* `sharpy_no_test_needed.yaml`: otherwise

This avoids running the full set of tests for changes in the documentation etc.
Since the merge to `develop` and `master` is protected by the tests passing, the
second workflow ensures a positive result for those PRs that did not change the
Python code, hence allowing the merge.

## Docker

Two nearly identical workflows, the only difference is that one pushes the Docker
image to the SHARPy packages. Therefore:

* `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 `master`.
* `docker_build.yaml`: Builds and pushes the Docker image. Runs on pushes to `develop`, `master` and annotated tags.
2 changes: 1 addition & 1 deletion .github/workflows/sharpy_no_test_needed.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Python package
name: SHARPy Tests

on:
pull_request:
Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/sharpy_tests.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Python package
name: SHARPy Tests

on:
push:
paths:
- '*.py'
- 'lib/*'
- '.github/workflows/*'
- '.github/workflows/sharpy*'
pull_request:
branches:
- master
Expand All @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7]
python-version: [3.10.8]

steps:
- uses: actions/checkout@v2
Expand All @@ -34,24 +34,26 @@ jobs:
- name: Setup conda
uses: s-weigand/setup-conda@v1
with:
python-version: 3.7
python-version: 3.9
- name: Pre-Install dependencies
run: |
gfortran --version
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
# wget https://repo.anaconda.com/archive/Anaconda3-2022.10-Linux-x86_64.sh -O miniconda.sh;
bash miniconda.sh -b -p $HOME/miniconda
export PATH="$HOME/miniconda/bin:$PATH"
hash -r
conda config --set always_yes yes --set changeps1 no
# conda config --append channels conda-forge
conda update --name base conda
conda list --name base conda
conda init bash
hash -r
export QT_QPA_PLATFORM='offscreen'
sudo apt install libeigen3-dev
conda env create -f utils/environment_minimal.yml
conda env create -f utils/environment_new.yml
conda init bash
source activate sharpy_minimal
source activate sharpy
git submodule init
git submodule update
git fetch --tags -f
Expand All @@ -60,7 +62,8 @@ jobs:
pip install .
pip install coverage
coverage run -m unittest discover
coverage json
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3
with:
verbose: true
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,7 @@ figs/*

# sharpy extension
*.sharpy

# Exceptions
# !tests/coupled/multibody/floating_wind_turbine/oc3_cs_v07.floating.h5
!tests/coupled/multibody/floating_wind_turbine/oc3_cs_v07.floating.h*
2 changes: 1 addition & 1 deletion .version.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"schemaVersion": 1,
"label": "release version",
"message": "2.0",
"message": "2.0.1",
"color": "green"
}
84 changes: 84 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## [2.0.1](https://github.com/imperialcollegelondon/sharpy/tree/2.0.1) (2023-05-31)

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

**Closed issues:**

- Twist direction inconsistent [\#212](https://github.com/ImperialCollegeLondon/sharpy/issues/212)

## [2.0](https://github.com/imperialcollegelondon/sharpy/tree/2.0) (2022-07-04)

[Full Changelog](https://github.com/imperialcollegelondon/sharpy/compare/1.3...2.0)
Expand Down Expand Up @@ -102,11 +110,16 @@
- Simple post-processor to save simulation parameters for batch runs [\#91](https://github.com/ImperialCollegeLondon/sharpy/pull/91) ([ngoiz](https://github.com/ngoiz))
- SHARPy support for external inputs via UDP network [\#90](https://github.com/ImperialCollegeLondon/sharpy/pull/90) ([ngoiz](https://github.com/ngoiz))
- Vortex radius as input parameter [\#86](https://github.com/ImperialCollegeLondon/sharpy/pull/86) ([ArturoMS13](https://github.com/ArturoMS13))
- Enhanced Frequency Response post-processor and linear system input/output options [\#83](https://github.com/ImperialCollegeLondon/sharpy/pull/83) ([ngoiz](https://github.com/ngoiz))
- Pazi wing added to flying\_wing template [\#82](https://github.com/ImperialCollegeLondon/sharpy/pull/82) ([outoforderdev](https://github.com/outoforderdev))
- Several new aerodynamic enhancements [\#79](https://github.com/ImperialCollegeLondon/sharpy/pull/79) ([ArturoMS13](https://github.com/ArturoMS13))

**Fixed bugs:**

- libss.py disc2cont doesn't accept SISO systems [\#88](https://github.com/ImperialCollegeLondon/sharpy/issues/88)
- Dimension mismatch when assembling linear UVLM with "shortened" wake [\#71](https://github.com/ImperialCollegeLondon/sharpy/issues/71)
- Fix bug wake shape generator StaticCoupled [\#85](https://github.com/ImperialCollegeLondon/sharpy/pull/85) ([ArturoMS13](https://github.com/ArturoMS13))
- Rework of direct balancing [\#74](https://github.com/ImperialCollegeLondon/sharpy/pull/74) ([outoforderdev](https://github.com/outoforderdev))

**Closed issues:**

Expand All @@ -130,6 +143,9 @@
- New SHARPy examples in the documentation [\#94](https://github.com/ImperialCollegeLondon/sharpy/pull/94) ([ArturoMS13](https://github.com/ArturoMS13))
- Add support for offline use of UDPout postproc [\#93](https://github.com/ImperialCollegeLondon/sharpy/pull/93) ([ngoiz](https://github.com/ngoiz))
- Option to transform rigid modes given at A FoR to centre of gravity and aligned with principal axes of inertia [\#92](https://github.com/ImperialCollegeLondon/sharpy/pull/92) ([ngoiz](https://github.com/ngoiz))
- Pazy wing modified to include the tip weight [\#87](https://github.com/ImperialCollegeLondon/sharpy/pull/87) ([outoforderdev](https://github.com/outoforderdev))
- Minor output clean up [\#81](https://github.com/ImperialCollegeLondon/sharpy/pull/81) ([ngoiz](https://github.com/ngoiz))
- Fixes assembly of linUVLM after plotting wake with minus m\_star [\#72](https://github.com/ImperialCollegeLondon/sharpy/pull/72) ([ngoiz](https://github.com/ngoiz))

## [v1.1.1](https://github.com/imperialcollegelondon/sharpy/tree/v1.1.1) (2020-02-03)

Expand All @@ -154,6 +170,10 @@
- Update README.md [\#63](https://github.com/ImperialCollegeLondon/sharpy/pull/63) ([rafapalacios](https://github.com/rafapalacios))
- Clean up linear SHARPy's interface with UVLM [\#60](https://github.com/ImperialCollegeLondon/sharpy/pull/60) ([ngoiz](https://github.com/ngoiz))

## [v1.1.0-2](https://github.com/imperialcollegelondon/sharpy/tree/v1.1.0-2) (2019-12-12)

[Full Changelog](https://github.com/imperialcollegelondon/sharpy/compare/v1.1.0...v1.1.0-2)

## [v1.1.0](https://github.com/imperialcollegelondon/sharpy/tree/v1.1.0) (2019-12-12)

[Full Changelog](https://github.com/imperialcollegelondon/sharpy/compare/v1.0.1...v1.1.0)
Expand Down Expand Up @@ -214,6 +234,70 @@

- Version v1.0.1 released [\#29](https://github.com/ImperialCollegeLondon/sharpy/pull/29) ([fonsocarre](https://github.com/fonsocarre))

## [1.0.0](https://github.com/imperialcollegelondon/sharpy/tree/1.0.0) (2019-11-07)

[Full Changelog](https://github.com/imperialcollegelondon/sharpy/compare/v1.0.0-rc...1.0.0)

**Implemented enhancements:**

- WriteVariablesTime output global beam variables and consistent out dir [\#19](https://github.com/ImperialCollegeLondon/sharpy/pull/19) ([ngoiz](https://github.com/ngoiz))
- Autodocumenter [\#16](https://github.com/ImperialCollegeLondon/sharpy/pull/16) ([ngoiz](https://github.com/ngoiz))

**Closed issues:**

- Tests not passing due to them being outdated + test refactoring. [\#11](https://github.com/ImperialCollegeLondon/sharpy/issues/11)

**Merged pull requests:**

- Release of v1.0.0!!! [\#20](https://github.com/ImperialCollegeLondon/sharpy/pull/20) ([fonsocarre](https://github.com/fonsocarre))
- Documentation fixes/updates [\#18](https://github.com/ImperialCollegeLondon/sharpy/pull/18) ([ngoiz](https://github.com/ngoiz))
- Fix dynamic control surface and settings for aerogridloader [\#15](https://github.com/ImperialCollegeLondon/sharpy/pull/15) ([ngoiz](https://github.com/ngoiz))

## [v1.0.0-rc](https://github.com/imperialcollegelondon/sharpy/tree/v1.0.0-rc) (2019-08-22)

[Full Changelog](https://github.com/imperialcollegelondon/sharpy/compare/V0.2.1...v1.0.0-rc)

**Closed issues:**

- Output table [\#10](https://github.com/ImperialCollegeLondon/sharpy/issues/10)

**Merged pull requests:**

- Remove H5pyDeprecationWarning [\#14](https://github.com/ImperialCollegeLondon/sharpy/pull/14) ([ArturoMS13](https://github.com/ArturoMS13))
- Lagrange multipliers for Catapult Take Off works + clean tests [\#13](https://github.com/ImperialCollegeLondon/sharpy/pull/13) ([fonsocarre](https://github.com/fonsocarre))

## [V0.2.1](https://github.com/imperialcollegelondon/sharpy/tree/V0.2.1) (2019-03-14)

[Full Changelog](https://github.com/imperialcollegelondon/sharpy/compare/v0.2...V0.2.1)

## [v0.2](https://github.com/imperialcollegelondon/sharpy/tree/v0.2) (2019-03-14)

[Full Changelog](https://github.com/imperialcollegelondon/sharpy/compare/v0.1...v0.2)

**Closed issues:**

- Add recovery options [\#9](https://github.com/ImperialCollegeLondon/sharpy/issues/9)

## [v0.1](https://github.com/imperialcollegelondon/sharpy/tree/v0.1) (2018-09-03)

[Full Changelog](https://github.com/imperialcollegelondon/sharpy/compare/bd2b65974d57d2d6486ea90cdb68ef6324efbac8...v0.1)

**Implemented enhancements:**

- Hinge definition for control surface [\#8](https://github.com/ImperialCollegeLondon/sharpy/issues/8)
- sharpy\_main.main does not return output [\#5](https://github.com/ImperialCollegeLondon/sharpy/issues/5)

**Fixed bugs:**

- Aerofoil data associated to the nodes instead of the elements [\#6](https://github.com/ImperialCollegeLondon/sharpy/issues/6)

**Merged pull requests:**

- Trimming routine working [\#4](https://github.com/ImperialCollegeLondon/sharpy/pull/4) ([fonsocarre](https://github.com/fonsocarre))
- Feature coupled dynamic [\#3](https://github.com/ImperialCollegeLondon/sharpy/pull/3) ([fonsocarre](https://github.com/fonsocarre))
- Refactored storage finished [\#2](https://github.com/ImperialCollegeLondon/sharpy/pull/2) ([fonsocarre](https://github.com/fonsocarre))
- Settings files are ConfigObjs now, not ConfigParser anymore [\#1](https://github.com/ImperialCollegeLondon/sharpy/pull/1) ([fonsocarre](https://github.com/fonsocarre))



\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
11 changes: 10 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ ENV BASH_ENV ~/.bashrc
SHELL ["/bin/bash", "-c"]
ENV PATH=${PATH}:/miniconda3/bin

# CENTOS 8 has reached end of life - Not yet an updated Docker base for CentOS stream
# Point to the CentOS 8 vault in order to download dependencies
RUN cd /etc/yum.repos.d/ && \
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* && \
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* && \
cd /

# Development tools including compilers
RUN yum groupinstall "Development Tools" -y --nogpgcheck && \
yum install -y --nogpgcheck mesa-libGL libXt libXt-devel wget gcc-gfortran lapack vim tmux && \
Expand Down Expand Up @@ -34,11 +41,13 @@ RUN ln -s /sharpy_dir/utils/docker/* /root/

RUN cd sharpy_dir && \
conda activate sharpy_minimal && \
git submodule update --init --recursive && \
mkdir build && \
cd build && \
CXX=g++ FC=gfortran cmake .. && make install -j 2 && \
cd .. && \
pip install . && \
rm -rf build

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

0 comments on commit 0ab9869

Please sign in to comment.