Skip to content

Commit

Permalink
improved documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnoone committed Jun 4, 2014
1 parent e618d0a commit 366417f
Show file tree
Hide file tree
Showing 15 changed files with 160 additions and 136 deletions.
13 changes: 0 additions & 13 deletions AUTHORS.rst

This file was deleted.

32 changes: 18 additions & 14 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@ Contributing
============

Contributions are welcome, and they are greatly appreciated! Every
little bit helps, and credit will always be given.
little bit helps, and credit will always be given.

You can contribute in many ways:


Types of Contributions
----------------------

Report Bugs
~~~~~~~~~~~

Report bugs at https://github.com/johnnoone/python-jsontools/issues.
Report bugs at https://github.com/johnnoone/json-extensions/issues.

If you are reporting a bug, please include:

Expand All @@ -36,14 +37,14 @@ is open to whoever wants to implement it.
Write Documentation
~~~~~~~~~~~~~~~~~~~

Json Tools could always use more documentation, whether as part of the
official Json Tools docs, in docstrings, or even on the web in blog posts,
Json Extensions could always use more documentation, whether as part of the
official Json Extensions docs, in docstrings, or even on the web in blog posts,
articles, and such.

Submit Feedback
~~~~~~~~~~~~~~~

The best way to send feedback is to file an issue at https://github.com/johnnoone/python-jsontools/issues.
The best way to send feedback is to file an issue at https://github.com/johnnoone/json-extensions/issues.

If you are proposing a feature:

Expand All @@ -52,20 +53,21 @@ If you are proposing a feature:
* Remember that this is a volunteer-driven project, and that contributions
are welcome :)


Get Started!
------------

Ready to contribute? Here's how to set up `python-jsontools` for local development.
Ready to contribute? Here's how to set up `json-extensions` for local development.

1. Fork the `python-jsontools` repo on GitHub.
1. Fork the `json-extensions` repo on GitHub.
2. Clone your fork locally::

$ git clone [email protected]:your_name_here/python-jsontools.git
$ git clone [email protected]:your_name_here/json-extensions.git

3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development::

$ mkvirtualenv python-jsontools
$ cd python-jsontools/
$ mkvirtualenv json-extensions
$ cd json-extensions/
$ python setup.py develop

4. Create a branch for local development::
Expand All @@ -76,7 +78,7 @@ Ready to contribute? Here's how to set up `python-jsontools` for local developme

5. When you're done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox::

$ flake8 python-jsontools tests
$ flake8 json-extensions tests
$ python setup.py test
$ tox

Expand All @@ -90,6 +92,7 @@ Ready to contribute? Here's how to set up `python-jsontools` for local developme

7. Submit a pull request through the GitHub website.


Pull Request Guidelines
-----------------------

Expand All @@ -99,13 +102,14 @@ Before you submit a pull request, check that it meets these guidelines:
2. If the pull request adds functionality, the docs should be updated. Put
your new functionality into a function with a docstring, and add the
feature to the list in README.rst.
3. The pull request should work for Python 2.6, 2.7, and 3.3, and for PyPy. Check
https://travis-ci.org/johnnoone/python-jsontools/pull_requests
3. The pull request should work for Python 2.7, 3.3 and for PyPy. Check
https://travis-ci.org/johnnoone/json-extensions/pull_requests
and make sure that the tests pass for all supported Python versions.


Tips
----

To run a subset of tests::

$ python -m unittest tests.test_python-jsontools
$ python -m unittest tests.test_json-extensions
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
CHANGES
=======

* renamed project
* renamed jsontools to json.*
* python2.7 fixes
* more validation
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ Redistribution and use in source and binary forms, with or without modification,

* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

* Neither the name of Json Tools nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
* Neither the name of Json Extensions nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4 changes: 2 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include AUTHORS.rst
include AUTHORS
include CONTRIBUTING.rst
include HISTORY.rst
include Changelog
include LICENSE
include README.rst

Expand Down
57 changes: 0 additions & 57 deletions Makefile

This file was deleted.

39 changes: 29 additions & 10 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,42 @@
Json Extensions
===============

.. image:: https://badge.fury.io/py/jsontools.png
.. image:: https://badge.fury.io/py/json-extensions.png
:target: http://badge.fury.io/py/jsontools

.. image:: https://travis-ci.org/johnnoone/jsontools.png?branch=master
.. image:: https://travis-ci.org/johnnoone/json-extensions.png?branch=master
:target: https://travis-ci.org/johnnoone/jsontools

.. image:: https://pypip.in/d/jsontools/badge.png
.. image:: https://pypip.in/d/json-extensions/badge.png
:target: https://pypi.python.org/pypi/jsontools

This library implements several JSON specs, like `JSON Schema`_:

* Free software: BSD license
* Documentation: http://jsonexts.readthedocs.org.
* It works on python 2.7, python 3.3 and above
* It is release under the `BSD license`_

json.schema
-----------

`JSON Schema`_ describes your JSON data format
Installation
------------

.. block-code: python
This library has no special dependencies. You can simply use pip:

.. code-block:: bash
$ pip install json-extensions
Usage
-----

Let say you want to validate JSON like objects.
You can describe you data with `JSON Schema`_:

.. code-block:: python
from json.schema import load
# data will validate against this schema
validator = load({
'title': 'Example Schema',
'type': 'object',
Expand All @@ -46,11 +60,16 @@ json.schema
]
})
# validate this data
validator.validate({
'firstName': 'John',
'lastName': 'Noone',
'age': 33,
})
Other examples can be found in the documentation_ of in the tests_.

:: _`JSON Schema`: http://json-schema.org
.. _`JSON Schema`: http://json-schema.org
.. _`BSD license`: LICENSE
.. _documentation: http://json-extensions.readthedocs.org
.. _tests: tests/
15 changes: 14 additions & 1 deletion docs/authors.rst
Original file line number Diff line number Diff line change
@@ -1 +1,14 @@
.. include:: ../AUTHORS.rst
=======
Credits
=======

Development Lead
----------------

* Xavier Barbosa <[email protected]>

Contributors
------------

.. include:: ../AUTHORS
:literal:
15 changes: 7 additions & 8 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,16 @@
master_doc = 'index'

# General information about the project.
project = u'Json Tools'
project = u'Json Extensions'
copyright = u'2014, Xavier Barbosa'

# 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 = json.__version__
# The full version, including alpha/beta/rc tags.
release = json.__version__
import pkg_resources # part of setuptools
release = version = pkg_resources.require("json-extensions")[0].version


# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -209,7 +208,7 @@
# [howto/manual]).
latex_documents = [
('index', 'python-json.tex',
u'Json Tools Documentation',
u'Json Extensions Documentation',
u'Xavier Barbosa', 'manual'),
]

Expand Down Expand Up @@ -240,7 +239,7 @@
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'python-json',
u'Json Tools Documentation',
u'Json Extensions Documentation',
[u'Xavier Barbosa'], 1)
]

Expand All @@ -255,7 +254,7 @@
# dir menu entry, description, category)
texinfo_documents = [
('index', 'python-json',
u'Json Tools Documentation',
u'Json Extensions Documentation',
u'Xavier Barbosa',
'python-json',
'One line description of project.',
Expand Down
6 changes: 5 additions & 1 deletion docs/history.rst
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
.. include:: ../HISTORY.rst
=======
History
=======

.. include:: ../Changelog
Loading

0 comments on commit 366417f

Please sign in to comment.