Skip to content

Commit

Permalink
Updated the docs to show how to configure external dataset services u…
Browse files Browse the repository at this point in the history
…sing the web admin instead of settings.py.
  • Loading branch information
swainn committed Jan 19, 2015
1 parent 008affd commit 22acc4f
Show file tree
Hide file tree
Showing 16 changed files with 176 additions and 158 deletions.
Binary file modified docs/_build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/_build/doctrees/getting_started/scaffold.doctree
Binary file not shown.
23 changes: 14 additions & 9 deletions docs/_build/html/_sources/getting_started/scaffold.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ To generate a new app using the scaffold, open a terminal, press :kbd:`CTRL-C` t

::

$ . /usr/lib/tethys/bin/activate
$ mkdir ~/tethysdev
$ cd ~/tethysdev
$ tethys scaffold my_first_app
$ . /usr/lib/tethys/bin/activate
(tethys) $ mkdir ~/tethysdev
(tethys) $ cd ~/tethysdev
(tethys) $ tethys scaffold my_first_app

The final command from the code block above is provided by the Tethys :doc:`../tethys_sdk/tethys_cli`. It will be prompt you to enter metadata about your app such as, proper name, version, author, and description. All of these metadata are optional and you can skip each item by pressing enter.

Expand All @@ -40,18 +40,19 @@ Now that you have a new Tethys app project, you need to install the app into Tet

::

$ cd ~/tethysdev/tethysapp-my_first_app
$ python setup.py develop
(tethys) $ cd ~/tethysdev/tethysapp-my_first_app
(tethys) $ python setup.py develop


View Your New App
=================

Use the :command:`tethys manage start` command to start up the development server:
Use start up the Tethys dockers and then the development server:

::

$ tethys manage start
(tethys) $ tethys docker start
(tethys) $ tethys manage start

Browse to `<http://127.0.0.1:8000/apps>`_. If all has gone well, you should see your app listed on the app library page. Exploring your new app won't take long, because there is only one page. Familiarize yourself with different parts of the app interface (see below).

Expand All @@ -62,7 +63,11 @@ Browse to `<http://127.0.0.1:8000/apps>`_. If all has gone well, you should see

.. tip::

To stop the development server press :kbd:`CTRL-C`.
To stop the development server press :kbd:`CTRL-C`. To stop the dockers run:

::

(tethys) $ tethys docker stop

