8000 Merge pull request #81 from dahlia/changelog · nirum-lang/nirum-python@1d445a4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1d445a4

Browse files
authored
Merge pull request #81 from dahlia/changelog
Fix syntax errors on changelog
2 parents 84d38c6 + d8387f4 commit 1d445a4

File tree

4 files changed

+42
-20
lines changed

4 files changed

+42
-20
lines changed

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@ python:
44
- 3.4
55
- 3.5
66
install:
7-
- pip install -U pip setuptools
7+
- pip install -U pip setuptools docutils
88
- pip install -e .[tests]
99
script:
1010
- py.test tests -v
1111
- pip install 'typing<3.5.2' && py.test tests -v
12+
- rst2html.py --strict CHANGES.rst
13+
- rst2html.py --strict README.rst
14+
- python setup.py --long-description | rst2html.py --strict
1215
- |
1316
if [ -z "$(git diff --name-only "$TRAVIS_COMMIT_RANGE" | grep CHANGES\.rst)" ]; then
1417
exit 1

CHANGES.rst

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,37 @@ Version 0.5.1
77
To be released.
88

99
- Wheel distributions (``nirum-*.whl``) are now universal between Python 2
10-
and 3. [:issue:`78`]
10+
and 3. [`#78`_]
1111
- ``nirum.rpc.Client`` and its subtype became to raise ``TypeError`` with
1212
a better error message when its ``make_request()`` method is overridden and
13-
it returns a wrong artity of tuple. [:issue:`80`]
13+
it returns a wrong artity of tuple. [`#80`_]
1414
- ``nirum.rpc.WsgiApp`` and its subtype became to raise ``TypeError`` with
1515
a better error message when its ``make_response()`` method is overridden and
16-
it returns a wrong artity of tuple. [:issue:`80`]
16+
it returns a wrong artity of tuple. [`#80`_]
1717
- Fixed a bug that ``Client.ping()`` method had always raised ``TypeError``.
18-
[:issue:`80`]
18+
[`#80`_]
19+
20+
.. _#78: https://github.com/spoqa/nirum-python/pull/78
21+
.. _#80: https://github.com/spoqa/nirum-python/pull/80
1922

2023

2124
Version 0.5.0
2225
-------------
2326

2427
Release on June 1, 2017.
2528

26-
- Service methods became able to specify its error type. [:issue:`71`]
29+
- Service methods became able to specify its error type. [`#71`_]
2730
- Added ``nirum-server`` command to run simply Nirum service.
2831

32+
.. _#71: https://github.com/spoqa/nirum-python/issues/71
33+
2934

3035
Version 0.4.1
3136
-------------
3237

3338
Release on May 2, 2017.
3439

35-
- Compare type with its abstract type in :func:`nirum.validate.validate_type`.
40+
- Compare type with its abstract type in ``nirum.validate.validate_type``.
3641

3742

3843
Version 0.4.0
@@ -41,15 +46,15 @@ Version 0.4.0
4146
Release on March 20, 2017.
4247

4348
- Encoding of map types was changed according to the `Nirum serialization
44-
specification`__. [:issue:`66`]
45-
- Added :mod:`nirum.datastructures` module and
46-
:class:`~nirum.datastructures.Map` which is an immutable dictionary.
47-
[:issue:`66`]
48-
- Added :class:`nirum.datastructures.List` which is an immutable list.
49-
[:issue:`49`]
50-
- Aliased :class:`~nirum.datastructures.Map` as ``map_type``, and
51-
:class:`~nirum.datastructures.List` as ``list_type`` to avoid name
49+
specification`__. [`#66`_]
50+
- Added ``nirum.datastructures`` module and ``nirum.datastructures.Map``
51+
which is an immutable dictionary. [`#66`_]
52+
- Added ``nirum.datastructures.List`` which is an immutable list.
53+
[`#49`_]
54+
- Aliased ``nirum.datastructures.Map`` as ``map_type``, and
55+
``nirum.datastructures.List`` as ``list_type`` to avoid name
5256
conflict with user-defined types.
5357

54-
58+
.. _#66: https://github.com/spoqa/nirum-python/pull/66
59+
.. _#49: https://github.com/spoqa/nirum-python/issues/49
5560
__ https://github.com/spoqa/nirum/blob/f1629787f45fef17eeab8b4f030c34580e0446b8/docs/serialization.md

setup.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
import ast
2+
import re
23
import sys
34

45
from setuptools import find_packages, setup, __version__ as setuptools_version
56

67

7-
def readme():
8+
def readme(name='README.rst'):
89
try:
9-
with open('README.rst') as f:
10-
return f.read()
10+
with open(name) as f:
11+
rst = f.read()
12+
return re.sub(
13+
r'(^|\n).. include::\s*([^\n]+)($|\n)',
14+
lambda m: m.group(1) + (readme(m.group(2)) or '') + m.group(3),
15+
rst
16+
)
1117
except (IOError, OSError):
1218
return
1319

tox.ini

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
[tox]
2-
envlist = py27,py34,py35
2+
envlist = py27,py34,py35,docs
33

44
[testenv]
55
deps = -e.[tests]
66
commands=
77
py.test -v tests
8+
9+
[testenv:docs]
10+
basepython = python3
11+
deps = docutils
12+
commands =
13+
rst2html.py --strict CHANGES.rst
14+
rst2html.py --strict README.rst
15+
python3 setup.py --long-description | rst2html.py --strict

0 commit comments

Comments
 (0)
0