Skip to content

Commit

Permalink
bump version to 1.0 for release
Browse files Browse the repository at this point in the history
  • Loading branch information
piyueh committed Jun 8, 2021
1 parent 696068e commit 8cea675
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 4 deletions.
76 changes: 76 additions & 0 deletions Singularityfiles/Singularity.v1.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# multi-stage build: builder
# ==========================
Bootstrap: docker
From: ubuntu:focal
Stage: builder

%environment
export MPLBACKEND=agg

%post
# prepare environment
ln -snf /usr/share/zoneinfo/UTC /etc/localtime
echo UTC > /etc/timezone
apt update && apt -y full-upgrade
apt install -y --no-install-recommends git ca-certificates gfortran python3 python3-pip

# requires users to provide variable ${VER}
git clone --branch v1.0 --recurse-submodules https://github.com/barbagroup/geoclaw-landspill.git

# install dependencies
cd /geoclaw-landspill && pip3 install -r requirements-build.txt

# build binary wheel
cd /geoclaw-landspill && python3 setup.py bdist_wheel --build-type RELEASE


# multi-stage build: production
# =============================
Bootstrap: docker
From: ubuntu:focal
Stage: production

%labels
Author Pi-Yueh Chuang (pychuang@gwu.edu)
Version v1.0

# copy data from builder
%files from builder
/geoclaw-landspill/dist /root/dist
/geoclaw-landspill/cases /root/cases

%post
# move example to a proper location
mv /root/cases /opt/geoclaw-landspill-cases

# create runtime environment
ln -snf /usr/share/zoneinfo/UTC /etc/localtime && echo UTC > /etc/timezone
apt update && apt -y full-upgrade
apt install -y --no-install-recommends libgfortran5 libgomp1 python3 python3-pip
rm -rf /var/lib/apt/lists/*

# install geoclaw-landspill
echo $(find /root -name "*.whl")
pip3 install $(find /root -name "*.whl") && rm -rf /root/*

%runscript
exec geoclaw-landspill $@

%help

This help only covers the usage of this Singularity image. For the usage of
geoclaw-landspill package, see https://github.com/barbagroup/geoclaw-landspill

A Singularity image can be treated as an executable, which is equivalent to
the executable `geoclaw-landspill` from geoclaw-landspill package. Assuming
this Singularity image is called "landspill.sif", for example:

* To run a simulation: `$ landspill.sif run <path to case>`
* To create a NetCDF file: `$ landspill.sif createnc <path to case>`
* To create quick depth plots: `$ landspill.sif plotdepth <path to case>`

Alternatively, users can run these subcommands with, for example,

* To run a simulation: `$ singularity run landspill.sif run <path to case>`
* To create a NetCDF file: `$ singularity run landspill.sif createnc <path to case>`
* To create quick depth plots: `$ singularity run landspill.sif plotdepth <path to case>`
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
"keywords": "geoclaw, overland-flow, pipeline, shallow-water-equations, pipeline-ruptures, land-spill",
"license": "BSD 3-Clause",
"title": "geoclaw-landspill",
"version": "v1.0.dev4"
"version": "v1.0"
}
4 changes: 2 additions & 2 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{% set name = "geoclaw-landspill" %}
{% set version = "1.0.dev4" %}
{% set version = "1.0" %}

package:
name: "{{ name|lower }}"
version: "{{ version }}"

source:
url: "https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz"
sha256: fc37a636e97327fcb13d4a94d55575beaa0cf4baf50ba7fadef074a8e6f93d6f
sha256: 325585e9783fc326a441c93349e7603fe8e875f289ecfb9698a592e5ab84f028

build:
number: 0
Expand Down
2 changes: 1 addition & 1 deletion gclandspill/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
from . import data

# meta
__version__ = "1.0.dev4"
__version__ = "1.0"
__author__ = "Pi-Yueh Chuang <pychuang@gwu.edu>"

0 comments on commit 8cea675

Please sign in to comment.