Skip to content

Commit 9025f4b

Browse files
author
Lachlan Grose
committed
Merge branch 'master' into intrusions + black formatting
2 parents 77af24f + 20588c5 commit 9025f4b

File tree

113 files changed

+14035
-5107
lines changed

Some content is hidden

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

113 files changed

+14035
-5107
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 0 additions & 32 deletions
This file was deleted.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Bug report
2+
description: Create a bug report to help develop LoopStructural
3+
title: "[BUG] "
4+
labels: [bug]
5+
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Thanks for taking the time to fill out this bug report!
11+
- type: textarea
12+
attributes:
13+
label: Describe your issue
14+
validations:
15+
required: true
16+
- type: textarea
17+
attributes:
18+
label: Minimal reproducing code example
19+
description: "Include a minimal working example to demonstrate this code. Avoid using external datasets and extra dependencies"
20+
render: python
21+
validations:
22+
required: true
23+
- type: textarea
24+
attributes:
25+
label: Error message
26+
description: "Paste any error messages that your receive"
27+
render: shell
28+
# - type: input
29+
# attributes:
30+
# label: Versions
31+
# description: "Please run the following and paste the results:
32+
# `import sys, LoopStructural, lavavu, pandas, scipy, numpy; print(LoopStructural.__version__,sys.__version__,
33+
# lavavu.__version__,pandas.__version__,scipy.__version__,numpy.__version__)
34+
# validations:
35+
# required: true
36+
37+

.github/workflows/conda.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: publish_conda
22

33
on:
44
release:
5-
types: [created, edited]
5+
types: [edited, created]
66
jobs:
77
conda-deploy:
88
name: Uploading to Loop3d for python ${{ matrix.os }})
@@ -11,7 +11,7 @@ jobs:
1111
fail-fast: false
1212
matrix:
1313
os: ["ubuntu-latest", "windows-latest","macos-latest"]
14-
python-version: ["3.7"]
14+
python-version: ["3.9","3.8","3.7"]
1515
steps:
1616
- uses: conda-incubator/setup-miniconda@v2
1717
with:

.github/workflows/dockerimage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Publish Docker Hub
22
on:
33
release:
4-
types: [created]
4+
types: [edited,created]
55

66
jobs:
77
build:

.github/workflows/documentation.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,28 @@ name: Build documentation and deploy
22

33
on:
44
release:
5-
types: [created, edited]
5+
types: [edited, created]
66

77
jobs:
8-
flake8:
8+
documentation:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v2
12-
- uses: conda-incubator/setup-miniconda@v2
12+
- uses: conda-incubator/setup-miniconda@v2.0.0
1313
with:
1414
auto-activate-base: true
1515
installer-url: https://github.com/conda-forge/miniforge/releases/download/4.10.1-0/Miniforge-pypy3-4.10.1-0-Linux-x86_64.sh
1616
channels: anaconda,conda-forge,loop3d,conda-forge/label/cf202003
17-
python-version: 3.9
17+
python-version: 3.8
1818
- name: Build documentation
1919
shell: bash -l {0}
2020
env:
2121
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
2222
run: |
23-
conda install cython numpy scipy matplotlib -y
24-
conda install -c conda-forge theano -y
23+
conda install -c conda-forge theano cython numpy pandas imageio scipy matplotlib sphinx=3.5.4 sphinx-gallery sphinxcontrib-bibtex sphinx_rtd_theme myst-parser scikit-learn scikit-image pyamg flake8 pytest networkx -y
2524
pip install lavavu-osmesa
2625
python setup.py install build_ext --inplace
2726
cd docs
28-
pip install -r requirements.txt
29-
git-changelog -o changelog.md ../.
3027
make html
3128
3229
- name: Deploy 🚀

.github/workflows/python-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Python package build and publish
22

33
on:
44
release:
5-
types: [created, edited]
5+
types: [edited, created]
66

