Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

Commit 22e6b88

Browse files
authored
Merge pull request #241 from Nurdok/master
Setup better bumpversion and pytest configurations
2 parents 286d933 + 94065f6 commit 22e6b88

File tree

5 files changed

+23
-28
lines changed

5 files changed

+23
-28
lines changed

.bumpversion.cfg

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[bumpversion]
2+
current_version = 2.0.0rc
3+
commit = True
4+
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)((?P<release>.*))?
5+
serialize =
6+
{major}.{minor}.{patch}{release}
7+
{major}.{minor}.{patch}
8+
tag_name = {new_version}
9+
10+
[bumpversion:part:release]
11+
optional_value = production
12+
values =
13+
rc
14+
production
15+
16+
[bumpversion:file:setup.py]
17+
[bumpversion:file:src/pydocstyle/utils.py]

setup.cfg

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,2 @@
1-
[bumpversion]
2-
current_version = 2.0.0rc
3-
commit = True
4-
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)((?P<release>.*))?
5-
serialize =
6-
{major}.{minor}.{patch}{release}
7-
{major}.{minor}.{patch}
8-
91
[wheel]
102
universal = 1
11-
12-
[bumpversion:part:release]
13-
optional_value = production
14-
values =
15-
rc
16-
production
17-
18-
[bumpversion:file:src/pydocstyle/utils.py]
19-

setup.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,8 @@
22
import os
33
from setuptools import setup
44

5-
6-
this_dir = os.path.dirname(__file__)
7-
8-
with open(os.path.join(this_dir, 'src', 'pydocstyle', 'utils.py')) as f:
9-
for line in f:
10-
if line.startswith('__version__'):
11-
version = eval(line.split('=')[-1])
12-
5+
# Do not update the version manually - it is managed by `bumpversion`.
6+
version = '2.0.0rc'
137

148
setup(
159
name='pydocstyle',

src/pydocstyle/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from itertools import izip_longest as zip_longest
88

99

10+
# Do not update the version manually - it is managed by `bumpversion`.
1011
__version__ = '2.0.0rc'
1112
log = logging.getLogger(__name__)
1213

tox.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ envlist = py27, py33, py34, py35, pypy, docs
1111
setenv =
1212
LANG=C
1313
LC_ALL=C
14-
commands = py.test --pep8 --cache-clear
14+
commands = py.test --pep8 --cache-clear src/tests
1515
deps =
16-
-rrequirements/runtime.txt
17-
-rrequirements/tests.txt
16+
-rrequirements/runtime.txt
17+
-rrequirements/tests.txt
1818

1919
[testenv:docs]
2020
changedir=docs

0 commit comments

Comments
 (0)