Skip to content

Commit b0b9e7c

Browse files
committed
Second candidate for release 0.4.1
Docs-related improvements/refactoring...
1 parent 8a3aa68 commit b0b9e7c

File tree

4 files changed

+10
-34
lines changed

4 files changed

+10
-34
lines changed

CHANGES.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ Unreleased (to be updated...)
66

77
* Added the **unittest_expander.__version__** global constant.
88

9-
* Tests-and-CI-related improvements and additions -- in particular:
10-
added a script that checks whether **unittest_expander.__version__**
11-
is equal to **version** in package metadata, and added invocation of
12-
that script to the *Install and Test* GitHub workflow.
9+
* improvements and additions related to tests, CI, generation of
10+
documentation, etc.; in particular: added a script that checks whether
11+
*unittest_expander.__version__** is equal to **version** in package
12+
metadata, and added invocation of that script to the *Install and
13+
Test* GitHub workflow.
1314

1415
* Documentation: improvements and minor fixes.
1516

docs/conf.py

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -14,40 +14,15 @@
1414

1515
import sys
1616
import os
17-
import os.path as osp
18-
import re
19-
20-
21-
VERSION_LINE_REGEX = re.compile(br'''
22-
^
23-
version
24-
\s*
25-
=
26-
\s*
27-
(?P<version_str>
28-
\S+
29-
)
30-
\s*
31-
$
32-
''', re.VERBOSE)
33-
34-
35-
def get_version_str():
36-
setup_cfg_path = osp.join(os.pardir, 'setup.cfg')
37-
with open(setup_cfg_path, 'rb') as f:
38-
for line in f:
39-
match = VERSION_LINE_REGEX.search(line)
40-
if match:
41-
return match.group('version_str').decode('utf-8')
42-
raise AssertionError('version not found')
43-
4417

4518
# If extensions (or modules to document with autodoc) are in another directory,
4619
# add these directories to sys.path here. If the directory is relative to the
4720
# documentation root, use os.path.abspath to make it absolute, like shown here.
4821
#sys.path.insert(0, os.path.abspath('.'))
4922
sys.path.insert(0, os.path.abspath(os.pardir))
5023

24+
import unittest_expander
25+
5126
# -- General configuration ------------------------------------------------
5227

5328
# If your documentation needs a minimal Sphinx version, state it here.
@@ -82,7 +57,7 @@ def get_version_str():
8257
# built documents.
8358
#
8459
# The full version, including alpha/beta/rc tags.
85-
release = get_version_str()
60+
release = unittest_expander.__version__
8661
# The short X.Y version.
8762
version = '.'.join(release.split('.')[:2])
8863

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = unittest_expander
3-
version = 0.4.1rc1
3+
version = 0.4.1rc2
44
description = Easy and flexible unit test parametrization
55
long_description = file: README.rst
66
long_description_content_type = text/x-rst

unittest_expander.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2687,7 +2687,7 @@
26872687
'Substitute',
26882688
)
26892689

2690-
__version__ = '0.4.1rc1'
2690+
__version__ = '0.4.1rc2'
26912691

26922692

26932693
_CLASS_TYPES = (type,) if _PY3 else (type, types.ClassType)

0 commit comments

Comments
 (0)