Skip to content

Commit e3c3395

Browse files
committed
Minor improvements, updates and fixes related to...
...setup, versioning, authorship/copyright info, docs generation; in particular, got rid of `setup.py` (now, `setup.cfg` is sufficient).
1 parent ade480c commit e3c3395

File tree

7 files changed

+48
-52
lines changed

7 files changed

+48
-52
lines changed

LICENSE.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2014-2021 Jan Kaliszewski (zuo). All rights reserved.
1+
Copyright (c) 2014-2021 Jan Kaliszewski (zuo) and others... All rights reserved.
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

README.rst

+7-2
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,16 @@ The library is compatible with Python 2.7, 3.4, 3.5, 3.6, 3.7, 3.8,
66
3.9 and 3.10, and does not depend on any external packages (i.e.,
77
uses only the Python standard library).
88

9-
:Author: Jan Kaliszewski (zuo)
10-
:License: MIT License
9+
:Authors: `Jan Kaliszewski (zuo)`_ and `others...`_
10+
:License: `MIT License`_
1111
:Home Page: https://github.com/zuo/unittest_expander
1212
:Documentation: https://unittest-expander.readthedocs.io/en/stable/
1313

14+
.. _Jan Kaliszewski (zuo): https://github.com/zuo/
15+
.. _others...: https://github.com/zuo/unittest_expander/pulls?q=is%3Apr+is%3Amerged
16+
.. _MIT License: https://github.com/zuo/unittest_expander/blob/main/LICENSE.txt
17+
18+
1419
Installing
1520
----------
1621

docs/conf.py

+36-9
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,39 @@
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+
1744

1845
# If extensions (or modules to document with autodoc) are in another directory,
1946
# add these directories to sys.path here. If the directory is relative to the
2047
# documentation root, use os.path.abspath to make it absolute, like shown here.
2148
#sys.path.insert(0, os.path.abspath('.'))
22-
sys.path.insert(0, os.path.abspath('..'))
49+
sys.path.insert(0, os.path.abspath(os.pardir))
2350

2451
# -- General configuration ------------------------------------------------
2552

@@ -48,14 +75,14 @@
4875

4976
# General information about the project.
5077
project = u'unittest_expander'
51-
copyright = u'2014, Jan Kaliszewski (zuo)'
78+
copyright = u'2014-2021, Jan Kaliszewski (zuo) and others'
5279

5380
# The version info for the project you're documenting, acts as replacement for
5481
# |version| and |release|, also used in various other places throughout the
5582
# built documents.
5683
#
5784
# The full version, including alpha/beta/rc tags.
58-
release = '0.3.9.dev7'
85+
release = get_version_str()
5986
# The short X.Y version.
6087
version = '.'.join(release.split('.')[:2])
6188

@@ -201,7 +228,7 @@
201228
# author, documentclass [howto, manual, or own class]).
202229
latex_documents = [
203230
('index', 'unittest_expander.tex', u'unittest\\_expander Documentation',
204-
u'Jan Kaliszewski (zuo)', 'manual'),
231+
u'Jan Kaliszewski (zuo) and others', 'manual'),
205232
]
206233

207234
# The name of an image file (relative to this directory) to place at the top of
@@ -231,7 +258,7 @@
231258
# (source start file, name, description, authors, manual section).
232259
man_pages = [
233260
('index', 'unittest_expander', u'unittest_expander Documentation',
234-
[u'Jan Kaliszewski (zuo)'], 1)
261+
[u'Jan Kaliszewski (zuo) and others'], 1)
235262
]
236263

237264
# If true, show URL addresses after external links.
@@ -245,8 +272,8 @@
245272
# dir menu entry, description, category)
246273
texinfo_documents = [
247274
('index', 'unittest_expander', u'unittest_expander Documentation',
248-
u'Jan Kaliszewski (zuo)', 'unittest_expander',
249-
'One line description of project.', 'Miscellaneous'),
275+
u'Jan Kaliszewski (zuo) and others', 'unittest_expander',
276+
'Easy and flexible unittest parameterization.', 'Miscellaneous'),
250277
]
251278

252279
# Documents to append as an appendix to all manuals.
@@ -266,9 +293,9 @@
266293

267294
# Bibliographic Dublin Core info.
268295
epub_title = u'unittest_expander'
269-
epub_author = u'Jan Kaliszewski (zuo)'
296+
epub_author = u'Jan Kaliszewski (zuo) and others'
270297
epub_publisher = u'Jan Kaliszewski (zuo)'
271-
epub_copyright = u'2014, Jan Kaliszewski (zuo)'
298+
epub_copyright = u'2014-2021, Jan Kaliszewski (zuo) and others'
272299

273300
# The basename for the epub file. It defaults to the project name.
274301
#epub_basename = u'unittest_expander'

docs/index.rst

-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
.. unittest_expander documentation master file, created by
2-
sphinx-quickstart on Sat Jul 5 02:46:13 2014.
3-
You can adapt this file completely to your liking, but it should at least
4-
contain the root `toctree` directive.
5-
61
*unittest_expander* -- test parameterization library
72
====================================================
83

setup.cfg

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[metadata]
22
name = unittest_expander
3-
author = Jan Kaliszewski (zuo)
3+
version = 0.3.9.dev8
4+
author = Jan Kaliszewski (zuo) and others...
45
author_email = [email protected]
56
description = Easy and flexible unittest parameterization.
67
long_description = file: README.rst
@@ -28,4 +29,3 @@ classifiers =
2829
[options]
2930
py_modules = unittest_expander
3031
python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
31-
setup_requires = setuptools>=44; wheel

setup.py

-32
This file was deleted.

unittest_expander.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Copyright (c) 2014-2021 Jan Kaliszewski (zuo). All rights reserved.
1+
# Copyright (c) 2014-2021 Jan Kaliszewski (zuo) and others...
2+
# All rights reserved.
23
#
34
# Licensed under the MIT License:
45
#

0 commit comments

Comments
 (0)