From 3a8be66cecc694b9280fea3fb96c32a9974b43b5 Mon Sep 17 00:00:00 2001 From: Ben Preston <144227999+ben-l-p@users.noreply.github.com> Date: Tue, 25 Jun 2024 12:24:57 +0100 Subject: [PATCH 01/62] Lower NumPy and SciPy version for install --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 2dd39ab92..ebc708e7f 100644 --- a/setup.py +++ b/setup.py @@ -130,10 +130,10 @@ def run(self): # ], python_requires=">=3.8", install_requires=[ - "numpy", + "numpy<2.0", "configobj", "h5py", - "scipy", + "scipy<1.14.0", "sympy", "matplotlib", "colorama", From dbd11437ed78bcd15f8d937be6c2376a507990f3 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Wed, 28 Aug 2024 15:41:46 +0100 Subject: [PATCH 02/62] Create pypi_test.yaml for automated CDCI with pipit --- .github/workflows/pypi_test.yaml | 72 ++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 .github/workflows/pypi_test.yaml diff --git a/.github/workflows/pypi_test.yaml b/.github/workflows/pypi_test.yaml new file mode 100644 index 000000000..038744ace --- /dev/null +++ b/.github/workflows/pypi_test.yaml @@ -0,0 +1,72 @@ +name: Create and publish pypi image + +on: + push: + branches: + - develop + - main + tags: + - 'v*' + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.10.8] + permissions: + contents: read + packages: write + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Set up GCC + uses: egor-tensin/setup-gcc@v1 + with: + version: 10 + platform: x64 + - name: Pre-Install dependencies + run: | + gfortran --version + export QT_QPA_PLATFORM='offscreen' + sudo apt install libeigen3-dev + git submodule init + git submodule update + git fetch --tags -f + mkdir build && cd build + cmake .. && make install -j 4 && cd .. + pip install -e . + - name: Store the distribution packages + uses: actions/upload-artifact@v3 + with: + name: python-package-distributions + path: dist/ + + publish-to-pypi: + name: >- + Publish Python 🐍 distribution 📦 to PyPI + # if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes + needs: + - build + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/sharpy # Replace with your PyPI project name + permissions: + id-token: write # IMPORTANT: mandatory for trusted publishing + steps: + - name: Download all the dists + uses: actions/download-artifact@v3 + with: + name: python-package-distributions + path: dist/ + - name: Publish distribution 📦 to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 From cf348f00a420bbd21753528cf18903338a74affc Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Wed, 28 Aug 2024 15:55:14 +0100 Subject: [PATCH 03/62] Update pypi_test.yaml --- .github/workflows/pypi_test.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pypi_test.yaml b/.github/workflows/pypi_test.yaml index 038744ace..b4acb36d0 100644 --- a/.github/workflows/pypi_test.yaml +++ b/.github/workflows/pypi_test.yaml @@ -2,11 +2,11 @@ name: Create and publish pypi image on: push: - branches: - - develop - - main - tags: - - 'v*' + # branches: + # - develop + # - main + # tags: + # - 'v*' env: REGISTRY: ghcr.io From 586d3acda34ff75dea7e55caa996f359b04a8032 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Wed, 28 Aug 2024 16:02:00 +0100 Subject: [PATCH 04/62] Update pypi_test.yaml --- .github/workflows/pypi_test.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pypi_test.yaml b/.github/workflows/pypi_test.yaml index b4acb36d0..7bc54a3fa 100644 --- a/.github/workflows/pypi_test.yaml +++ b/.github/workflows/pypi_test.yaml @@ -44,6 +44,7 @@ jobs: mkdir build && cd build cmake .. && make install -j 4 && cd .. pip install -e . + cd build - name: Store the distribution packages uses: actions/upload-artifact@v3 with: From f45ac0417e2e141774d5b232bcdbdf7929085ed8 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Wed, 28 Aug 2024 16:06:38 +0100 Subject: [PATCH 05/62] Update pypi_test.yaml --- .github/workflows/pypi_test.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pypi_test.yaml b/.github/workflows/pypi_test.yaml index 7bc54a3fa..cc023372d 100644 --- a/.github/workflows/pypi_test.yaml +++ b/.github/workflows/pypi_test.yaml @@ -44,7 +44,8 @@ jobs: mkdir build && cd build cmake .. && make install -j 4 && cd .. pip install -e . - cd build + - name: Build a binary wheel and a source tarball + run: python3 -m build - name: Store the distribution packages uses: actions/upload-artifact@v3 with: From 2396379e505832b26713ff1231f59229d52b4006 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Wed, 28 Aug 2024 16:19:58 +0100 Subject: [PATCH 06/62] Update pypi_test.yaml --- .github/workflows/pypi_test.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/pypi_test.yaml b/.github/workflows/pypi_test.yaml index cc023372d..921f9f847 100644 --- a/.github/workflows/pypi_test.yaml +++ b/.github/workflows/pypi_test.yaml @@ -44,6 +44,12 @@ jobs: mkdir build && cd build cmake .. && make install -j 4 && cd .. pip install -e . + - name: Install pypa/build + run: >- + python3 -m + pip install + build + --user - name: Build a binary wheel and a source tarball run: python3 -m build - name: Store the distribution packages From 8db99ca1d4ccbe8a65fc85f316d7b65a5bb14aa4 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Wed, 28 Aug 2024 16:48:35 +0100 Subject: [PATCH 07/62] Update pypi_test.yaml --- .github/workflows/pypi_test.yaml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/pypi_test.yaml b/.github/workflows/pypi_test.yaml index 921f9f847..4bcdee4c6 100644 --- a/.github/workflows/pypi_test.yaml +++ b/.github/workflows/pypi_test.yaml @@ -44,19 +44,19 @@ jobs: mkdir build && cd build cmake .. && make install -j 4 && cd .. pip install -e . - - name: Install pypa/build - run: >- - python3 -m - pip install - build - --user - - name: Build a binary wheel and a source tarball - run: python3 -m build + # - name: Install pypa/build + # run: >- + # python3 -m + # pip install + # build + # --user + # - name: Build a binary wheel and a source tarball + # run: python3 -m build - name: Store the distribution packages uses: actions/upload-artifact@v3 with: name: python-package-distributions - path: dist/ + path: / publish-to-pypi: name: >- @@ -75,6 +75,6 @@ jobs: uses: actions/download-artifact@v3 with: name: python-package-distributions - path: dist/ + path: / - name: Publish distribution 📦 to PyPI uses: pypa/gh-action-pypi-publish@release/v1 From 88ec407bb1436a0ebfd7de77fd3bb82fce8afb7e Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Wed, 28 Aug 2024 16:54:17 +0100 Subject: [PATCH 08/62] Update pypi_test.yaml --- .github/workflows/pypi_test.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pypi_test.yaml b/.github/workflows/pypi_test.yaml index 4bcdee4c6..fa50b7533 100644 --- a/.github/workflows/pypi_test.yaml +++ b/.github/workflows/pypi_test.yaml @@ -56,7 +56,7 @@ jobs: uses: actions/upload-artifact@v3 with: name: python-package-distributions - path: / + path: /home/runner/work/sharpy/ publish-to-pypi: name: >- @@ -75,6 +75,6 @@ jobs: uses: actions/download-artifact@v3 with: name: python-package-distributions - path: / + path: /home/runner/work/sharpy/ - name: Publish distribution 📦 to PyPI uses: pypa/gh-action-pypi-publish@release/v1 From 56b09509e7f5ba66a4290ac6e2d13cfd871635ca Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Wed, 28 Aug 2024 17:03:30 +0100 Subject: [PATCH 09/62] Update pypi_test.yaml --- .github/workflows/pypi_test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pypi_test.yaml b/.github/workflows/pypi_test.yaml index fa50b7533..ca01a1e25 100644 --- a/.github/workflows/pypi_test.yaml +++ b/.github/workflows/pypi_test.yaml @@ -67,7 +67,7 @@ jobs: runs-on: ubuntu-latest environment: name: pypi - url: https://pypi.org/p/sharpy # Replace with your PyPI project name + url: https://pypi.org/p/icl_sharpy # Replace with your PyPI project name permissions: id-token: write # IMPORTANT: mandatory for trusted publishing steps: From 088cc08a6e0e1ab004fbce4dc022e79054a50b28 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Wed, 28 Aug 2024 17:28:31 +0100 Subject: [PATCH 10/62] Update pypi_test.yaml --- .github/workflows/pypi_test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pypi_test.yaml b/.github/workflows/pypi_test.yaml index ca01a1e25..b51fdf238 100644 --- a/.github/workflows/pypi_test.yaml +++ b/.github/workflows/pypi_test.yaml @@ -75,6 +75,6 @@ jobs: uses: actions/download-artifact@v3 with: name: python-package-distributions - path: /home/runner/work/sharpy/ + path: /dist - name: Publish distribution 📦 to PyPI uses: pypa/gh-action-pypi-publish@release/v1 From 3deb0dda44c129dceb99bee5f9ef981704e6f201 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Wed, 28 Aug 2024 17:36:44 +0100 Subject: [PATCH 11/62] Update pypi_test.yaml --- .github/workflows/pypi_test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pypi_test.yaml b/.github/workflows/pypi_test.yaml index b51fdf238..9a2e590cf 100644 --- a/.github/workflows/pypi_test.yaml +++ b/.github/workflows/pypi_test.yaml @@ -75,6 +75,6 @@ jobs: uses: actions/download-artifact@v3 with: name: python-package-distributions - path: /dist + path: dist/ - name: Publish distribution 📦 to PyPI uses: pypa/gh-action-pypi-publish@release/v1 From e96d8620bcd47740c57288abebf5fc7694bb0ab8 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Wed, 28 Aug 2024 17:45:16 +0100 Subject: [PATCH 12/62] Update pypi_test.yaml --- .github/workflows/pypi_test.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pypi_test.yaml b/.github/workflows/pypi_test.yaml index 9a2e590cf..978041c35 100644 --- a/.github/workflows/pypi_test.yaml +++ b/.github/workflows/pypi_test.yaml @@ -78,3 +78,5 @@ jobs: path: dist/ - name: Publish distribution 📦 to PyPI uses: pypa/gh-action-pypi-publish@release/v1 + with: + path: dist/* From 7418a8db7628ffdb579570b373957e1ea211878c Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Wed, 28 Aug 2024 17:57:18 +0100 Subject: [PATCH 13/62] Update pypi_test.yaml --- .github/workflows/pypi_test.yaml | 44 ++++++++++++++++---------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/pypi_test.yaml b/.github/workflows/pypi_test.yaml index 978041c35..e2cf4fe4d 100644 --- a/.github/workflows/pypi_test.yaml +++ b/.github/workflows/pypi_test.yaml @@ -33,30 +33,30 @@ jobs: with: version: 10 platform: x64 - - name: Pre-Install dependencies - run: | - gfortran --version - export QT_QPA_PLATFORM='offscreen' - sudo apt install libeigen3-dev - git submodule init - git submodule update - git fetch --tags -f - mkdir build && cd build - cmake .. && make install -j 4 && cd .. - pip install -e . - # - name: Install pypa/build - # run: >- - # python3 -m - # pip install - # build - # --user - # - name: Build a binary wheel and a source tarball - # run: python3 -m build + # - name: Pre-Install dependencies + # run: | + # gfortran --version + # export QT_QPA_PLATFORM='offscreen' + # sudo apt install libeigen3-dev + # git submodule init + # git submodule update + # git fetch --tags -f + # mkdir build && cd build + # cmake .. && make install -j 4 && cd .. + # pip install -e . + - name: Install pypa/build + run: >- + python3 -m + pip install + build + --user + - name: Build a binary wheel and a source tarball + run: python3 -m build - name: Store the distribution packages uses: actions/upload-artifact@v3 with: name: python-package-distributions - path: /home/runner/work/sharpy/ + path: dist/ publish-to-pypi: name: >- @@ -78,5 +78,5 @@ jobs: path: dist/ - name: Publish distribution 📦 to PyPI uses: pypa/gh-action-pypi-publish@release/v1 - with: - path: dist/* + # with: + # path: dist/* From 0add8ca35f90e5026716807f9b49b2c2e3b7bfd4 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Wed, 28 Aug 2024 18:04:04 +0100 Subject: [PATCH 14/62] Update pypi_test.yaml --- .github/workflows/pypi_test.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pypi_test.yaml b/.github/workflows/pypi_test.yaml index e2cf4fe4d..2cf77d785 100644 --- a/.github/workflows/pypi_test.yaml +++ b/.github/workflows/pypi_test.yaml @@ -51,7 +51,8 @@ jobs: build --user - name: Build a binary wheel and a source tarball - run: python3 -m build + # run: python3 -m build + run: python setup.py bdist_wheel --universal - name: Store the distribution packages uses: actions/upload-artifact@v3 with: From 97ed0e081172e4f35c2f593883adc17be858a974 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Wed, 28 Aug 2024 18:06:07 +0100 Subject: [PATCH 15/62] Update pypi_test.yaml --- .github/workflows/pypi_test.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pypi_test.yaml b/.github/workflows/pypi_test.yaml index 2cf77d785..993dc503b 100644 --- a/.github/workflows/pypi_test.yaml +++ b/.github/workflows/pypi_test.yaml @@ -33,13 +33,13 @@ jobs: with: version: 10 platform: x64 - # - name: Pre-Install dependencies - # run: | - # gfortran --version - # export QT_QPA_PLATFORM='offscreen' - # sudo apt install libeigen3-dev - # git submodule init - # git submodule update + - name: Pre-Install dependencies + run: | + gfortran --version + export QT_QPA_PLATFORM='offscreen' + sudo apt install libeigen3-dev + git submodule init + git submodule update # git fetch --tags -f # mkdir build && cd build # cmake .. && make install -j 4 && cd .. From 5a408129780e09b4995bb62743da46b652ddde21 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Wed, 28 Aug 2024 18:08:35 +0100 Subject: [PATCH 16/62] Update pypi_test.yaml --- .github/workflows/pypi_test.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pypi_test.yaml b/.github/workflows/pypi_test.yaml index 993dc503b..22a85c0d3 100644 --- a/.github/workflows/pypi_test.yaml +++ b/.github/workflows/pypi_test.yaml @@ -51,8 +51,8 @@ jobs: build --user - name: Build a binary wheel and a source tarball - # run: python3 -m build - run: python setup.py bdist_wheel --universal + run: python3 -m build + # run: python setup.py bdist_wheel --universal - name: Store the distribution packages uses: actions/upload-artifact@v3 with: From d5d129b1fa8870c889b1efc9844e82fd8e162e35 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Wed, 28 Aug 2024 18:14:47 +0100 Subject: [PATCH 17/62] Update pypi_test.yaml --- .github/workflows/pypi_test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pypi_test.yaml b/.github/workflows/pypi_test.yaml index 22a85c0d3..52fc1b2c8 100644 --- a/.github/workflows/pypi_test.yaml +++ b/.github/workflows/pypi_test.yaml @@ -51,7 +51,7 @@ jobs: build --user - name: Build a binary wheel and a source tarball - run: python3 -m build + run: python3 setup.py sdist # run: python setup.py bdist_wheel --universal - name: Store the distribution packages uses: actions/upload-artifact@v3 From 442e417cf62e3533c8c073b62a9b03ba9ac65905 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Wed, 28 Aug 2024 18:22:44 +0100 Subject: [PATCH 18/62] Update setup.py --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index ebc708e7f..ca44b529e 100644 --- a/setup.py +++ b/setup.py @@ -162,7 +162,8 @@ def run(self): ], }, classifiers=[ - "Operating System :: Linux, Mac OS", + "Operating System :: MacOS", + "Operating System :: POSIX :: Linux", "Programming Language :: Python, C++", ], From 047ff093800033124c6a64b41b51c4ba30f100b4 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Wed, 28 Aug 2024 18:26:49 +0100 Subject: [PATCH 19/62] Update setup.py --- setup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index ca44b529e..f2cbe8da4 100644 --- a/setup.py +++ b/setup.py @@ -164,7 +164,9 @@ def run(self): classifiers=[ "Operating System :: MacOS", "Operating System :: POSIX :: Linux", - "Programming Language :: Python, C++", + "Programming Language :: Python :: 3.10", + "Programming Language :: Fortran", + "Programming Language :: C++" ], entry_points={ From ebb6b4efba29e8b8e9c581cb300dc311d782ec84 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Wed, 28 Aug 2024 18:35:29 +0100 Subject: [PATCH 20/62] Update pypi_test.yaml --- .github/workflows/pypi_test.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pypi_test.yaml b/.github/workflows/pypi_test.yaml index 52fc1b2c8..81cdc73b0 100644 --- a/.github/workflows/pypi_test.yaml +++ b/.github/workflows/pypi_test.yaml @@ -8,9 +8,9 @@ on: # tags: # - 'v*' -env: - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} +# env: +# REGISTRY: ghcr.io +# IMAGE_NAME: ${{ github.repository }} jobs: build: From 1132cb2e9404c5a0c3789ac18f434f780e112a0e Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Wed, 28 Aug 2024 18:43:45 +0100 Subject: [PATCH 21/62] Update setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index f2cbe8da4..1d0fba928 100644 --- a/setup.py +++ b/setup.py @@ -103,7 +103,7 @@ def run(self): long_description = f.read() run() setup( - name="sharpy", + name="icl_sharpy", version=__version__, description="""SHARPy is a nonlinear aeroelastic analysis package developed at the Department of Aeronautics, Imperial College London. It can be used From 5372e3b40c57013b9f386d81fbe3cbb79fbe4ce8 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Wed, 28 Aug 2024 19:06:13 +0100 Subject: [PATCH 22/62] Update pypi_test.yaml --- .github/workflows/pypi_test.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pypi_test.yaml b/.github/workflows/pypi_test.yaml index 81cdc73b0..bc497b25a 100644 --- a/.github/workflows/pypi_test.yaml +++ b/.github/workflows/pypi_test.yaml @@ -51,7 +51,8 @@ jobs: build --user - name: Build a binary wheel and a source tarball - run: python3 setup.py sdist + # run: python3 setup.py sdist + run: python3 -m pip install --user -e . # run: python setup.py bdist_wheel --universal - name: Store the distribution packages uses: actions/upload-artifact@v3 From 09a98797c0fd7168983904b581bc82f261359f89 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Wed, 28 Aug 2024 19:12:13 +0100 Subject: [PATCH 23/62] Update pypi_test.yaml --- .github/workflows/pypi_test.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pypi_test.yaml b/.github/workflows/pypi_test.yaml index bc497b25a..1945c0b87 100644 --- a/.github/workflows/pypi_test.yaml +++ b/.github/workflows/pypi_test.yaml @@ -40,6 +40,7 @@ jobs: sudo apt install libeigen3-dev git submodule init git submodule update + export PIP_CACHE_DIR=dist/ # git fetch --tags -f # mkdir build && cd build # cmake .. && make install -j 4 && cd .. From 3ea2da1f6f2c2d29b96316abcb9b03ee6346a329 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Wed, 28 Aug 2024 19:16:05 +0100 Subject: [PATCH 24/62] Update pypi_test.yaml --- .github/workflows/pypi_test.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pypi_test.yaml b/.github/workflows/pypi_test.yaml index 1945c0b87..5a4d95b95 100644 --- a/.github/workflows/pypi_test.yaml +++ b/.github/workflows/pypi_test.yaml @@ -40,7 +40,6 @@ jobs: sudo apt install libeigen3-dev git submodule init git submodule update - export PIP_CACHE_DIR=dist/ # git fetch --tags -f # mkdir build && cd build # cmake .. && make install -j 4 && cd .. @@ -53,7 +52,7 @@ jobs: --user - name: Build a binary wheel and a source tarball # run: python3 setup.py sdist - run: python3 -m pip install --user -e . + run: python3 -m pip install --user --cache-dir dist/ -e . # run: python setup.py bdist_wheel --universal - name: Store the distribution packages uses: actions/upload-artifact@v3 From 49bf8d2b2bd786dba4f3ee8c90999d69a5599ed3 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Wed, 28 Aug 2024 19:25:21 +0100 Subject: [PATCH 25/62] Update pypi_test.yaml --- .github/workflows/pypi_test.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pypi_test.yaml b/.github/workflows/pypi_test.yaml index 5a4d95b95..60f0bd640 100644 --- a/.github/workflows/pypi_test.yaml +++ b/.github/workflows/pypi_test.yaml @@ -52,8 +52,15 @@ jobs: --user - name: Build a binary wheel and a source tarball # run: python3 setup.py sdist - run: python3 -m pip install --user --cache-dir dist/ -e . + # run: python3 -m pip install --user -e . + run: python3 -m pip wheel # run: python setup.py bdist_wheel --universal + + + - name: Find the wheel created during pip install + run: + python3 -m pip cache dir + - name: Store the distribution packages uses: actions/upload-artifact@v3 with: From 8f73f1665aefdf1079835dbe99f1d2c452ca1dc5 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Wed, 28 Aug 2024 19:28:08 +0100 Subject: [PATCH 26/62] Update pypi_test.yaml --- .github/workflows/pypi_test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pypi_test.yaml b/.github/workflows/pypi_test.yaml index 60f0bd640..44848c280 100644 --- a/.github/workflows/pypi_test.yaml +++ b/.github/workflows/pypi_test.yaml @@ -53,7 +53,7 @@ jobs: - name: Build a binary wheel and a source tarball # run: python3 setup.py sdist # run: python3 -m pip install --user -e . - run: python3 -m pip wheel + run: python3 -m pip wheel -w dist/ icl_sharpy # run: python setup.py bdist_wheel --universal From bf674a42a9157ccf863be4e9cd1278335e972a31 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Wed, 28 Aug 2024 19:33:34 +0100 Subject: [PATCH 27/62] Update pypi_test.yaml --- .github/workflows/pypi_test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pypi_test.yaml b/.github/workflows/pypi_test.yaml index 44848c280..7387a2e14 100644 --- a/.github/workflows/pypi_test.yaml +++ b/.github/workflows/pypi_test.yaml @@ -53,7 +53,7 @@ jobs: - name: Build a binary wheel and a source tarball # run: python3 setup.py sdist # run: python3 -m pip install --user -e . - run: python3 -m pip wheel -w dist/ icl_sharpy + run: python3 -m pip wheel -w dist/ --no-binary icl_sharpy icl_sharpy # run: python setup.py bdist_wheel --universal From 0d3edd7d42c74c32128d88a35780e7d1a9d9c837 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Wed, 28 Aug 2024 19:35:41 +0100 Subject: [PATCH 28/62] Update pypi_test.yaml --- .github/workflows/pypi_test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pypi_test.yaml b/.github/workflows/pypi_test.yaml index 7387a2e14..f9765bab1 100644 --- a/.github/workflows/pypi_test.yaml +++ b/.github/workflows/pypi_test.yaml @@ -53,7 +53,7 @@ jobs: - name: Build a binary wheel and a source tarball # run: python3 setup.py sdist # run: python3 -m pip install --user -e . - run: python3 -m pip wheel -w dist/ --no-binary icl_sharpy icl_sharpy + run: python3 setup.py bdist_wheel # run: python setup.py bdist_wheel --universal From 2ecb365f5be64c486201fb1fed04a63c583cd600 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Wed, 28 Aug 2024 19:38:57 +0100 Subject: [PATCH 29/62] Update pypi_test.yaml --- .github/workflows/pypi_test.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pypi_test.yaml b/.github/workflows/pypi_test.yaml index f9765bab1..0b31e973a 100644 --- a/.github/workflows/pypi_test.yaml +++ b/.github/workflows/pypi_test.yaml @@ -50,6 +50,8 @@ jobs: pip install build --user + - name: Install wheel + run: python3 -m pip install wheel --user - name: Build a binary wheel and a source tarball # run: python3 setup.py sdist # run: python3 -m pip install --user -e . From 7e52ca135b1afe14c50c1f86170f3b9fb78936f1 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Wed, 28 Aug 2024 19:57:44 +0100 Subject: [PATCH 30/62] Update setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 1d0fba928..0128090fb 100644 --- a/setup.py +++ b/setup.py @@ -139,7 +139,7 @@ def run(self): "colorama", "dill", "jupyterlab", - "mayavi @ git+https://github.com/enthought/mayavi.git", #Used for TVTK. Bug in pip install, hence git clone + "mayavi", "pandas", "control", "openpyxl>=3.0.10", From cfc187a74e0296066ce84d9d96df4b5020d4bd0c Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Thu, 29 Aug 2024 00:48:01 +0100 Subject: [PATCH 31/62] change name of package --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 0128090fb..d462ab254 100644 --- a/setup.py +++ b/setup.py @@ -103,7 +103,7 @@ def run(self): long_description = f.read() run() setup( - name="icl_sharpy", + name="icl_sharpy", # due to the name sharpy being taken on pypi version=__version__, description="""SHARPy is a nonlinear aeroelastic analysis package developed at the Department of Aeronautics, Imperial College London. It can be used From 4a15277da090713484c6cc57af314521e1934956 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Thu, 29 Aug 2024 00:52:20 +0100 Subject: [PATCH 32/62] mayavi direct dependency removed refer to github PR for reason direct dependency is added - tested to not be necessary as of now, and removed since that blocks pypi artifact upload https://github.com/ImperialCollegeLondon/sharpy/pull/280#issuecomment-1955183391 https://stackoverflow.com/questions/54887301/how-can-i-use-git-repos-as-dependencies-for-my-pypi-package --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index d462ab254..e77b487bc 100644 --- a/setup.py +++ b/setup.py @@ -139,7 +139,7 @@ def run(self): "colorama", "dill", "jupyterlab", - "mayavi", + "mayavi", # github direct dependency removed since pip version is fixed, and also not compatible with pypi "pandas", "control", "openpyxl>=3.0.10", From 951f920cdba3d44d081cb011fbb1539b03e4b377 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Thu, 29 Aug 2024 00:58:03 +0100 Subject: [PATCH 33/62] Create pypi_build.yaml --- .github/workflows/pypi_build.yaml | 93 +++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 .github/workflows/pypi_build.yaml diff --git a/.github/workflows/pypi_build.yaml b/.github/workflows/pypi_build.yaml new file mode 100644 index 000000000..4bcbbed19 --- /dev/null +++ b/.github/workflows/pypi_build.yaml @@ -0,0 +1,93 @@ +name: Create and publish pypi image + +on: + push: + branches: + - develop + - main + tags: + - 'v*' + +# env: +# REGISTRY: ghcr.io +# IMAGE_NAME: ${{ github.repository }} + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.10.8] + permissions: + contents: read + packages: write + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Set up GCC + uses: egor-tensin/setup-gcc@v1 + with: + version: 10 + platform: x64 + - name: Pre-Install dependencies + run: | + gfortran --version + export QT_QPA_PLATFORM='offscreen' + sudo apt install libeigen3-dev + git submodule init + git submodule update + # git fetch --tags -f + # mkdir build && cd build + # cmake .. && make install -j 4 && cd .. + # pip install -e . + - name: Install pypa/build + run: >- + python3 -m + pip install + build + --user + - name: Install wheel + run: python3 -m pip install wheel --user + - name: Build a binary wheel and a source tarball + # run: python3 setup.py sdist + # run: python3 -m pip install --user -e . + run: python3 setup.py bdist_wheel + # run: python setup.py bdist_wheel --universal + + + - name: Find the wheel created during pip install + run: + python3 -m pip cache dir + + - name: Store the distribution packages + uses: actions/upload-artifact@v3 + with: + name: python-package-distributions + path: dist/ + + publish-to-pypi: + name: >- + Publish Python 🐍 distribution 📦 to PyPI + # if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes + needs: + - build + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/icl_sharpy # Replace with your PyPI project name + permissions: + id-token: write # IMPORTANT: mandatory for trusted publishing + steps: + - name: Download all the dists + uses: actions/download-artifact@v3 + with: + name: python-package-distributions + path: dist/ + - name: Publish distribution 📦 to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + # with: + # path: dist/* From 29716171f41122290196a1288183509dc42ae474 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Thu, 29 Aug 2024 00:58:55 +0100 Subject: [PATCH 34/62] Update and rename pypi_test.yaml to pypi_build_test.yaml --- .../{pypi_test.yaml => pypi_build_test.yaml} | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) rename .github/workflows/{pypi_test.yaml => pypi_build_test.yaml} (93%) diff --git a/.github/workflows/pypi_test.yaml b/.github/workflows/pypi_build_test.yaml similarity index 93% rename from .github/workflows/pypi_test.yaml rename to .github/workflows/pypi_build_test.yaml index 0b31e973a..67d05e6fe 100644 --- a/.github/workflows/pypi_test.yaml +++ b/.github/workflows/pypi_build_test.yaml @@ -1,12 +1,16 @@ name: Create and publish pypi image on: + pull_request: + branches: + - main + - develop + - 'rc*' push: - # branches: - # - develop - # - main - # tags: - # - 'v*' + paths: + - 'utils/*' + - 'Dockerfile' + - '.github/workflows/docker*' # env: # REGISTRY: ghcr.io From 64ba76ffde57fea9b6b540f7631a2898be1a4f23 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Thu, 29 Aug 2024 00:59:39 +0100 Subject: [PATCH 35/62] Update pypi_build_test.yaml --- .github/workflows/pypi_build_test.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pypi_build_test.yaml b/.github/workflows/pypi_build_test.yaml index 67d05e6fe..4ff7b6e3b 100644 --- a/.github/workflows/pypi_build_test.yaml +++ b/.github/workflows/pypi_build_test.yaml @@ -9,8 +9,8 @@ on: push: paths: - 'utils/*' - - 'Dockerfile' - - '.github/workflows/docker*' + - 'setup.py' + - '.github/workflows/pypi*' # env: # REGISTRY: ghcr.io From 5a78562210eb92912550b4f74559a514d6e49399 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Thu, 29 Aug 2024 01:04:45 +0100 Subject: [PATCH 36/62] Update pypi_build_test.yaml --- .github/workflows/pypi_build_test.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pypi_build_test.yaml b/.github/workflows/pypi_build_test.yaml index 4ff7b6e3b..eb64de3a1 100644 --- a/.github/workflows/pypi_build_test.yaml +++ b/.github/workflows/pypi_build_test.yaml @@ -91,7 +91,8 @@ jobs: with: name: python-package-distributions path: dist/ - - name: Publish distribution 📦 to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - # with: - # path: dist/* + # testing only - do not upload + # - name: Publish distribution 📦 to PyPI + # uses: pypa/gh-action-pypi-publish@release/v1 + # # with: + # # path: dist/* From 560911d3c9d28c1a4aabdd0af38bb6cbe447f925 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Thu, 29 Aug 2024 01:05:53 +0100 Subject: [PATCH 37/62] Update pypi_build.yaml --- .github/workflows/pypi_build.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pypi_build.yaml b/.github/workflows/pypi_build.yaml index 4bcbbed19..8a2f9138a 100644 --- a/.github/workflows/pypi_build.yaml +++ b/.github/workflows/pypi_build.yaml @@ -2,9 +2,10 @@ name: Create and publish pypi image on: push: - branches: - - develop - - main + # only publish with a new tag + # branches: + # - develop + # - main tags: - 'v*' From 348bfe75732495288fb63d1410b72d4988c239a8 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Thu, 29 Aug 2024 01:08:18 +0100 Subject: [PATCH 38/62] Update readme.md for pypi --- .github/workflows/readme.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/readme.md b/.github/workflows/readme.md index 3124c604b..e12069809 100644 --- a/.github/workflows/readme.md +++ b/.github/workflows/readme.md @@ -1,6 +1,6 @@ # SHARPy GitHub Workflows -There are 4 automated workflows for SHARPy's CI/CD. +There are 4(+2 experimental) automated workflows for SHARPy's CI/CD. ## SHARPy Tests @@ -19,5 +19,13 @@ Python code, hence allowing the merge. 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 `main`. + * `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`. * `docker_build.yaml`: Builds and pushes the Docker image. Runs on pushes to `develop`, `main` and annotated tags. + +## Pypi + +Two nearly identical workflows, the only difference is that one pushes the wheel +artifact to icl-sharpy @ pypi. Therefore: + + * `pypi_build_test.yaml`: Builds the pypi wheel but does not push. Runs on changes to the `pypi*` workflows, changes to the `utils/` directory (environments) and changes to the `setup.py`. Required test for PRs to merge to `develop` and `main`. + * `pypi_build.yaml`: Builds and pushes the pypi wheel. Runs on annotated tags. From 0b229f900a21e291e0561400e0098b25ec330e78 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Thu, 29 Aug 2024 01:08:32 +0100 Subject: [PATCH 39/62] Update readme.md --- .github/workflows/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/readme.md b/.github/workflows/readme.md index e12069809..8c11b7d9b 100644 --- a/.github/workflows/readme.md +++ b/.github/workflows/readme.md @@ -22,7 +22,7 @@ image to the SHARPy packages. Therefore: * `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`. * `docker_build.yaml`: Builds and pushes the Docker image. Runs on pushes to `develop`, `main` and annotated tags. -## Pypi +## Pypi (experimental!) Two nearly identical workflows, the only difference is that one pushes the wheel artifact to icl-sharpy @ pypi. Therefore: From a4be88791d59008e0fa4fd31d4ab29cf29e31cbe Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Thu, 29 Aug 2024 01:19:41 +0100 Subject: [PATCH 40/62] Update installation.md for PyPI --- docs/source/content/installation.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/source/content/installation.md b/docs/source/content/installation.md index 3a8341be0..2ffc3d77d 100644 --- a/docs/source/content/installation.md +++ b/docs/source/content/installation.md @@ -303,6 +303,22 @@ python -m unittest **Enjoy!** +## Obtain SHARPy from PyPI (experimental!) + +You can obtain a built version of SHARPy, icl-sharpy, from PyPI [here](https://pypi.org/project/icl-sharpy/). + +To install at default directory use +``` +python3 -m pip install icl-sharpy + +``` +To install at current directory use +``` +python3 -m pip install --prefix . icl-sharpy + +``` +The source code can be found at `/lib/python3.10/site-packages/sharpy` and the executable at `/bin/sharpy`. + ## Running SHARPy ### Automated tests From 389baba77c05638756b4f3a87e96dd13264b8fd1 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Thu, 29 Aug 2024 01:20:10 +0100 Subject: [PATCH 41/62] Update installation.md --- docs/source/content/installation.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/source/content/installation.md b/docs/source/content/installation.md index 2ffc3d77d..c9b930fbb 100644 --- a/docs/source/content/installation.md +++ b/docs/source/content/installation.md @@ -310,12 +310,10 @@ You can obtain a built version of SHARPy, icl-sharpy, from PyPI [here](https://p To install at default directory use ``` python3 -m pip install icl-sharpy - ``` To install at current directory use ``` python3 -m pip install --prefix . icl-sharpy - ``` The source code can be found at `/lib/python3.10/site-packages/sharpy` and the executable at `/bin/sharpy`. From fe4448423af5e54093b5c08ba69738fa750a3248 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Thu, 29 Aug 2024 01:22:13 +0100 Subject: [PATCH 42/62] Update pypi_build_test.yaml --- .github/workflows/pypi_build_test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pypi_build_test.yaml b/.github/workflows/pypi_build_test.yaml index eb64de3a1..5f553d04c 100644 --- a/.github/workflows/pypi_build_test.yaml +++ b/.github/workflows/pypi_build_test.yaml @@ -1,4 +1,4 @@ -name: Create and publish pypi image +name: Test pypi image build on: pull_request: From f850fec78c84d8004fc27105ef0c0792f78f46fd Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Thu, 29 Aug 2024 10:27:58 +0000 Subject: [PATCH 43/62] Addressed and incorporated suggestions from review --- .github/workflows/pypi_build.yaml | 49 +++++++++++++------------------ 1 file changed, 21 insertions(+), 28 deletions(-) diff --git a/.github/workflows/pypi_build.yaml b/.github/workflows/pypi_build.yaml index 8a2f9138a..3bc989a78 100644 --- a/.github/workflows/pypi_build.yaml +++ b/.github/workflows/pypi_build.yaml @@ -1,34 +1,40 @@ name: Create and publish pypi image on: + # only runs when there are pushes to develop and main + # and for pull requests to develop and main + # and if there are changes to the build process and github action push: - # only publish with a new tag - # branches: - # - develop - # - main - tags: - - 'v*' - -# env: -# REGISTRY: ghcr.io -# IMAGE_NAME: ${{ github.repository }} + branches: + - develop + - main + paths: + - 'setup.py' + - '.github/workflows/pypi*' + pull_request: + branches: + - main + - develop + - 'rc*' jobs: build: runs-on: ubuntu-latest + env: + python-version-chosen: [3.10.8] strategy: - matrix: - python-version: [3.10.8] + python-version: $python-version-chosen permissions: contents: read packages: write steps: - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} + - name: Set up Python ${{ python-version-chosen }} uses: actions/setup-python@v2 with: - python-version: ${{ matrix.python-version }} + submodules: 'true' + python-version: $python-version-chosen - name: Set up GCC uses: egor-tensin/setup-gcc@v1 with: @@ -36,15 +42,8 @@ jobs: platform: x64 - name: Pre-Install dependencies run: | - gfortran --version export QT_QPA_PLATFORM='offscreen' sudo apt install libeigen3-dev - git submodule init - git submodule update - # git fetch --tags -f - # mkdir build && cd build - # cmake .. && make install -j 4 && cd .. - # pip install -e . - name: Install pypa/build run: >- python3 -m @@ -54,16 +53,10 @@ jobs: - name: Install wheel run: python3 -m pip install wheel --user - name: Build a binary wheel and a source tarball - # run: python3 setup.py sdist - # run: python3 -m pip install --user -e . run: python3 setup.py bdist_wheel - # run: python setup.py bdist_wheel --universal - - - name: Find the wheel created during pip install run: python3 -m pip cache dir - - name: Store the distribution packages uses: actions/upload-artifact@v3 with: @@ -73,7 +66,7 @@ jobs: publish-to-pypi: name: >- Publish Python 🐍 distribution 📦 to PyPI - # if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes + if: startsWith(github.ref, 'refs/tags/v') # only publish to PyPI on tag pushes needs: - build runs-on: ubuntu-latest From acb41ff870efaadcee7bc386a0f5ba616eb3899b Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Thu, 29 Aug 2024 10:28:59 +0000 Subject: [PATCH 44/62] Deleted as now incorporated into pypi_build --- .github/workflows/pypi_build_test.yaml | 98 -------------------------- 1 file changed, 98 deletions(-) delete mode 100644 .github/workflows/pypi_build_test.yaml diff --git a/.github/workflows/pypi_build_test.yaml b/.github/workflows/pypi_build_test.yaml deleted file mode 100644 index 5f553d04c..000000000 --- a/.github/workflows/pypi_build_test.yaml +++ /dev/null @@ -1,98 +0,0 @@ -name: Test pypi image build - -on: - pull_request: - branches: - - main - - develop - - 'rc*' - push: - paths: - - 'utils/*' - - 'setup.py' - - '.github/workflows/pypi*' - -# env: -# REGISTRY: ghcr.io -# IMAGE_NAME: ${{ github.repository }} - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: [3.10.8] - permissions: - contents: read - packages: write - - steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - name: Set up GCC - uses: egor-tensin/setup-gcc@v1 - with: - version: 10 - platform: x64 - - name: Pre-Install dependencies - run: | - gfortran --version - export QT_QPA_PLATFORM='offscreen' - sudo apt install libeigen3-dev - git submodule init - git submodule update - # git fetch --tags -f - # mkdir build && cd build - # cmake .. && make install -j 4 && cd .. - # pip install -e . - - name: Install pypa/build - run: >- - python3 -m - pip install - build - --user - - name: Install wheel - run: python3 -m pip install wheel --user - - name: Build a binary wheel and a source tarball - # run: python3 setup.py sdist - # run: python3 -m pip install --user -e . - run: python3 setup.py bdist_wheel - # run: python setup.py bdist_wheel --universal - - - - name: Find the wheel created during pip install - run: - python3 -m pip cache dir - - - name: Store the distribution packages - uses: actions/upload-artifact@v3 - with: - name: python-package-distributions - path: dist/ - - publish-to-pypi: - name: >- - Publish Python 🐍 distribution 📦 to PyPI - # if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes - needs: - - build - runs-on: ubuntu-latest - environment: - name: pypi - url: https://pypi.org/p/icl_sharpy # Replace with your PyPI project name - permissions: - id-token: write # IMPORTANT: mandatory for trusted publishing - steps: - - name: Download all the dists - uses: actions/download-artifact@v3 - with: - name: python-package-distributions - path: dist/ - # testing only - do not upload - # - name: Publish distribution 📦 to PyPI - # uses: pypa/gh-action-pypi-publish@release/v1 - # # with: - # # path: dist/* From ae491be1750af9b096f61a35c75f2970de71a4c4 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Thu, 29 Aug 2024 11:30:53 +0100 Subject: [PATCH 45/62] Update pypi_build.yaml --- .github/workflows/pypi_build.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/pypi_build.yaml b/.github/workflows/pypi_build.yaml index 3bc989a78..4048bd24d 100644 --- a/.github/workflows/pypi_build.yaml +++ b/.github/workflows/pypi_build.yaml @@ -21,9 +21,7 @@ jobs: build: runs-on: ubuntu-latest env: - python-version-chosen: [3.10.8] - strategy: - python-version: $python-version-chosen + python-version-chosen: "[3.10.8]" permissions: contents: read packages: write From 107e4678b7c31809e433240fc124447b084bcc54 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Thu, 29 Aug 2024 11:32:48 +0100 Subject: [PATCH 46/62] Update pypi_build.yaml --- .github/workflows/pypi_build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pypi_build.yaml b/.github/workflows/pypi_build.yaml index 4048bd24d..6928ccafe 100644 --- a/.github/workflows/pypi_build.yaml +++ b/.github/workflows/pypi_build.yaml @@ -21,7 +21,7 @@ jobs: build: runs-on: ubuntu-latest env: - python-version-chosen: "[3.10.8]" + python-version-chosen: "3.10.8" permissions: contents: read packages: write From b054baf987669222704c45ff19d4f33761a7f5df Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Thu, 29 Aug 2024 11:35:00 +0100 Subject: [PATCH 47/62] Update pypi_build.yaml --- .github/workflows/pypi_build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pypi_build.yaml b/.github/workflows/pypi_build.yaml index 6928ccafe..ade551b11 100644 --- a/.github/workflows/pypi_build.yaml +++ b/.github/workflows/pypi_build.yaml @@ -28,7 +28,7 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up Python ${{ python-version-chosen }} + - name: Set up Python ${{ env.python-version-chosen }} uses: actions/setup-python@v2 with: submodules: 'true' From 0b4ea119af5143f1a43fbbe4c61245ad42015b37 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Thu, 29 Aug 2024 11:37:27 +0100 Subject: [PATCH 48/62] Update pypi_build.yaml --- .github/workflows/pypi_build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pypi_build.yaml b/.github/workflows/pypi_build.yaml index ade551b11..b395a815f 100644 --- a/.github/workflows/pypi_build.yaml +++ b/.github/workflows/pypi_build.yaml @@ -32,7 +32,7 @@ jobs: uses: actions/setup-python@v2 with: submodules: 'true' - python-version: $python-version-chosen + python-version: ${{ env.python-version-chosen }} - name: Set up GCC uses: egor-tensin/setup-gcc@v1 with: From e20210fed16ede2829da55246a9bf0b174140cb4 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Thu, 29 Aug 2024 11:42:14 +0100 Subject: [PATCH 49/62] Update pypi_build.yaml --- .github/workflows/pypi_build.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pypi_build.yaml b/.github/workflows/pypi_build.yaml index b395a815f..bafa206a7 100644 --- a/.github/workflows/pypi_build.yaml +++ b/.github/workflows/pypi_build.yaml @@ -31,7 +31,6 @@ jobs: - name: Set up Python ${{ env.python-version-chosen }} uses: actions/setup-python@v2 with: - submodules: 'true' python-version: ${{ env.python-version-chosen }} - name: Set up GCC uses: egor-tensin/setup-gcc@v1 @@ -42,6 +41,8 @@ jobs: run: | export QT_QPA_PLATFORM='offscreen' sudo apt install libeigen3-dev + git submodule init + git submodule update - name: Install pypa/build run: >- python3 -m From b8704e33c8bef3964454240884230b57abf0bdea Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Thu, 29 Aug 2024 11:52:52 +0100 Subject: [PATCH 50/62] Renamed job to distinguish actions --- .github/workflows/pypi_build.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pypi_build.yaml b/.github/workflows/pypi_build.yaml index bafa206a7..42f1b78e7 100644 --- a/.github/workflows/pypi_build.yaml +++ b/.github/workflows/pypi_build.yaml @@ -1,8 +1,8 @@ name: Create and publish pypi image on: - # only runs when there are pushes to develop and main - # and for pull requests to develop and main + # only runs when there are pushes to develop and main for publishing + # and for testing, pull requests to develop and main # and if there are changes to the build process and github action push: branches: @@ -18,7 +18,7 @@ on: - 'rc*' jobs: - build: + create-pypi-image: runs-on: ubuntu-latest env: python-version-chosen: "3.10.8" @@ -67,7 +67,7 @@ jobs: Publish Python 🐍 distribution 📦 to PyPI if: startsWith(github.ref, 'refs/tags/v') # only publish to PyPI on tag pushes needs: - - build + - create-pypi-image runs-on: ubuntu-latest environment: name: pypi From 9210c615cf78b4bf8a65af67164c1f745948aebb Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Thu, 29 Aug 2024 11:57:41 +0100 Subject: [PATCH 51/62] Name update for readability --- .github/workflows/pypi_build.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/pypi_build.yaml b/.github/workflows/pypi_build.yaml index 42f1b78e7..4105c7d04 100644 --- a/.github/workflows/pypi_build.yaml +++ b/.github/workflows/pypi_build.yaml @@ -19,6 +19,8 @@ on: jobs: create-pypi-image: + name: >- + Create .whl 🛞 from SHARPy distribution runs-on: ubuntu-latest env: python-version-chosen: "3.10.8" From 41a04a8aa7154a0ff4206640d79d4059bbad10a5 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Thu, 29 Aug 2024 13:01:46 +0100 Subject: [PATCH 52/62] Update readme.md for removing pypi_test --- .github/workflows/readme.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/readme.md b/.github/workflows/readme.md index 8c11b7d9b..f073f0000 100644 --- a/.github/workflows/readme.md +++ b/.github/workflows/readme.md @@ -1,6 +1,6 @@ # SHARPy GitHub Workflows -There are 4(+2 experimental) automated workflows for SHARPy's CI/CD. +There are 4(+1 experimental) automated workflows for SHARPy's CI/CD. ## SHARPy Tests @@ -24,8 +24,7 @@ image to the SHARPy packages. Therefore: ## Pypi (experimental!) -Two nearly identical workflows, the only difference is that one pushes the wheel +One workflow with two jobs, the first creates and the second pushes the wheel artifact to icl-sharpy @ pypi. Therefore: - * `pypi_build_test.yaml`: Builds the pypi wheel but does not push. Runs on changes to the `pypi*` workflows, changes to the `utils/` directory (environments) and changes to the `setup.py`. Required test for PRs to merge to `develop` and `main`. - * `pypi_build.yaml`: Builds and pushes the pypi wheel. Runs on annotated tags. + * `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. From c571ec94c485059168b793d32a17e150b81dac4b Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Mon, 7 Oct 2024 23:57:49 +0100 Subject: [PATCH 53/62] include also tarball to pypi --- .github/workflows/pypi_build.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pypi_build.yaml b/.github/workflows/pypi_build.yaml index 4105c7d04..665ac5914 100644 --- a/.github/workflows/pypi_build.yaml +++ b/.github/workflows/pypi_build.yaml @@ -53,8 +53,10 @@ jobs: --user - name: Install wheel run: python3 -m pip install wheel --user - - name: Build a binary wheel and a source tarball - run: python3 setup.py bdist_wheel + - name: Build a source tarball + run: python setup.py sdist + - name: Build a binary wheel + run: python3 setup.py bdist_wheel - name: Find the wheel created during pip install run: python3 -m pip cache dir From 8bd521f4040f91e9396601256417e8d95485f005 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Tue, 8 Oct 2024 00:07:21 +0100 Subject: [PATCH 54/62] update upload/download-artifact to v4 --- .github/workflows/pypi_build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pypi_build.yaml b/.github/workflows/pypi_build.yaml index 665ac5914..584ee2617 100644 --- a/.github/workflows/pypi_build.yaml +++ b/.github/workflows/pypi_build.yaml @@ -61,7 +61,7 @@ jobs: run: python3 -m pip cache dir - name: Store the distribution packages - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: python-package-distributions path: dist/ @@ -80,7 +80,7 @@ jobs: id-token: write # IMPORTANT: mandatory for trusted publishing steps: - name: Download all the dists - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: python-package-distributions path: dist/ From cdd24b639abdd45fe93230f76b153ae68c5dc634 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Tue, 8 Oct 2024 00:19:50 +0100 Subject: [PATCH 55/62] use older gcc version to improve compatibility --- .github/workflows/pypi_build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pypi_build.yaml b/.github/workflows/pypi_build.yaml index 584ee2617..fdbe7b123 100644 --- a/.github/workflows/pypi_build.yaml +++ b/.github/workflows/pypi_build.yaml @@ -37,7 +37,7 @@ jobs: - name: Set up GCC uses: egor-tensin/setup-gcc@v1 with: - version: 10 + version: 4.8 platform: x64 - name: Pre-Install dependencies run: | From 5ecf279d6089a07b25aaf584cbbe3cdf3c04f41c Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Tue, 8 Oct 2024 00:39:22 +0100 Subject: [PATCH 56/62] update gcc action to 4.8 --- .github/workflows/pypi_build.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pypi_build.yaml b/.github/workflows/pypi_build.yaml index fdbe7b123..9609b1c46 100644 --- a/.github/workflows/pypi_build.yaml +++ b/.github/workflows/pypi_build.yaml @@ -39,6 +39,7 @@ jobs: with: version: 4.8 platform: x64 + os: ubuntu-18.04 - name: Pre-Install dependencies run: | export QT_QPA_PLATFORM='offscreen' From bfdba813a96f2795373eb8d301ab79c427e34a17 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Tue, 8 Oct 2024 00:46:09 +0100 Subject: [PATCH 57/62] Update pypi_build.yaml --- .github/workflows/pypi_build.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pypi_build.yaml b/.github/workflows/pypi_build.yaml index 9609b1c46..df088aef2 100644 --- a/.github/workflows/pypi_build.yaml +++ b/.github/workflows/pypi_build.yaml @@ -21,7 +21,7 @@ jobs: create-pypi-image: name: >- Create .whl 🛞 from SHARPy distribution - runs-on: ubuntu-latest + runs-on: ubuntu-18.04 env: python-version-chosen: "3.10.8" permissions: @@ -39,7 +39,6 @@ jobs: with: version: 4.8 platform: x64 - os: ubuntu-18.04 - name: Pre-Install dependencies run: | export QT_QPA_PLATFORM='offscreen' From 1ec190a7488dfe9c58cab3b137e3e62ad5923394 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Tue, 8 Oct 2024 00:58:35 +0100 Subject: [PATCH 58/62] ubuntu bionic runner deprecated --- .github/workflows/pypi_build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pypi_build.yaml b/.github/workflows/pypi_build.yaml index df088aef2..715a88ebe 100644 --- a/.github/workflows/pypi_build.yaml +++ b/.github/workflows/pypi_build.yaml @@ -21,7 +21,7 @@ jobs: create-pypi-image: name: >- Create .whl 🛞 from SHARPy distribution - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 env: python-version-chosen: "3.10.8" permissions: @@ -37,7 +37,7 @@ jobs: - name: Set up GCC uses: egor-tensin/setup-gcc@v1 with: - version: 4.8 + version: 7 platform: x64 - name: Pre-Install dependencies run: | From 70bcd195a1172fce63189e06547c180f797933c1 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Wed, 9 Oct 2024 16:06:45 +0100 Subject: [PATCH 59/62] renaming pypi repo to be consistent with documentation https://ic-sharpy.readthedocs.io/ --- .github/workflows/pypi_build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pypi_build.yaml b/.github/workflows/pypi_build.yaml index 715a88ebe..c39115d99 100644 --- a/.github/workflows/pypi_build.yaml +++ b/.github/workflows/pypi_build.yaml @@ -75,7 +75,7 @@ jobs: runs-on: ubuntu-latest environment: name: pypi - url: https://pypi.org/p/icl_sharpy # Replace with your PyPI project name + url: https://pypi.org/p/ic_sharpy # Replace with your PyPI project name permissions: id-token: write # IMPORTANT: mandatory for trusted publishing steps: From 45ae5e511001f81d4c4df50c0ee5f2e0abe8e6f2 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Wed, 9 Oct 2024 16:07:36 +0100 Subject: [PATCH 60/62] pypi rename to ic-sharpy --- .github/workflows/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/readme.md b/.github/workflows/readme.md index f073f0000..f8762f531 100644 --- a/.github/workflows/readme.md +++ b/.github/workflows/readme.md @@ -25,6 +25,6 @@ image to the SHARPy packages. Therefore: ## Pypi (experimental!) One workflow with two jobs, the first creates and the second pushes the wheel -artifact to icl-sharpy @ pypi. Therefore: +artifact to ic-sharpy @ pypi. Therefore: * `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. From ddbf96ca668b6b50fe88a6a805635d7a4ca796e6 Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Wed, 9 Oct 2024 16:08:18 +0100 Subject: [PATCH 61/62] pypi rename to ic-sharpy --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index e77b487bc..500fb1bad 100644 --- a/setup.py +++ b/setup.py @@ -103,7 +103,7 @@ def run(self): long_description = f.read() run() setup( - name="icl_sharpy", # due to the name sharpy being taken on pypi + name="ic_sharpy", # due to the name sharpy being taken on pypi version=__version__, description="""SHARPy is a nonlinear aeroelastic analysis package developed at the Department of Aeronautics, Imperial College London. It can be used From 1c06e206ef50917f87f803117f1933230b6b375d Mon Sep 17 00:00:00 2001 From: kccwing <60852830+kccwing@users.noreply.github.com> Date: Wed, 9 Oct 2024 16:08:49 +0100 Subject: [PATCH 62/62] pypi rename to ic-sharpy --- docs/source/content/installation.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/source/content/installation.md b/docs/source/content/installation.md index c9b930fbb..f3223f168 100644 --- a/docs/source/content/installation.md +++ b/docs/source/content/installation.md @@ -305,15 +305,15 @@ python -m unittest ## Obtain SHARPy from PyPI (experimental!) -You can obtain a built version of SHARPy, icl-sharpy, from PyPI [here](https://pypi.org/project/icl-sharpy/). +You can obtain a built version of SHARPy, ic-sharpy, from PyPI [here](https://pypi.org/project/ic-sharpy/). To install at default directory use ``` -python3 -m pip install icl-sharpy +python3 -m pip install ic-sharpy ``` To install at current directory use ``` -python3 -m pip install --prefix . icl-sharpy +python3 -m pip install --prefix . ic-sharpy ``` The source code can be found at `/lib/python3.10/site-packages/sharpy` and the executable at `/bin/sharpy`.