Skip to content

Commit

Permalink
Minor improvements, updates and fixes related to...
Browse files Browse the repository at this point in the history
...setup, versioning, authorship/copyright info, docs generation;
in particular, got rid of `setup.py` (now, `setup.cfg` is sufficient).
  • Loading branch information
zuo committed Nov 12, 2021
1 parent ade480c commit e3c3395
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 52 deletions.
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2014-2021 Jan Kaliszewski (zuo). All rights reserved.
Copyright (c) 2014-2021 Jan Kaliszewski (zuo) and others... All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
9 changes: 7 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@ The library is compatible with Python 2.7, 3.4, 3.5, 3.6, 3.7, 3.8,
3.9 and 3.10, and does not depend on any external packages (i.e.,
uses only the Python standard library).

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

.. _Jan Kaliszewski (zuo): https://github.com/zuo/
.. _others...: https://github.com/zuo/unittest_expander/pulls?q=is%3Apr+is%3Amerged
.. _MIT License: https://github.com/zuo/unittest_expander/blob/main/LICENSE.txt


Installing
----------

Expand Down
45 changes: 36 additions & 9 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,39 @@

import sys
import os
import os.path as osp
import re


VERSION_LINE_REGEX = re.compile(br'''
^
version
\s*
=
\s*
(?P<version_str>
\S+
)
\s*
$
''', re.VERBOSE)


def get_version_str():
setup_cfg_path = osp.join(os.pardir, 'setup.cfg')
with open(setup_cfg_path, 'rb') as f:
for line in f:
match = VERSION_LINE_REGEX.search(line)
if match:
return match.group('version_str').decode('utf-8')
raise AssertionError('version not found')


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

# -- General configuration ------------------------------------------------

Expand Down Expand Up @@ -48,14 +75,14 @@

# General information about the project.
project = u'unittest_expander'
copyright = u'2014, Jan Kaliszewski (zuo)'
copyright = u'2014-2021, Jan Kaliszewski (zuo) and others'

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

Expand Down Expand Up @@ -201,7 +228,7 @@
# author, documentclass [howto, manual, or own class]).
latex_documents = [
('index', 'unittest_expander.tex', u'unittest\\_expander Documentation',
u'Jan Kaliszewski (zuo)', 'manual'),
u'Jan Kaliszewski (zuo) and others', 'manual'),
]

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

# If true, show URL addresses after external links.
Expand All @@ -245,8 +272,8 @@
# dir menu entry, description, category)
texinfo_documents = [
('index', 'unittest_expander', u'unittest_expander Documentation',
u'Jan Kaliszewski (zuo)', 'unittest_expander',
'One line description of project.', 'Miscellaneous'),
u'Jan Kaliszewski (zuo) and others', 'unittest_expander',
'Easy and flexible unittest parameterization.', 'Miscellaneous'),
]

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

# Bibliographic Dublin Core info.
epub_title = u'unittest_expander'
epub_author = u'Jan Kaliszewski (zuo)'
epub_author = u'Jan Kaliszewski (zuo) and others'
epub_publisher = u'Jan Kaliszewski (zuo)'
epub_copyright = u'2014, Jan Kaliszewski (zuo)'
epub_copyright = u'2014-2021, Jan Kaliszewski (zuo) and others'

# The basename for the epub file. It defaults to the project name.
#epub_basename = u'unittest_expander'
Expand Down
5 changes: 0 additions & 5 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
.. unittest_expander documentation master file, created by
sphinx-quickstart on Sat Jul 5 02:46:13 2014.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
*unittest_expander* -- test parameterization library
====================================================

Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[metadata]
name = unittest_expander
author = Jan Kaliszewski (zuo)
version = 0.3.9.dev8
author = Jan Kaliszewski (zuo) and others...
author_email = [email protected]
description = Easy and flexible unittest parameterization.
long_description = file: README.rst
Expand Down Expand Up @@ -28,4 +29,3 @@ classifiers =
[options]
py_modules = unittest_expander
python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
setup_requires = setuptools>=44; wheel
32 changes: 0 additions & 32 deletions setup.py

This file was deleted.

3 changes: 2 additions & 1 deletion unittest_expander.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Copyright (c) 2014-2021 Jan Kaliszewski (zuo). All rights reserved.
# Copyright (c) 2014-2021 Jan Kaliszewski (zuo) and others...
# All rights reserved.
#
# Licensed under the MIT License:
#
Expand Down

0 comments on commit e3c3395

Please sign in to comment.