Skip to content

Commit

Permalink
Merge pull request #1 from adamboche/doc
Browse files Browse the repository at this point in the history
Doc
  • Loading branch information
adamboche committed Jun 8, 2019
2 parents ff5244e + 7a6537b commit 169c856
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 18 deletions.
14 changes: 7 additions & 7 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
[bumpversion]
current_version = 0.1.1
current_version = 0.1.2
commit = True
tag = True

[bumpversion:file:setup.py]
search = version='{current_version}'
replace = version='{new_version}'
search = version={current_version}
replace = version={new_version}

[bumpversion:file:README.rst]
search = v{current_version}.
replace = v{new_version}.

[bumpversion:file:docs/conf.py]
search = version = release = '{current_version}'
replace = version = release = '{new_version}'
search = version = release = {current_version}
replace = version = release = {new_version}

[bumpversion:file:src/marshmallow_union/__init__.py]
search = __version__ = '{current_version}'
replace = __version__ = '{new_version}'
search = __version__ = {current_version}
replace = __version__ = {new_version}

4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ Overview
:alt: PyPI Package latest release
:target: https://pypi.org/pypi/marshmallow-union

.. |commits-since| image:: https://img.shields.io/github/commits-since/adamboche/python-marshmallow-union/v0.1.1.svg
.. |commits-since| image:: https://img.shields.io/github/commits-since/adamboche/python-marshmallow-union/v0.1.2.svg
:alt: Commits since latest release
:target: https://github.com/adamboche/python-marshmallow-union/compare/v0.1.1...master
:target: https://github.com/adamboche/python-marshmallow-union/compare/v0.1.2...master

.. |wheel| image:: https://img.shields.io/pypi/wheel/marshmallow-union.svg
:alt: PyPI Wheel
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
year = "2019"
author = "akb"
copyright = "{0}, {1}".format(year, author)
version = release = "version = release = '0.1.1'"
version = release = "version = release = 0.1.2"

pygments_style = "trac"
templates_path = ["."]
Expand Down
13 changes: 7 additions & 6 deletions docs/reference/marshmallow_union.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
marshmallow_union
=================
marshmallow\_union package
==========================

.. testsetup::

from marshmallow_union import *
Module contents
---------------

.. automodule:: marshmallow_union
:members:
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/reference/modules.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
src
===

.. toctree::
:maxdepth: 4

marshmallow_union
18 changes: 18 additions & 0 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,21 @@ Usage
To use marshmallow-union in a project::

import marshmallow_union


class PersonSchema(marshmallow.Schema):
name = marshmallow.fields.String()
number_or_numbers = marshmallow_union.Union(
[
marshmallow.fields.List(marshmallow.fields.Integer()),
marshmallow.fields.Integer(),
],
reverse_serialize_candidates=True,
)


data = {"name": "Alice", "number_or_numbers": 25}
schema = PersonSchema()
loaded = schema.load(data)
dumped = schema.dump(data)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def read(*names, **kwargs):

setup(
name="marshmallow-union",
version="version='0.1.1'",
version="0.1.2",
description="Union fields for marshmallow.",
long_description="%s\n%s"
% (
Expand Down
2 changes: 1 addition & 1 deletion src/marshmallow_union/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from ._core import Union

__version__ = "__version__ = '0.1.1'"
__version__ = "__version__ = 0.1.2"
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ deps =
deps =
-r{toxinidir}/docs/requirements.txt
commands =
sphinx-apidoc -o docs/reference -f src
sphinx-build {posargs:-E} -b html docs dist/docs
sphinx-build -b linkcheck docs dist/docs

Expand Down

0 comments on commit 169c856

Please sign in to comment.