Skip to content

Commit

Permalink
Start of Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
AO-StreetArt committed Sep 25, 2018
1 parent 6587702 commit 0247e3b
Show file tree
Hide file tree
Showing 18 changed files with 702 additions and 20 deletions.
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,3 @@ after_failure:
- docker logs --tail 150 crazyivan
- docker logs --tail 150 clyman
- cd $TRAVIS_BUILD_DIR && cat logs/avc.log | grep ERROR
notifications:
slack:
secure: AfMTl+Si4xHctYyrB8GaV5a5fJYEuX18Ow5/NRwpZuRoGfcFU/CkX/SKNHNMSpUyXdMDiTXuylnt3KtscwSTn2pJdfqlx91n5wuIcx7uO+Hv0pLsxKhHJ/3WLYVrPK9GKEVHbsKpR+gxw8Bu/HTGqLBL8k9TAjGl97m1h39k3ovIbAjxzKhSlUSVlxcdqmD18CEnD2szH1qSZ4IlsIraYJ0F7rZtr8mdAESPPU9Q9BAWSVNF2wQ40c3PPYZb6l/zaKEYN3BqHsBGEJHRzH+Aa+ZXtFfgtj6voqiigMVw3FTPl66jPaDx7TI8mJFFBWUGOOImrwNYliIiGyo/b+q3N4OYVWADHp1RaLQEZqwQzCqRfoqgIUCagDF5wjOP6hQCobBT61o2wDSE2xHT73yKnr03AHp7An0flD0+/SYl9J2OOIe9vLgluVUEPa/jyiApldpKoH+JH0ZhvdMhz40Eu3iV9XtBdl0emT9gSeY5cKu3LSuA1AHIaGQz4VpsEokF14ebVSbxKx6rYjaNOViM56vwpBOT0eS9lD/NNduu5OBcijoifpBc5oAAUuK1t4VuoXDtBMaMdoqcxExRcfuRK/H63pUgDt1RkXKRysvg68EJMPLZosCrBwit5jsVbyWn9svLH7D1Kew437rHccD6KXsFjUOrp2Vc+0ppuDAvSCk=
39 changes: 39 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
Kelona
======

.. figure:: https://travis-ci.org/AO-StreetArt/Kelona.svg?branch=master
:alt:

Overview
--------

Kelona is a Version Control service for large files, binary or text based. It is
primarily targeted at storing files for graphics applications, such as:

- .obj files
- .glsl files
- .fbx files
- Proprietary data formats (ie. for Blender or Maya)

Kelona does not have access to file contents, instead tracking metadata and dropping
files into a large-scale datastore. The only currently supported backend is Mongo GridFS.

Kelona is a part of the AO Aesel Project, along
with `CLyman <https://github.com/AO-StreetArt/CLyman>`__,
`Crazy Ivan <https://github.com/AO-StreetArt/CrazyIvan>`__,
and `Adrestia <https://github.com/AO-StreetArt/Adrestia>`__.

Features
--------

- Storage of large-scale Assets (files), and associated metadata.
- Provide a History of Asset Updates.
- Integrate with other Aesel components to allow Assets to be kept up-to-date on User Devices.

Stuck and need help? Have general questions about the application? We encourage you to publish your question
on `Stack Overflow <https://stackoverflow.com>`__. We regularly monitor for the tag 'aesel' in questions.

We encourage the use of Stack Overflow for a few reasons:

* Once the question is answered, it is searchable and viewable by everyone else.
* The forum format offers an easy method to get a larger community involved with a tougher question.
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = python -msphinx
SPHINXPROJ = CrazyIvan
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
Binary file added docs/_static/images/Aesel_Icon_Alpha.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
245 changes: 245 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,245 @@
# -*- coding: utf-8 -*-
#
# Kelona documentation build configuration file, created by
# sphinx-quickstart on Sat Jul 1 19:51:56 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.

# 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.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))

import sphinx_bootstrap_theme

# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['sphinxcontrib.httpdomain', 'sphinxcontrib.httpexample', 'sphinx.ext.mathjax']
mathjax_path = "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML"
math_number_all = True

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'

# The master toctree document.
master_doc = 'index'

# General information about the project.
project = u'Kelona'
copyright = u'2018, AO'
author = u'AO'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = u'1.0'
# The full version, including alpha/beta/rc tags.
release = u'1.0.0'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False

# -- Options for HTTP Domain and HTTP Example -----------------------------

# List of HTTP header prefixes which should be ignored in strict mode
http_headers_ignore_prefixes = []

# Strips the leading segments from the endpoint paths
# by given list of prefixes:
http_index_ignore_prefixes = []

# Short name of the index which will appear on every page:
http_index_shortname = 'api'

# Full index name which is used on index page:
http_index_localname = "Kelona"

# When True (default) emits build errors when status codes,
# methods and headers look non-standard:
http_strict_mode = True

# -- Options for HTML output ----------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'bootstrap'
html_theme_path = sphinx_bootstrap_theme.get_html_theme_path()

html_logo = "_static/images/Aesel_Icon_Alpha.png"

