-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into dataserver-refactor
- Loading branch information
Showing
135 changed files
with
21,549 additions
and
12,576 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: build and push docker | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*.*.*' | ||
branches: | ||
- build-docker-image | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v4 | ||
- | ||
name: Decide the docker image version number | ||
run: | | ||
if [[ -f ./docker/build-docker-image-version.txt ]]; then | ||
echo "DOCKER_IMAGE_TAG=$( tail -n 1 ./docker/build-docker-image-version.txt )" >> $GITHUB_ENV | ||
else | ||
echo "DOCKER_IMAGE_TAG=${{ github.ref_name }}" >> $GITHUB_ENV | ||
fi | ||
echo ${{ env.DOCKER_IMAGE_TAG }} | ||
- | ||
name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- | ||
name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- | ||
name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- | ||
name: Build and push gplately amd64 | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: ./docker/Dockerfile | ||
push: true | ||
platforms: linux/amd64 | ||
provenance: false | ||
tags: | | ||
gplates/gplately:amd64-${{ env.DOCKER_IMAGE_TAG }} | ||
ghcr.io/gplates/gplately:amd64-${{ env.DOCKER_IMAGE_TAG }} | ||
- | ||
name: Build and push gplately arm64 | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: ./docker/Dockerfile | ||
push: true | ||
platforms: linux/arm64 | ||
provenance: false | ||
tags: | | ||
gplates/gplately:arm64-${{ env.DOCKER_IMAGE_TAG }} | ||
ghcr.io/gplates/gplately:arm64-${{ env.DOCKER_IMAGE_TAG }} | ||
- | ||
name: Create cross-platform images | ||
run: | | ||
docker buildx imagetools create -t gplates/gplately:${{ env.DOCKER_IMAGE_TAG }} gplates/gplately:amd64-${{ env.DOCKER_IMAGE_TAG }} gplates/gplately:arm64-${{ env.DOCKER_IMAGE_TAG }} | ||
docker buildx imagetools create -t ghcr.io/gplates/gplately:${{ env.DOCKER_IMAGE_TAG }} ghcr.io/gplates/gplately:amd64-${{ env.DOCKER_IMAGE_TAG }} ghcr.io/gplates/gplately:arm64-${{ env.DOCKER_IMAGE_TAG }} | ||
- | ||
name: Create the latest tags | ||
if: | ||
run: | | ||
if [[ -f ./docker/build-docker-image-version.txt ]]; then | ||
docker buildx imagetools create -t gplates/gplately:latest gplates/gplately:amd64-${{ env.DOCKER_IMAGE_TAG }} gplates/gplately:arm64-${{ env.DOCKER_IMAGE_TAG }} | ||
docker buildx imagetools create -t ghcr.io/gplates/gplately:latest ghcr.io/gplates/gplately:amd64-${{ env.DOCKER_IMAGE_TAG }} ghcr.io/gplates/gplately:arm64-${{ env.DOCKER_IMAGE_TAG }} | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,59 @@ | ||
|
||
name: Build docs and deploy to GitHub Pages | ||
|
||
on: | ||
on: | ||
push: | ||
branches: [master] | ||
branches: | ||
- master | ||
pull_request: | ||
branches: [master] | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-20.04 | ||
|
||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
if: github.event.pull_request.draft == false | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install flake8 pytest pdoc3 | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
sudo apt-get update | ||
sudo apt-get install -yq wget libboost-python-dev libboost-program-options-dev libgdal-dev libglew-dev libglu1-mesa libproj-dev libqt5core5a libqt5gui5 libqt5network5 libqt5opengl5 libqt5svg5 libqt5widgets5 libqt5xml5 libqt5xmlpatterns5 libqwt-qt5-6 | ||
wget https://www.earthbyte.org/webdav/ftp/earthbyte/pygplates/pygplates-py3_rev33_ubuntu-20.04-amd64.deb -O pygplates_package.deb | ||
yes | sudo dpkg -i pygplates_package.deb | ||
- name: Install jupyter with nbconvert | ||
run: | | ||
pip install jupyter | ||
- name: Install gplately | ||
run: | | ||
pip install . | ||
- name : Generate documentation with pdoc3 | ||
run : | | ||
export PYTHONPATH=$PYTHONPATH:/usr/lib/ | ||
export LD_PRELOAD=/lib/x86_64-linux-gnu/libstdc++.so.6:$LD_PRELOAD | ||
pdoc --config latex_math=True --template-dir .pdoc_template --html -o api --force gplately | ||
- name: Convert jupyter notebooks to html | ||
run : | | ||
export PYTHONPATH=$PYTHONPATH:/usr/lib/ | ||
export LD_PRELOAD=/lib/x86_64-linux-gnu/libstdc++.so.6:$LD_PRELOAD | ||
jupyter-nbconvert --to=html --output-dir=api/gplately/ Notebooks/*.ipynb | ||
- name : Deploy to gh-pages | ||
uses: JamesIves/github-pages-deploy-action@v4.2.2 | ||
with: | ||
branch: gh-pages | ||
folder: api/gplately/ | ||
- uses: actions/checkout@v4 | ||
- uses: mamba-org/setup-micromamba@v1 | ||
with: | ||
micromamba-version: "1.5.8-0" | ||
environment-file: conda/doc-env.yml | ||
init-shell: >- | ||
bash | ||
cache-environment: true | ||
post-cleanup: "all" | ||
|
||
- name: Install current gplately | ||
run: | | ||
pip install . --no-binary :all: --no-cache-dir --no-dependencies | ||
- name: test pygmt | ||
run: python -c "import pygmt" | ||
shell: bash -el {0} | ||
|
||
- name: test jupyter-nbconvert | ||
run: jupyter-nbconvert --version | ||
shell: bash -el {0} | ||
|
||
- name: test pdoc | ||
run: pdoc --version | ||
shell: bash -el {0} | ||
|
||
- name: Generate documentation with pdoc3 | ||
run: pdoc --config latex_math=True --template-dir .pdoc_template --html -o api --force gplately | ||
shell: bash -el {0} | ||
|
||
- name: Convert jupyter notebooks to html | ||
run: jupyter-nbconvert --to=html --output-dir=api/gplately/ Notebooks/*.ipynb | ||
shell: bash -el {0} | ||
|
||
- name: Deploy to gh-pages | ||
uses: JamesIves/github-pages-deploy-action@v4.2.2 | ||
with: | ||
branch: gh-pages | ||
folder: api/gplately/ | ||
target-folder: dev-doc/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,5 @@ __pycache__ | |
.ipynb_checkpoints | ||
|
||
output | ||
|
||
*.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"editor.formatOnSave": true, | ||
"editor.defaultFormatter": "ms-python.black-formatter", | ||
"[python]": { | ||
"editor.defaultFormatter": "ms-python.black-formatter" | ||
}, | ||
"git.ignoreLimitWarning": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include gplately/logging_config.yaml |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.