77
jobs:
88
build_wheels_macos:
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
name: release-please
6+
jobs:
7+
release-please:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: GoogleCloudPlatform/release-please-action@v2
11+
id: release
12+
with:
13+
release-type: python
14+
package-name: LoopStructural
15+
outputs:
16+
release_created: ${{ steps.release.outputs.release_created }}
17+
# if a release is created then run the deploy scripts for github.io, conda, pypi and docker
18+
documentation-deploy:
19+
runs-on: ubuntu-latest
20+
needs: release-please
21+
if: ${{ needs.release-please.outputs.release_created }}
22+
steps:
23+
- uses: actions/checkout@v2
24+
- uses: conda-incubator/setup-miniconda@v2.0.0
25+
with:
26+
auto-activate-base: true
27+
installer-url: https://github.com/conda-forge/miniforge/releases/download/4.10.1-0/Miniforge-pypy3-4.10.1-0-Linux-x86_64.sh
28+
channels: anaconda,conda-forge,loop3d,conda-forge/label/cf202003
29+
python-version: 3.8
30+
- name: Build documentation
31+
shell: bash -l {0}
32+
env:
33+
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
34+
run: |
35+
conda install -c conda-forge theano cython numpy pandas imageio scipy matplotlib sphinx=3.5.4 sphinx-gallery sphinxcontrib-bibtex sphinx_rtd_theme myst-parser scikit-learn scikit-image pyamg flake8 pytest networkx -y
36+
pip install lavavu-osmesa
37+
python setup.py install build_ext --inplace
38+
cd docs
39+
make html
40+
- name: Deploy 🚀
41+
uses: JamesIves/github-pages-deploy-action@4.1.3
42+
with:
43+
branch: gh-pages # The branch the action should deploy to.
44+
folder: docs/build/html # The folder the action should deploy.
45+
46+
conda-deploy:
47+
name: Uploading to Loop3d for python ${{ matrix.os }})
48+
needs: release-please
49+
if: ${{ needs.release-please.outputs.release_created }}
50+
runs-on: ${{ matrix.os }}
51+
strategy:
52+
fail-fast: false
53+
matrix:
54+
os: ["ubuntu-latest", "windows-latest","macos-latest"]
55+
python-version: ["3.9","3.8","3.7"]
56+
steps:
57+
- uses: conda-incubator/setup-miniconda@v2
58+
with:
59+
auto-update-conda: true
60+
python-version: ${{ matrix.python-version }}
61+
62+
- uses: actions/checkout@v2
63+
- name: update submodules
64+
# shell: bash -l {0}
65+
run: |
66+
git submodule update --init --recursive
67+
- name: Add msbuild to PATH
68+
if: matrix.os == 'windows-latest'
69+
uses: microsoft/setup-msbuild@v1.0.2
70+
- name: Conda build'
71+
env:
72+
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
73+
shell: bash -l {0}
74+
run: |
75+
conda install -c conda-forge conda-build scikit-build numpy=1.20 cython anaconda-client -y
76+
conda build -c anaconda -c conda-forge -c loop3d --output-folder conda conda
77+
conda install anaconda-client -y
78+
- name: upload windows
79+
env:
80+
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
81+
if: matrix.os == 'windows-latest'
82+
shell: bash -l {0}
83+
run: |
84+
anaconda upload --label main conda/win-64/*.tar.bz2
85+
- name: upload linux
86+
env:
87+
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
88+
if: matrix.os == 'ubuntu-latest'
89+
shell: bash -l {0}
90+
run: |
91+
anaconda upload --label main conda/linux-64/*.tar.bz2
92+
- name: upload macosx
93+
env:
94+
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
95+
if: matrix.os == 'macos-latest'
96+
shell: bash -l {0}
97+
run: |
98+
anaconda upload --label main conda/osx-64/*.tar.bz2
99+
docker-deploy:
100+
needs: release-please
101+
if: ${{ needs.release-please.outputs.release_created }}
102+
runs-on: ubuntu-latest
103+
steps:
104+
- uses: actions/checkout@master
105+
- name: Publish to Registry
106+
uses: elgohr/Publish-Docker-Github-Action@master
107+
with:
108+
name: loop3d/loopstructural
109+
username: ${{ secrets.DOCKERHUB_USERNAME }}
110+
password: ${{ secrets.DOCKERHUB_PASSWORD }}
111+
dockerfile: Dockerfile
112+
tags: "latest,${{ env.STATE_RELEASE_VERSION }}"
113+
114+
pypi-deploy:
115+
needs: release-please
116+
if: ${{ needs.release-please.outputs.release_created }}
117+
name: Build wheels
118+
runs-on: ${{ matrix.os }}
119+
strategy:
120+
matrix:
121+
os: [ubuntu-latest, windows-latest, macos-latest]
122+
steps:
123+
- uses: actions/checkout@v2
124+
125+
- name: Build wheels
126+
uses: joerick/cibuildwheel@v1.10.0
127+
env:
128+
CIBW_ARCHS_MACOS: x86_64 universal2
129+
CIBW_BUILD: "cp36-* cp37-* cp38-* cp39-*"
130+
CIBW_BEFORE_BUILD: "pip install numpy==1.18 cython" #make sure numpy is the same version as required by LS
131+
132+
- name: Publish wheels to PyPI
133+
env:
134+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
135+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
136+
run : |
137+
pip install twine
138+
python -m twine upload ./wheelhouse/*.whl

0 commit comments

Comments
 (0)