Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

Commit

Permalink
Merge pull request #14 from cp4cds/issue-13-project-layout
Browse files Browse the repository at this point in the history
Fix #13: update project layout using cookiecutter template
  • Loading branch information
cehbrecht committed Jun 20, 2018
2 parents 4d64ce5 + 8f4c202 commit 0a55aac
Show file tree
Hide file tree
Showing 100 changed files with 1,502 additions and 2,843 deletions.
4 changes: 4 additions & 0 deletions .codacy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
exclude_paths:
- 'tests/**'
- 'docs/source/conf.py'
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.git
custom.cfg
docs/
tests/
3 changes: 0 additions & 3 deletions .env

This file was deleted.

6 changes: 6 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Contributing

Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.

Please read the Birdhouse [Contributer Guide](http://birdhouse.readthedocs.io/en/latest/contributing.html)
and the [Cookiecutter Documentation](http://copernicus.readthedocs.io/en/latest/) to get started.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## Description

Describe what you were trying to get done or your feature request.

## Environment

* copernicus-wps-demo version used, if any:
* Python version, if any:
* Operating System:

## Steps to Reproduce

```
Paste the command(s) you ran and the output.
```

## Additional Information

Links to other issues or sources.
13 changes: 13 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Overview

This PR fixes [issue id]

Changes:

* Added ...

## Related Issue / Discussion

## Additional Information

Links to other issues or sources.
11 changes: 6 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
# Docker
#Dockerfile

# custom configs
# PyWPS
custom.cfg
Makefile.config
.custom.cfg
*.pid

# Python / Extensions etc.
*~
Expand All @@ -22,12 +23,13 @@ __pycache__

# Unit test / Coverage reports
.cache
.pytest_cache
.coverage
.tox
nosetests.xml
unit_tests/testdata.json

# R
# R
*.Rhistory

# Eclipse / PyDev
Expand Down Expand Up @@ -67,6 +69,7 @@ docs/build/

# External Sources
#src/external
src/

# tests
*.log
Expand All @@ -81,5 +84,3 @@ testdata.json
*.a
*.mod
*.out


39 changes: 27 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,36 @@
language: python
branches:
only:
- master
- develop
python:
- "2.7"
# - "2.7"
- "3.6"
os:
- linux
# - osx
allow_failures:
- env: PYTHON=2.7
sudo: false
install:
- make install
- make start
# Python 3.x is default
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
# Useful for debugging any issues with conda
- conda info -a
# Prepare env with Python version
- conda create -n copernicus python=$TRAVIS_PYTHON_VERSION
# Update now the env with our environment
- conda env update -f environment.yml
- source activate copernicus
# Packages for testing
- conda install pytest flake8
# Install Emu WPS
- python setup.py install
before_script:
- sleep 5
# Start WPS service on port 5000 on 0.0.0.0
- copernicus start --daemon --bind-host 0.0.0.0 --port 5000
- sleep 2
script:
- make testall
- make pep8
#after_success:
# - coveralls
- pytest
- flake8
13 changes: 13 additions & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
=======
Credits
=======

Development Lead
----------------

* Carsten Ehbrecht <ehbrecht@dkrz.de>

Contributors
------------

None yet. Why not be the first?
33 changes: 2 additions & 31 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,36 +1,7 @@
Changes
*******

0.2.2 (2018-06-18)
0.3.0 (2018-06-18)
==================

* Added WPS client examples (#7).
* Added WPS client examples with x509 certificate (#10).

0.2.1 (2018-02-08)
==================

* fixed ncl installation (#3).
* added demo service using werkzeug.

0.2.0 (2018-02-06)
==================

* using ESMValTool 2.x
* diag list: mydiag and py_demo

0.1.1 (2018-01-29)
==================

* cleaned up Dockerfile.
* added pscopg2 for postgres.
* updated pywps recipe 0.9.3.
* added workaround for broken ncl conda package.
* updated Readme with birdy examples.

0.1.0 (2017-06-06)
==================

* added tutorial diagnostics from esmvaltool (MyDiag, Overview, timeseriesplot).
* timeseriesplot both added with a generic wps profile (opendap, netcdf) and with esgf search facets.
* added NCL coutour plot with opendap and netcdf input.
* First release.
63 changes: 24 additions & 39 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,48 +1,33 @@
# vim:set ft=dockerfile:
FROM debian:latest
MAINTAINER https://github.com/cp4cds/copernicus-wps-demo
FROM continuumio/miniconda3
MAINTAINER https://github.com/cp4cds/copernicus
LABEL Description="copernicus-wps-demo WPS" Vendor="Birdhouse" Version="0.3.0"

LABEL Description="copernicus-wps-demo application" Vendor="CP4CDS" Version="0.2.2"
# Update Debian system
RUN apt-get update && apt-get install -y \
build-essential \
&& rm -rf /var/lib/apt/lists/*

# Configure hostname and ports for services
ENV HTTP_PORT 8080
#ENV HTTPS_PORT 8443
ENV OUTPUT_PORT 8000
ENV HOSTNAME localhost
# Update conda
RUN conda update -n base conda

# Set current home
ENV HOME /root
# Copy WPS project
COPY . /opt/wps

# Copy application sources
COPY . /opt/birdhouse/src/copernicus-wps-demo
WORKDIR /opt/wps

# cd into application
WORKDIR /opt/birdhouse/src/copernicus-wps-demo
# Create conda environment
RUN conda env create -n wps -f environment.yml

# Provide custom.cfg with settings for docker image
RUN printf "[buildout]\nextends=profiles/docker.cfg" > custom.cfg
# Install WPS
RUN ["/bin/bash", "-c", "source activate wps && python setup.py develop"]

# Install system dependencies
RUN bash bootstrap.sh -i && bash requirements.sh
# Start WPS service on port 5000 on 0.0.0.0
EXPOSE 5000
ENTRYPOINT ["/bin/bash", "-c"]
CMD ["source activate wps && exec emu start -b 0.0.0.0 -config /opt/wps/etc/demo.cfg"]

# Set conda enviroment
ENV ANACONDA_HOME /opt/conda
ENV CONDA_ENVS_DIR /opt/conda/envs

# Run install and fix permissions
RUN make clean install && chmod 755 /opt/birdhouse/etc && chmod 755 /opt/birdhouse/var/run

# Volume for data, cache, logfiles, ...
#VOLUME /opt/birdhouse/var/lib
#VOLUME /opt/birdhouse/var/log
# Volume for configs
#VOLUME /opt/birdhouse/etc

# Ports used in birdhouse
EXPOSE $HTTP_PORT $OUTPUT_PORT

# Start supervisor in foreground
ENV DAEMON_OPTS --nodaemon

# Start service ...
CMD ["make", "update-config", "start"]
# docker build -t cp4cds/copernicus .
# docker run -p 5000:5000 cp4cds/copernicus
# http://localhost:5000/wps?request=GetCapabilities&service=WPS
# http://localhost:5000/wps?request=DescribeProcess&service=WPS&identifier=all&version=1.0.0
Loading

0 comments on commit 0a55aac

Please sign in to comment.