From e5f52aaf1577ef43dfa7261001503d91fd7ec88f Mon Sep 17 00:00:00 2001 From: Carsten Ehbrecht Date: Mon, 2 Oct 2017 20:17:21 +0200 Subject: [PATCH] updated tutorial --- docs/source/index.rst | 2 +- docs/source/pywps/clients.rst | 19 +++++++++-------- docs/source/pywps/installation.rst | 9 ++++++++ docs/source/pywps/logging.rst | 5 ++--- docs/source/pywps/testing.rst | 34 ++++++++++++------------------ docs/source/requirements/conda.rst | 1 + 6 files changed, 36 insertions(+), 34 deletions(-) diff --git a/docs/source/index.rst b/docs/source/index.rst index 83a11cb..590c83a 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -14,9 +14,9 @@ workshop you will learn how Birdhouse supports this development cycle. :maxdepth: 2 :caption: Contents: + quick motivation requirements - quick basics pywps birds diff --git a/docs/source/pywps/clients.rst b/docs/source/pywps/clients.rst index 88c902e..2714d9f 100644 --- a/docs/source/pywps/clients.rst +++ b/docs/source/pywps/clients.rst @@ -17,7 +17,7 @@ Activate the conda workshop enviroment: Aim --- -We are going to write use howto use a WPS client. +We are going to use a WPS client. Objectives: @@ -33,14 +33,14 @@ Install it via conda: .. code-block:: bash - $ conda install -c birdhouse birdhouse-birdy + $ conda install -c birdhouse -c conda-forge birdhouse-birdy Start the demo WPS service: .. code-block:: bash # go to the workshop root folder - $ cd birdhouse-workshop/ + $ cd ~/birdhouse-workshop/ # start wps service $ python demo/demo.py @@ -102,17 +102,20 @@ with Open Geospatial Consortium (OGC) web service (hence OWS), like WMS, CSW and We are using an Jupyter notebook to look at some example code. +.. todo:: + Add ssh tunnel or jupyter console example. + We need to install `Jupyter `_ via conda: .. code-block:: bash - $ conda install jupyter + $ conda install -c conda-forge jupyter Go to the tutorials folder ``pywps_clients``: .. code-block:: bash - $ cd tutorials/pywps_clients + $ cd ~/birdhouse-workshop/tutorials/13_pywps_clients You will find there an Jupyter notebook: @@ -157,7 +160,5 @@ Excercise 2 Links ----- -Notebooks, tutorials ... - -https://try.jupyter.org/ -https://nbviewer.jupyter.org/ +* https://try.jupyter.org/ +* https://nbviewer.jupyter.org/ diff --git a/docs/source/pywps/installation.rst b/docs/source/pywps/installation.rst index f52920c..4de10e7 100644 --- a/docs/source/pywps/installation.rst +++ b/docs/source/pywps/installation.rst @@ -50,6 +50,9 @@ Start the demo WPS service This workshop includes a demo service with some example processes. Let's try them. +.. todo:: + Make port of pywps demo service configurable. + Start the service by running the following command: .. code-block:: bash @@ -72,6 +75,12 @@ Service check To test the service, open your internet browser to this address: http://127.0.0.1:5000/wps. +Alternatively, you can also try ``curl``: + +.. code-block:: bash + + $ curl "http://127.0.0.1:5000/wps" + You will get an XML exception report by the PyWPS service: .. code-block:: xml diff --git a/docs/source/pywps/logging.rst b/docs/source/pywps/logging.rst index 665a2ea..3e610ce 100644 --- a/docs/source/pywps/logging.rst +++ b/docs/source/pywps/logging.rst @@ -70,7 +70,7 @@ Change into the tutorials folder ``pywps_logging``: .. code-block:: bash - $ cd tutorials/pywps_logging + $ cd ~/birdhouse-workshop/tutorials/12_pywps_logging It contains a ``pywps.cfg`` file with a logging section. You can overwrite the default PyWPS configration by starting the PyWPS service @@ -99,5 +99,4 @@ Add some ``logging`` statements and monitor the service. Links ----- -Notebooks, tutorials ... -https://github.com/PyWPS/pywps-workshop/blob/master/04-Logging.md +* `PyWPS workshop `_ diff --git a/docs/source/pywps/testing.rst b/docs/source/pywps/testing.rst index bcd45ea..b8419b9 100644 --- a/docs/source/pywps/testing.rst +++ b/docs/source/pywps/testing.rst @@ -46,10 +46,12 @@ Important question: Why ``-q``, ``-O -`` and ``"`` in the comnand: curl ---- +.. todo:: + Add curl example -XML Request using Poster ------------------------- +XML Request using RESTClient +---------------------------- As requests and data become more structure and lengthy, concatenating all parameters into a URL for a GET type request becomes difficult or impossible. @@ -57,29 +59,20 @@ For this reason the WPS standard allows the definition of requests as XML docume sent to the server using the POST method of the HTTP protocol. It is also possible to use wget (or curl) for POST requests but then the -command line because to extensive. - -Poster is an add-on for various popular web browsers that allows the creation and execution of HTTP POST requests. - -Works on Chromium: +command line becomes to extensive. -https://chrome.google.com/webstore/detail/chrome-poster/cdjfedloinmbppobahmonnjigpmlajcd - - -Prepare GET and POST example. +Works only on Firefox: -http://geoprocessing.info/wpsdoc/1x0ExecutePOST -http://wiki.ieee-earth.org/Documents/GEOSS_Tutorials/GEOSS_Provider_Tutorials/Web_Processing_Service_Tutorial_for_GEOSS_Providers/Section_2%3a_Introduction_to_WPS +http://restclient.net/ +.. todo:: -XML Request using RESTClient ----------------------------- + Prepare GET and POST example. -Works only on Firefox: + http://geoprocessing.info/wpsdoc/1x0ExecutePOST -http://restclient.net/ + http://wiki.ieee-earth.org/Documents/GEOSS_Tutorials/GEOSS_Provider_Tutorials/Web_Processing_Service_Tutorial_for_GEOSS_Providers/Section_2%3a_Introduction_to_WPS -Prepare GET and POST example. Exceptions @@ -127,6 +120,5 @@ Try ``wget`` with some of the previouse *DescribeProcess* and *Execute* requests Links ----- -Notebooks, tutorials ... - -https://github.com/PyWPS/pywps-workshop/blob/master/03-Testing.md +* `Poster on Chrome `_ +* `PyWPS workshop `_ diff --git a/docs/source/requirements/conda.rst b/docs/source/requirements/conda.rst index 3b9b99a..b7245d2 100644 --- a/docs/source/requirements/conda.rst +++ b/docs/source/requirements/conda.rst @@ -27,6 +27,7 @@ Installation .. note:: If you already have Conda/Anaconda installed, you can use it in this workshop. + See: :ref:`dkrz`. .. note:: You don't need admin rights to install conda and conda packages.