Model View Controller
=====================
Expand Down
74 changes: 37 additions & 37 deletions docs/_build/html/genindex.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/_build/html/getting_started.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
</li>
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a><ul>
<li class="toctree-l2"><a class="reference internal" href="installation/linux.html">Installation on Linux</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation/mac.html">Installation on Mac OSX !</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation/mac.html">Installation on Mac OSX</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation/windows.html">Installation on Windows !</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation/web_admin_setup.html">Web Admin Setup</a></li>
</ul>
Expand Down
24 changes: 14 additions & 10 deletions docs/_build/html/getting_started/scaffold.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
</li>
<li class="toctree-l1"><a class="reference internal" href="../installation.html">Installation</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../installation/linux.html">Installation on Linux</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation/mac.html">Installation on Mac OSX !</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation/mac.html">Installation on Mac OSX</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation/windows.html">Installation on Windows !</a></li>
<li class="toctree-l2"><a class="reference internal" href="../installation/web_admin_setup.html">Web Admin Setup</a></li>
</ul>
Expand Down Expand Up @@ -189,10 +189,10 @@ <h1>Create a New Tethys App Project<a class="headerlink" href="#create-a-new-tet
<div class="section" id="generate-scaffold">
<h2>Generate Scaffold<a class="headerlink" href="#generate-scaffold" title="Permalink to this headline"></a></h2>
<p>To generate a new app using the scaffold, open a terminal, press <tt class="kbd docutils literal"><span class="pre">CTRL-C</span></tt> to stop the development server if it is still running, and execute the following commands:</p>
<div class="highlight-python"><div class="highlight"><pre>$ . /usr/lib/tethys/bin/activate
$ mkdir ~/tethysdev
$ cd ~/tethysdev
$ tethys scaffold my_first_app
<div class="highlight-python"><div class="highlight"><pre> $ . /usr/lib/tethys/bin/activate
(tethys) $ mkdir ~/tethysdev
(tethys) $ cd ~/tethysdev
(tethys) $ tethys scaffold my_first_app
</pre></div>
</div>
<p>The final command from the code block above is provided by the Tethys <a class="reference internal" href="../tethys_sdk/tethys_cli.html"><em>Command Line Interface</em></a>. It will be prompt you to enter metadata about your app such as, proper name, version, author, and description. All of these metadata are optional and you can skip each item by pressing enter.</p>
Expand All @@ -208,15 +208,16 @@ <h2>Generate Scaffold<a class="headerlink" href="#generate-scaffold" title="Perm
<div class="section" id="development-installation">
<h2>Development Installation<a class="headerlink" href="#development-installation" title="Permalink to this headline"></a></h2>
<p>Now that you have a new Tethys app project, you need to install the app into Tethys Platform. In a terminal, change into the <tt class="file docutils literal"><span class="pre">tethysapp-my_first_app</span></tt> directory and execute the <strong class="command">python setup.py develop</strong> command. Be sure to activate the Tethys <a class="reference internal" href="../glossary.html#term-python-virtual-environment"><em class="xref std std-term">Python virtual environment</em></a> if it is not already activated (see line 1 of the first code block):</p>
<div class="highlight-python"><div class="highlight"><pre>$ cd ~/tethysdev/tethysapp-my_first_app
$ python setup.py develop
<div class="highlight-python"><div class="highlight"><pre>(tethys) $ cd ~/tethysdev/tethysapp-my_first_app
(tethys) $ python setup.py develop
</pre></div>
</div>
</div>
<div class="section" id="view-your-new-app">
<h2>View Your New App<a class="headerlink" href="#view-your-new-app" title="Permalink to this headline"></a></h2>
<p>Use the <strong class="command">tethys manage start</strong> command to start up the development server:</p>
<div class="highlight-python"><div class="highlight"><pre>$ tethys manage start
<p>Use start up the Tethys dockers and then the development server:</p>
<div class="highlight-python"><div class="highlight"><pre>(tethys) $ tethys docker start
(tethys) $ tethys manage start
</pre></div>
</div>
<p>Browse to <a class="reference external" href="http://127.0.0.1:8000/apps">http://127.0.0.1:8000/apps</a>. If all has gone well, you should see your app listed on the app library page. Exploring your new app won&#8217;t take long, because there is only one page. Familiarize yourself with different parts of the app interface (see below).</p>
Expand All @@ -226,7 +227,10 @@ <h2>View Your New App<a class="headerlink" href="#view-your-new-app" title="Perm
</div>
<div class="admonition tip">
<p class="first admonition-title">Tip</p>
<p class="last">To stop the development server press <tt class="kbd docutils literal"><span class="pre">CTRL-C</span></tt>.</p>
<p>To stop the development server press <tt class="kbd docutils literal"><span class="pre">CTRL-C</span></tt>. To stop the dockers run:</p>
<div class="last highlight-python"><div class="highlight"><pre>(tethys) $ tethys docker stop
</pre></div>
</div>
</div>
</div>
<div class="section" id="model-view-controller">
Expand Down
Binary file modified docs/_build/html/objects.inv
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/_build/html/searchindex.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion docs/docs-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
django-tethys_datasets
django-tethys_apps
sphinxcontrib-napoleon
sphinxcontrib-napoleon
tethys_dataset_services
Binary file modified docs/images/site_admin/home.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions docs/installation/web_admin_setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,40 @@ d. Provide an endpoint to the 52 North WPS that is running in Docker. The endpoi

e. Press "Save" to save the WPS configuration.

3. Link to Dataset Services
---------------------------

