Преглед на файлове

Updated docs - changed markdown to rst.

nuwan_ag преди 10 години
родител
ревизия
969b541dec
променени са 5 файла, в които са добавени 86 реда и са изтрити 59 реда
  1. 0 37
      README.md
  2. 63 0
      README.rst
  3. 3 0
      docs/.gitignore
  4. 17 16
      docs/conf.py
  5. 3 6
      docs/index.rst

+ 0 - 37
README.md

@@ -1,37 +0,0 @@
-# cloudbridge
-cloudbridge provides a layer of abstraction over different cloud providers.
-It's a straightfoward implementation of the [bridge pattern](https://en.wikipedia.org/wiki/Bridge_pattern).
-
-[![Code Climate](https://codeclimate.com/github/gvlproject/libcloudbridge/badges/gpa.svg)](https://codeclimate.com/github/gvlproject/cloudbridge)
-[![Code Health](https://landscape.io/github/gvlproject/cloudbridge/master/landscape.svg?style=flat)](https://landscape.io/github/gvlproject/cloudbridge/master)
-[![Coverage Status](https://coveralls.io/repos/gvlproject/cloudbridge/badge.svg?branch=master&service=github)](https://coveralls.io/github/gvlproject/cloudbridge?branch=master)
-[![Build Status](https://travis-ci.org/gvlproject/cloudbridge.svg?branch=master)](https://travis-ci.org/gvlproject/cloudbridge)
-[![Release Status](https://img.shields.io/pypi/status/cloudbridge.svg)](https://pypi.python.org/pypi/cloudbridge/)
-
-Usage example
-```python
-from cloudbridge.providers.interfaces import CloudProviderFactory
-from bunch import Bunch
-
-config = Bunch(access_key='a_key',
-               secret_key='s_key')
-
-provider = CloudProviderFactory().create_provider(ProviderList.AWS, config)
-print(provider.security.list_key_pairs())
-```
-
-### Running tests
-To run the test suite locally, install [tox](https://tox.readthedocs.org/en/latest/)
-with `pip install tox` and run `tox` command. This will run all the tests for
-all the environments defined in file `tox.ini`. In order to properly run the
-tests, you should have all the environment variables listed in
-`tox.ini` file (under `passenv`) exported.
-
-If you’d like to run the tests on a specific environment only, use a command
-like this: `tox -e py27` (or ``python setup.py test`` directly). If you'd
-like to run the tests for a specific cloud only, you should export env var
-``CB_TEST_PROVIDER`` and specify the desired provider name (e.g., ``aws`` or
-``openstack``) and then run the ``tox`` command.
-
-Note that running the tests will create various cloud resources, for which you
-may incur costs.

+ 63 - 0
README.rst

@@ -0,0 +1,63 @@
+cloudbridge
+===========
+
+cloudbridge provides a layer of abstraction over different cloud providers.
+It's a straightfoward implementation of the `bridge pattern`_.
+
+.. image:: https://codeclimate.com/github/gvlproject/cloudbridge/badges/gpa.svg
+   :target: https://codeclimate.com/github/gvlproject/cloudbridge
+   :alt: Code Climate
+
+.. image:: https://landscape.io/github/gvlproject/cloudbridge/master/landscape.svg?style=flat
+   :target: https://landscape.io/github/gvlproject/cloudbridge/master
+   :alt: Landscape Code Health
+
+.. image:: https://coveralls.io/repos/gvlproject/cloudbridge/badge.svg?branch=master&service=github
+   :target: https://coveralls.io/github/gvlproject/cloudbridge?branch=master
+   :alt: Code Coverage
+
+.. image:: https://travis-ci.org/gvlproject/cloudbridge.svg?branch=master
+   :target: https://travis-ci.org/gvlproject/cloudbridge
+   :alt: Travis Build Status
+
+.. image:: https://img.shields.io/pypi/status/cloudbridge.svg
+   :target: https://pypi.python.org/pypi/cloudbridge/
+   :alt: latest version available on PyPI
+
+Usage example
+~~~~~~~~~~~~~
+
+The simplest possible example for doing something useful with cloudbridge would
+look like the following.
+
+.. code-block:: python
+
+	from cloudbridge.providers.factory import CloudProviderFactory, ProviderList
+
+	provider = CloudProviderFactory().create_provider(ProviderList.AWS, {})
+	print(provider.security.key_pairs.list())
+
+In the example above, the AWS_ACCESS_KEY and AWS_SECRET_KEY environment variables
+must be set to your cloud credentials.
+
+
+Running tests
+~~~~~~~~~~~~~
+To run the test suite locally, install `tox`_ with :code:`pip install tox`
+and run ``tox`` command. This will run all the tests for
+all the environments defined in file ``tox.ini``. In order to properly run the
+tests, you should have all the environment variables listed in
+``tox.ini`` file (under ``passenv``) exported.
+
+If you’d like to run the tests on a specific environment only, use a command
+like this: ``tox -e py27`` (or ``python setup.py test`` directly). If you'd
+like to run the tests for a specific cloud only, you should export env var
+``CB_TEST_PROVIDER`` and specify the desired provider name (e.g., ``aws`` or
+``openstack``) and then run the ``tox`` command.
+
+Note that running the tests will create various cloud resources, for which you
+may incur costs.
+
+
+.. _`bridge pattern`: https://en.wikipedia.org/wiki/Bridge_pattern
+.. _`tox`: https://tox.readthedocs.org/en/latest/

+ 3 - 0
docs/.gitignore

@@ -0,0 +1,3 @@
+_build
+_static
+_templates

+ 17 - 16
docs/conf.py

@@ -12,14 +12,15 @@
 # All configuration values have a default; values that are commented out
 # serve to show the default.
 
-import sys
 import os
 import shlex
+import sys
+
 
 # If extensions (or modules to document with autodoc) are in another directory,
 # add these directories to sys.path here. If the directory is relative to the
 # documentation root, use os.path.abspath to make it absolute, like shown here.
-#sys.path.insert(0, os.path.abspath('.'))
+sys.path.insert(0, os.path.abspath('../'))
 
 # -- General configuration ------------------------------------------------
 
@@ -114,7 +115,7 @@ todo_include_todos = True
 
 # The theme to use for HTML and HTML Help pages.  See the documentation for
 # a list of builtin themes.
-html_theme = 'alabaster'
+html_theme = 'default'
 
 # Theme options are theme-specific and customize the look and feel of a theme
 # further.  For a list of options available for each theme, see the
@@ -211,25 +212,25 @@ htmlhelp_basename = 'cloudbridgedoc'
 # -- Options for LaTeX output ---------------------------------------------
 
 latex_elements = {
-# The paper size ('letterpaper' or 'a4paper').
-#'papersize': 'letterpaper',
+    # The paper size ('letterpaper' or 'a4paper').
+    #'papersize': 'letterpaper',
 
-# The font size ('10pt', '11pt' or '12pt').
-#'pointsize': '10pt',
+    # The font size ('10pt', '11pt' or '12pt').
+    #'pointsize': '10pt',
 
-# Additional stuff for the LaTeX preamble.
-#'preamble': '',
+    # Additional stuff for the LaTeX preamble.
+    #'preamble': '',
 
-# Latex figure (float) alignment
-#'figure_align': 'htbp',
+    # Latex figure (float) alignment
+    #'figure_align': 'htbp',
 }
 
 # Grouping the document tree into LaTeX files. List of tuples
 # (source start file, target name, title,
 #  author, documentclass [howto, manual, or own class]).
 latex_documents = [
-  (master_doc, 'cloudbridge.tex', u'cloudbridge Documentation',
-   u'GVL and Galaxy Projects', 'manual'),
+    (master_doc, 'cloudbridge.tex', u'cloudbridge Documentation',
+     u'GVL and Galaxy Projects', 'manual'),
 ]
 
 # The name of an image file (relative to this directory) to place at the top of
@@ -272,9 +273,9 @@ man_pages = [
 # (source start file, target name, title, author,
 #  dir menu entry, description, category)
 texinfo_documents = [
-  (master_doc, 'cloudbridge', u'cloudbridge Documentation',
-   author, 'cloudbridge', 'One line description of project.',
-   'Miscellaneous'),
+    (master_doc, 'cloudbridge', u'cloudbridge Documentation',
+     author, 'cloudbridge', 'One line description of project.',
+     'Miscellaneous'),
 ]
 
 # Documents to append as an appendix to all manuals.

+ 3 - 6
docs/index.rst

@@ -28,14 +28,11 @@ must be set to your cloud credentials.
 Contents:
 
 .. toctree::
+   :glob:
    :maxdepth: 2
 
-    getting_started
-    supported_clouds
-    core_interfaces
-    testing
-    api_docs
-    faq
+   api_docs/cloudbridge
+
 
 Indices and tables
 ==================