Skip to content

Commit

Permalink
Merge pull request #1 from dave-shawley/initial-implementation
Browse files Browse the repository at this point in the history
Initial implementation
  • Loading branch information
dave-shawley committed Jun 20, 2016
2 parents d3d8829 + 24cf117 commit 668003d
Show file tree
Hide file tree
Showing 11 changed files with 553 additions and 12 deletions.
21 changes: 21 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
language: python
python:
- '2.7'
- '3.4'
- '3.5'
sudo: false
install:
- pip install -q -r requires/development.txt
script:
- "./setup.py build_sphinx"
deploy:
provider: pypi
user: daveshawley
password:
secure: T5rjFAtBr9+PY/paCSZOTRmyF9YFcYL75cb8R6ZTF0xDrwKn63obbVztazMgNYPSCdQSvZfYRr78EEpX0jijCCXWVgmiCqIJYi9rxj62v8NqvJffDFDQoYmgd0b+CRbqfwzE24nlOwLu+ACgohZqYXZuRU7eQ0PdO71BpbQ+hEycE48IWQwcgqtsNA3tatW0AfTj2C39r44uXPefJnmjnVHagxcGS1Uqo7CksFuIuqKbVvz68oJmOcDQO8V/tVXeMsmpD5R067LGNCehB+nUh1OArGD/oSKGZ4JFeVnkfv0JJUkdFf0UNSpAEzI9Mws8QLHkoJw4CGX02W5dWq1E9A1BZ8QOIgttd0zfqi+VflXt2Wtg7r5/ljsQuEmmM3ReueOBlml45HAnF9kYjEomfMzKgpptoDYN6iQHXZaNlX/J/Uw25vJ/HACxTIOgUShot9M+FDnvgyz6gn6NsmLFmjhY6uglt7O3K+cYR4IpLS6pfnJfXLwN7o4rfRUHTcbAuJXQmkKvMvQ277gXMzCddZSOy7uuMevE3jMtAFQnOX+L0hNl+S8rlwREEzBbn2O7TWV680L0NLATRDUjO9NyMipjHCgzx/3TS6j1BFQohHrFFZhMYXpeiQwlCTEyU+AE8sGzKaVHC3IbbuI5Uor7Bn5tlissvg48+vWYYQTpMc8=
distributions: sdist bdist_wheel
on:
tags: true
all_branches: true
repo: dave-shawley/sphinx-jsondomain
python: 3.5
7 changes: 4 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import alabaster
from sphinxcontrib import jsondomain


project = 'sphinx-jsondomain'
copyright = '2016, Dave Shawley'
release = '.'.join(str(v) for v in jsondomain.version_info[:2])
version = jsondomain.__version__
release = '0.0'
version = '0.0.0'
needs_sphinx = '1.0'
extensions = [
'sphinx.ext.intersphinx',
'sphinxjsondomain',
]

master_doc = 'index'
Expand All @@ -23,6 +23,7 @@
'description': 'Describe JSON documents',
'github_user': 'dave-shawley',
'github_repo': 'sphinx-jsondomain',
'extra_nav_links': {'Index': 'genindex.html'},
}
intersphinx_mapping = {
'python': ('https://docs.python.org/3', None),
Expand Down
52 changes: 52 additions & 0 deletions docs/examples.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
Examples
========


.. json:object:: Github Issue
:showexample:

Information about a Github issue.

:property integer id: Github assigned issue ID
:property url url: direct link to this issue
:property url repository_url: direct link to the repository that
this issue lives in
:property url labels_url: retrieve and manipulate the labels
associated with this issue
:property url comments_url: retrieve and manipulate the comments
associated with this issue
:property url events_url: retrieve and manipulate the events associated
with this issue
:property html_url: HTML formatted information about this issue
:proptype html_url: url
:property integer number: raw issue number
:property string state: current state of the issue
:property string title: issue title
:property string body: issue body
:property user: embedded information about the user that created
the issue
:proptype user: :json:object:`Github User`

.. json:object:: Error
:showexample: yaml

What a normal JSON error body looks like.

:property string type:
:property string title:
:property integer status:
:property string detail:
:property uri instance:

The semantics of this data type is described in :rfc:`7807`.

.. json:object:: Github User
:showexample:

What Github's API thinks a user looks like.

:property user_name login: the user's unique login
:property integer id: Github assigned unique user identifier
:property url avatar_url: url to user's selected avatar image
:property url gravatar_url: url to the user's gravatar image or
the empty string
2 changes: 2 additions & 0 deletions docs/history.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@ Release History

`Next Release`_
---------------
- Initial implementation of ``:json:`` domain including support for
``:json:object::`` domain and ``:json:object:`` role.

.. _Next Release: https://github.com/dave-shawley/sphinx-jsondomain/compare/0.0.0...HEAD
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
.. toctree::
:hidden:

examples
contributing
history
1 change: 1 addition & 0 deletions requires/development.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
-r installation.txt
pyyaml>=3.11,<4
wheel
1 change: 1 addition & 0 deletions requires/installation.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
fake-factory>=0.5,<0.6
Sphinx>=1.4,<2
7 changes: 2 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

import setuptools

from sphinxcontrib import jsondomain


def read_requirements(name):
requirements = []
Expand All @@ -23,14 +21,13 @@ def read_requirements(name):

setuptools.setup(
name='sphinx-jsondomain',
version=jsondomain.__version__,
version='0.0.0',
url='https://github.com/dave-shawley/sphinx-jsondomain',
description='Describe JSON document structures in sphinx',
long_description='\n'+open('README.rst').read(),
author='Dave Shawley',
author_email='daveshawley+python@gmail.com',
packages=setuptools.find_packages(),
namespace_packages=['sphinxcontrib'],
py_modules=['sphinxjsondomain'],
install_requires=read_requirements('installation.txt'),
classifiers=[
'Intended Audience :: Developers',
Expand Down
2 changes: 0 additions & 2 deletions sphinxcontrib/__init__.py

This file was deleted.

2 changes: 0 additions & 2 deletions sphinxcontrib/jsondomain/__init__.py

This file was deleted.

0 comments on commit 668003d

Please sign in to comment.