Optionally, you may wish to link to external Dataset Services such as CKAN and HydroShare. Dataset Services can be used by apps a data stores and data sources. See :doc:`../tethys_sdk/dataset_services` documentation for how to use Dataset Services in apps. Complete the following steps for each dataset service you wish to link to:

a. Select "Dataset Services" from the options listed on the Tethys Portal Admin Console.

b. Click on the "Add Dataset Service" button to create a new link to the web processing service.

.. figure:: ../images/site_admin/dataset_services.png
:width: 600px
:align: center

**Figure 4.** Select the "Add Web Dataset Service" button.

c. Provide a unique name for the dataset service.

d. Select the appropriate engine and provide an endpoint to the Dataset Service. The endpoint is a URL pointing to the dataset serivce API. For example, the endpoint for a CKAN dataset service would be similar to this:

::

# CKAN Endpoint URL
http://www.example.com/api/3/action

If authentication is required, specify either the API Key or username or password as well. When you are done you will have something similar to this:

.. figure:: ../images/site_admin/dataset_service_edit.png
:width: 600px
:align: center

**Figure 5.** Fill out the form to register a new Dataset Service.

e. Press "Save" to save the Dataset Service configuration.


What's Next?
------------
Expand Down
22 changes: 11 additions & 11 deletions docs/tethys_sdk/dataset_service/base_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,35 +33,35 @@ Properties
Create Methods
==============

.. automethod:: tethys_datasets.base.DatasetEngine.create_dataset
.. automethod:: tethys_dataset_services.base.DatasetEngine.create_dataset

.. automethod:: tethys_datasets.base.DatasetEngine.create_resource
.. automethod:: tethys_dataset_services.base.DatasetEngine.create_resource

Read Methods
============

.. automethod:: tethys_datasets.base.DatasetEngine.get_dataset
.. automethod:: tethys_dataset_services.base.DatasetEngine.get_dataset

.. automethod:: tethys_datasets.base.DatasetEngine.get_resource
.. automethod:: tethys_dataset_services.base.DatasetEngine.get_resource

.. automethod:: tethys_datasets.base.DatasetEngine.search_datasets
.. automethod:: tethys_dataset_services.base.DatasetEngine.search_datasets

.. automethod:: tethys_datasets.base.DatasetEngine.search_resources
.. automethod:: tethys_dataset_services.base.DatasetEngine.search_resources

.. automethod:: tethys_datasets.base.DatasetEngine.list_datasets
.. automethod:: tethys_dataset_services.base.DatasetEngine.list_datasets


Update Methods
==============

.. automethod:: tethys_datasets.base.DatasetEngine.update_dataset
.. automethod:: tethys_dataset_services.base.DatasetEngine.update_dataset

.. automethod:: tethys_datasets.base.DatasetEngine.update_resource
.. automethod:: tethys_dataset_services.base.DatasetEngine.update_resource


Delete Methods
==============

.. automethod:: tethys_datasets.base.DatasetEngine.delete_dataset
.. automethod:: tethys_dataset_services.base.DatasetEngine.delete_dataset

.. automethod:: tethys_datasets.base.DatasetEngine.delete_resource
.. automethod:: tethys_dataset_services.base.DatasetEngine.delete_resource
2 changes: 1 addition & 1 deletion docs/tethys_sdk/dataset_service/ckan_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ CKAN Dataset Engine Reference

The following reference provides a summary the class used to define the ``CkanDatasetEngine`` objects.

.. autoclass:: tethys_datasets.engines.CkanDatasetEngine
.. autoclass:: tethys_dataset_services.engines.CkanDatasetEngine
:members:
2 changes: 1 addition & 1 deletion docs/tethys_sdk/dataset_service/hydroshare_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ HydroShare Dataset Engine Reference !

The following reference provides a summary the class used to define the ``HydroShareDatasetEngine`` objects.

.. autoclass:: tethys_datasets.engines.HydroShareDatasetEngine
.. autoclass:: tethys_dataset_services.engines.HydroShareDatasetEngine
:members:

0 comments on commit 22acc4f

Please sign in to comment.