Skip to content

Commit

Permalink
Merge branch 'release/3.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
rajadain committed Jul 12, 2024
2 parents 3085567 + e6b5ca5 commit 99a7051
Show file tree
Hide file tree
Showing 11 changed files with 108 additions and 55 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: ci

on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]

env:
RWD_DATA: /tmp/rwd

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Create empty folder for RWD_DATA
run: |
mkdir -p $RWD_DATA
- name: Build image
run: |
./scripts/update.sh
52 changes: 52 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: release

on:
push:
tags: "*"

env:
REGISTRY: ghcr.io
IMAGE_NAME: WikiWatershed/rwd

jobs:
release:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write
attestations: write
id-token: write

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

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

- name: Build and push
id: push
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
27 changes: 0 additions & 27 deletions .travis.yml

This file was deleted.

15 changes: 0 additions & 15 deletions .travis/deploy.sh

This file was deleted.

5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 3.0.0

- Change base image to TauDEM 5.3.8-xenial, to be built on Ubuntu 16.04 instead
of 14.04. Also update to latest supported Python 2.7.

## 2.0.0
- Instead of returning a geojson FeatureCollection with
a single Feature for the watershed and input_pt output,
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/wikiwatershed/taudem:5.3.8
FROM ghcr.io/wikiwatershed/taudem:5.3.8-xenial

MAINTAINER Azavea <[email protected]>

Expand Down
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@

A docker image and fork of @nazmussazib's [Rapid Watershed Delineation](https://github.com/nazmussazib/RapidWatersheDelineation) project, for use in [Model My Watershed](https://github.com/WikiWatershed/model-my-watershed).

[![Travis CI](https://api.travis-ci.org/WikiWatershed/rapid-watershed-delineation.svg "Build Status on Travis CI")](https://travis-ci.org/WikiWatershed/rapid-watershed-delineation/)
[![Docker Repository on Quay.io](https://quay.io/repository/wikiwatershed/rwd/status "Docker Repository on Quay.io")](https://quay.io/repository/wikiwatershed/rwd)
[![Docker Repository on GitHub Container Registry](https://ghcr-badge.egpl.dev/WikiWatershed/rwd/latest_tag?color=%2344cc11&ignore=sha256*&label=version)](https://github.com/WikiWatershed/rapid-watershed-delineation/pkgs/container/rwd)
[![Apache V2 License](https://img.shields.io/badge/license-Apache%20V2-blue.svg)](https://github.com/wikiwatershed/rapid-watershed-delineation/blob/develop/LICENSE)

### Quick Start

```
docker run --rm -ti ghcr.io/wikiwatershed/rwd
```

### Getting started
* Define environment variables (see below)
* Run `./scripts/update.sh`
Expand Down Expand Up @@ -69,12 +74,8 @@ To create a new release, use the following git commands:
$ git flow release start 0.1.0
$ vim CHANGELOG.md
$ vim setup.py
$ vim src/api/main.py
$ git add CHANGELOG.md setup.py src/api/main.py
$ git commit -m "0.1.0"
$ git flow release publish 0.1.0
$ git flow release finish 0.1.0
$ git push --tags
$ git flow release finish -p 0.1.0
```

Afterward, push your `develop` and `master` branches to remote using:
Expand Down
3 changes: 1 addition & 2 deletions scripts/console.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ fi

set -x

docker-compose run \
docker compose run \
--rm \
-e RWD_DATA=$RWD_DATA \
--entrypoint /bin/bash \
app
7 changes: 6 additions & 1 deletion scripts/server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

set -e

if [ -z "$RWD_DATA" ]; then
echo "Environment variable RWD_DATA not defined."
exit 1
fi

echo "Run the RWD Docker container."

set -x

docker-compose up
docker compose up
7 changes: 6 additions & 1 deletion scripts/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

set -e

if [ -z "$RWD_DATA" ]; then
echo "Environment variable RWD_DATA not defined."
exit 1
fi

echo "Build the RWD Docker container."

set -x

docker-compose build
docker compose build
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

setup(
name='rapid_watershed_delineation',
version='2.0.0',
version='3.0.0',
description='A Python implementation of Rapid Watershed Delineation.',
long_description=long_description,
url='https://github.com/WikiWatershed/rapid-watershed-delineation',
Expand Down

0 comments on commit 99a7051

Please sign in to comment.