2.1.0 Added human_name, refactored setuppy + more
This release is the official 2.1.0 release (as published to PyPi).
Melded commits from develop branch
Once we merged develop
into master
, two small fix commits were melded into this 2.1.0 commit, to ensure
the published PyPi 2.1.0 release matches this Git release.
-
fix all on dynamically loaded functions
-
forgot to include extras/tests.txt in dev.txt
New features:
-
Added new function
human_name
tohelpers.common
which humanises a function/class name -
Converted
setuppy.py
into a python module folder atsetuppy/
-
Added new distutils extras:
extras/setuppy.txt
to cover all setuppy optional requirementsextras/docs.txt
contains requirements for building the Sphinx documentationextras/dev.txt
is a meta-extra which includes all extra requirements for development viafull
,docs
andtests
-
Created
privex.helpers.setuppy.bump
- Most notably, this module contains a function
bump_version
which uses the packagesemver
to bump a version number.
The version number is extracted from a python package file configured insettings.VERSION_FILE
and after it's updated,
the file containing the version is automatically updated with the new version number.
- Most notably, this module contains a function
-
Created
privex.helpers.setuppy.commands
which contains setup.py / distutils command classes-
BumpCommand
is a command class which allows you to bump the version of a python package, including updating the file containing the version,
simply by running a command such as./setup.py bump --minor
-
ExtrasCommand
is a command class which helps with managing your package'sextra_require
by offering these features:- With no arguments,
./setup.py extras
would output a list of all requirements listed for each extra in yourextras_require
- With the
--save=somefile.txt
argument, the requirements can be outputted into a file - With the
--install
argument, the requirements will be installed withpip
using the python version which is running setup.py - With the
--extra=myextra
argument, only requirements for that individual extra will be listed/saved/installed
- With no arguments,
-
-
Added unit tests for
human_name
intests/test_general.py
-
Created
tests/test_net.py
for network related unit tests
General changes / improvements:
-
Added
__all__
to some modules, to reduce un-necessary objects being imported when you do wildcard imports such asfrom privex.helpers import *
-
Moved
EXTRAS_FOLDER
into helpers.settings for consistency and easier changing -
Moved the various requirements.txt / extras related functions from
setuppy.py
intohelpers.setuppy.common
-
Moved network related tests from
test_general.py
into the newtest_net.py
-
The
setup.py
used for privex-helpers itself now has the commandsbump
andextras
available, which uses the
new command classes fromprivex.helpers.setuppy.commands
-
The file
privex/helpers/__init__.py
now importsprivex.loghelper
inside of a try/except block, so if for some strange reason
privex-loghelper
isn't installed or is broken, then it will fallback to standardlogging.getLogger
instead of just breaking -
Fixed various issues with PyDoc blocks in several files, such as
cache.KeyManager
andcrypto.RedisCache
-
Travis-CI now uses
pip install -U '.[dev]'
instead of installing the requirements filedocs/requirements.txt
and package -
ReadTheDocs now uses
pip install -U '.[dev]'
instead of installing the requirements filedocs/requirements.txt
-
Possibly other small fixes / changes
Documentation related:
-
Listed some of the new
setuppy
functionality in the overview in README.md -
Updated the
docs/requirements.txt
file to include all important requirements -
Updated the
module.rst
autosummary template to include attributes (if possible) -
Updated the
class.rst
autosummary template so inherited attributes / methods are ignored (generated unit test class docs were often really spammy) -
Added detailed documentation for the
privex.helpers.setuppy
module -
Added an autosummary block for
privex.helpers.settings
so that it can correctly show the settings in the navigation -
Fixed up several module/class rst files with
:noindex:
and other minor fixes to reduce the amount of warnings when building the docs -
Re-organised the navigation tree for some modules to make it easier to use