# Theme options are theme-specific and customize the look and feel of a
# theme further.
html_theme_options = {
# Navigation bar title. (Default: ``project`` value)
'navbar_title': "Kelona",

# Tab name for entire site. (Default: "Site")
'navbar_site_name': "Kelona",

# A list of tuples containing pages or urls to link to.
# Valid tuples should be in the following forms:
# (name, page) # a link to a page
# (name, "/aa/bb", 1) # a link to an arbitrary relative url
# (name, "http://example.com", True) # arbitrary absolute url
# Note the "1" or "True" value above as the third argument to indicate
# an arbitrary url.
'navbar_links': [
("Getting Started", "pages/quickstart"),
("HTTP API", "pages/api"),
("Advanced Topics", "pages/advanced_index"),
],

# Render the next and previous page links in navbar. (Default: true)
'navbar_sidebarrel': False,

# Render the current pages TOC in the navbar. (Default: true)
'navbar_pagenav': False,

# Tab name for the current pages TOC. (Default: "Page")
'navbar_pagenav_name': "Contents",

# Global TOC depth for "site" navbar tab. (Default: 1)
# Switching to -1 shows all levels.
'globaltoc_depth': 2,

# Include hidden TOCs in Site navbar?
#
# Note: If this is "false", you cannot have mixed ``:hidden:`` and
# non-hidden ``toctree`` directives in the same page, or else the build
# will break.
#
# Values: "true" (default) or "false"
'globaltoc_includehidden': "true",

# HTML navbar class (Default: "navbar") to attach to <div> element.
# For black navbar, do "navbar navbar-inverse"
'navbar_class': "navbar navbar-inverse",

# Fix navigation bar to top of page?
# Values: "true" (default) or "false"
'navbar_fixed_top': "true",

# Location of link to source.
# Options are "nav" (default), "footer" or anything else to exclude.
'source_link_position': "footer",

# Bootswatch (http://bootswatch.com/) theme.
#
# Options are nothing (default) or the name of a valid theme
# such as "cosmo" or "sandstone".
#
# The set of valid themes depend on the version of Bootstrap
# that's used (the next config option).
#
# Currently, the supported themes are:
# - Bootstrap 2: https://bootswatch.com/2
# - Bootstrap 3: https://bootswatch.com/3
'bootswatch_theme': "sandstone",

# Choose Bootstrap version.
# Values: "3" (default) or "2" (in quotes)
'bootstrap_version': "3",
}

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']


# -- Options for HTMLHelp output ------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'Kelonadoc'


# -- Options for LaTeX output ---------------------------------------------

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',

# 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, 'Kelona.tex', u'Kelona Documentation',
u'AO', 'manual'),
]


# -- Options for manual page output ---------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'kelona', u'Kelona Documentation',
[author], 1)
]


# -- Options for Texinfo output -------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'Kelona', u'Kelona Documentation',
author, 'Kelona', 'One line description of project.',
'Miscellaneous'),
]
11 changes: 11 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.. _index:

.. include:: ../README.rst

.. toctree::
:maxdepth: 1
:caption: Contents:

pages/quickstart.rst
pages/api.rst
pages/dev_notes.rst
55 changes: 55 additions & 0 deletions docs/pages/Asset_API.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
.. _property_api:

Asset API
=========

An Asset, at it's core, is simply a file. The general expectation, however, is
that this file is quite large, and may be in a binary format. An Asset has some
associated metadata, but at it's core it is nothing but a file.

Asset Creation
~~~~~~~~~~~~~~

.. http:post:: /v1/asset/
Create a new asset.

:reqheader Content-Type: multipart/*
:statuscode 200: Success

.. include:: _examples/asset/asset_create.rst

Asset Update
~~~~~~~~~~~~

.. http:post:: /v1/asset/{asset_key}
Update an existing Asset. This returns a new key for the asset, and adds
an entry to the associated Asset History.

:reqheader Content-Type: multipart/*
:statuscode 200: Success

.. include:: _examples/asset/asset_update.rst

Asset Retrieval
~~~~~~~~~~~~~~~

.. http:get:: /v1/asset/(asset_key)
Retrieve an asset by ID.

:statuscode 200: Success

.. include:: _examples/asset/asset_get.rst

Asset Deletion
~~~~~~~~~~~~~~

.. http:delete:: /v1/asset/(asset_key)
Delete an asset.

:statuscode 200: Success

.. include:: _examples/asset/asset_delete.rst
6 changes: 6 additions & 0 deletions docs/pages/_examples/asset/asset_create.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. http:example:: curl wget httpie python-requests
:response: asset_create_response.rst

POST /v1/asset HTTP/1.1
Host: localhost:5635
Content-Type: multipart/form-data
4 changes: 4 additions & 0 deletions docs/pages/_examples/asset/asset_create_response.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
HTTP/1.1 200 OK
Location: http://localhost:5635/v1/asset

new-asset-key
4 changes: 4 additions & 0 deletions docs/pages/_examples/asset/asset_delete.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.. http:example:: curl wget httpie python-requests
DELETE /v1/asset/{key} HTTP/1.1
Host: localhost:5635

0 comments on commit 0247e3b

Please sign in to comment.