Skip to content

Commit

Permalink
chore(docs): Add basis for the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
playpauseandstop committed Mar 16, 2020
1 parent 72e54bd commit 9fdde45
Show file tree
Hide file tree
Showing 10 changed files with 221 additions and 1 deletion.
11 changes: 10 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
1.0.0b0 (In Development)
=========
ChangeLog
=========

1.0.0b1 (In Development)
========================

- Add docs

1.0.0b0 (2020-03-15)
====================

- Allow to setup tus upload URLs multiple times for one ``aiohttp.web`` application
- Allow to call callback after upload is done
- Provide many unit tests for tus views
Expand Down
16 changes: 16 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,22 @@ aiohttp-tus
:target: https://github.com/pylotcode/aiohttp-tus/actions?query=workflow%3A%22ci%22
:alt: CI Workflow

.. image:: https://img.shields.io/pypi/v/aiohttp-tus.svg
:target: https://pypi.org/project/aiohttp-tus/
:alt: Latest Version

.. image:: https://img.shields.io/pypi/pyversions/aiohttp-tus.svg
:target: https://pypi.org/project/aiohttp-tus/
:alt: Python versions

.. image:: https://img.shields.io/pypi/l/aiohttp-tus.svg
:target: https://github.com/pylotcode/aiohttp-tus/blob/master/LICENSE
:alt: BSD License

.. image:: https://readthedocs.org/projects/aiohttp-tus/badge/?version=latest
:target: http://aiohttp-tus.readthedocs.org/en/latest/
:alt: Documentation

`tus.io <https://tus.io>`_ server implementation for
`aiohttp.web <https://docs.aiohttp.org/en/stable/web.html>`_ applications.

Expand Down
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 = sphinx-build
SPHINXPROJ = aiohttp-middlewares
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)
5 changes: 5 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
=============
API Reference
=============

TODO
1 change: 1 addition & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.. include:: ../CHANGELOG.rst
92 changes: 92 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# aiohttp-tus documentation build configuration file, created by
# sphinx-quickstart on Sun May 14 20:32:17 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 re
import sys
from pathlib import Path


rel = Path(__file__).parent.parent
sys.path.insert(0, str(rel))

INIT_PY = (rel / "aiohttp_tus" / "__init__.py").read_text()
VERSION = re.findall('__version__ = "([^"]+)"', INIT_PY)[0]


extensions = [
"alabaster",
"sphinx.ext.autodoc",
"sphinx_autodoc_typehints",
"sphinx.ext.intersphinx",
"sphinx.ext.coverage",
"sphinx.ext.viewcode",
]

templates_path = ["_templates"]
source_suffix = ".rst"
master_doc = "index"

project = "aiohttp-tus"
description = "tus.io server implementation for aiohttp.web applications"
copyright = "2020, Pylot"
author = "Igor Davydenko"

version = ".".join(VERSION.split(".")[:2])
release = VERSION

language = "en"
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
pygments_style = "sphinx"

html_theme = "alabaster"
html_theme_options = {
"logo_name": True,
"description": description,
"github_user": "pylotcode",
"github_repo": project,
"github_banner": True,
"github_button": True,
"github_type": "star",
"fixed_sidebar": True,
}
html_static_path = ["_static"]
html_sidebars = {"**": ["about.html", "localtoc.html", "searchbox.html"]}

htmlhelp_basename = "aiohttp-tusdoc"
latex_elements = {}
latex_documents = [
(master_doc, "aiohttp-tus.tex", "aiohttp-tus Documentation", "Pylot", "manual",)
]

man_pages = [(master_doc, "aiohttp-tus", "aiohttp-tus Documentation", [author], 1,)]

texinfo_documents = [
(
master_doc,
"aiohttp-tus",
"aiohttp-tus Documentation",
author,
"aiohttp-tus",
description,
"Miscellaneous",
)
]

intersphinx_mapping = {"https://docs.python.org/3/": None}
30 changes: 30 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.. include:: ../README.rst

Installation
============

.. code-block:: bash
pip install aiohttp-tus
Or using `poetry <https://python-poetry.org/>`_:

.. code-block:: bash
poetry add aiohttp-tus
License
=======

*aiohttp-tus* is licensed under the terms of `BSD License
<https://github.com/pylotcode/aiohttp-tus/blob/LICENSE>`_.

Contents
========

.. toctree::
:maxdepth: 3

usage
api
changelog
3 changes: 3 additions & 0 deletions docs/requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
aiohttp
sphinx
sphinx_autodoc_typehints
39 changes: 39 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile docs/requirements.in
#
aiohttp==3.6.2 # via -r docs/requirements.in
alabaster==0.7.12 # via sphinx
async-timeout==3.0.1 # via aiohttp
attrs==19.3.0 # via aiohttp
babel==2.8.0 # via sphinx
certifi==2019.11.28 # via requests
chardet==3.0.4 # via aiohttp, requests
docutils==0.15.2 # via sphinx
idna==2.8 # via requests, yarl
imagesize==1.2.0 # via sphinx
jinja2==2.10.3 # via sphinx
markupsafe==1.1.1 # via jinja2
multidict==4.7.3 # via aiohttp, yarl
packaging==20.0 # via sphinx
pygments==2.5.2 # via sphinx
pyparsing==2.4.6 # via packaging
pytz==2019.3 # via babel
requests==2.22.0 # via sphinx
six==1.13.0 # via packaging
snowballstemmer==2.0.0 # via sphinx
sphinx-autodoc-typehints==1.10.3 # via -r docs/requirements.in
sphinx==2.3.1 # via -r docs/requirements.in, sphinx-autodoc-typehints
sphinxcontrib-applehelp==1.0.1 # via sphinx
sphinxcontrib-devhelp==1.0.1 # via sphinx
sphinxcontrib-htmlhelp==1.0.2 # via sphinx
sphinxcontrib-jsmath==1.0.1 # via sphinx
sphinxcontrib-qthelp==1.0.2 # via sphinx
sphinxcontrib-serializinghtml==1.1.3 # via sphinx
urllib3==1.25.7 # via requests
yarl==1.4.2 # via aiohttp

# The following packages are considered to be unsafe in a requirements file:
# setuptools
5 changes: 5 additions & 0 deletions docs/usage.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
=====
Usage
=====

TODO

0 comments on commit 9fdde45

Please sign in to comment.