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_nametohelpers.commonwhich humanises a function/class name -
Converted
setuppy.pyinto a python module folder atsetuppy/ -
Added new distutils extras:
extras/setuppy.txtto cover all setuppy optional requirementsextras/docs.txtcontains requirements for building the Sphinx documentationextras/dev.txtis a meta-extra which includes all extra requirements for development viafull,docsandtests
-
Created
privex.helpers.setuppy.bump- Most notably, this module contains a function
bump_versionwhich uses the packagesemverto bump a version number.
The version number is extracted from a python package file configured insettings.VERSION_FILEand 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.commandswhich contains setup.py / distutils command classes-
BumpCommandis 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 -
ExtrasCommandis a command class which helps with managing your package'sextra_requireby offering these features:- With no arguments,
./setup.py extraswould output a list of all requirements listed for each extra in yourextras_require - With the
--save=somefile.txtargument, the requirements can be outputted into a file - With the
--installargument, the requirements will be installed withpipusing the python version which is running setup.py - With the
--extra=myextraargument, only requirements for that individual extra will be listed/saved/installed
- With no arguments,
-
-
Added unit tests for
human_nameintests/test_general.py -
Created
tests/test_net.pyfor 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_FOLDERinto helpers.settings for consistency and easier changing -
Moved the various requirements.txt / extras related functions from
setuppy.pyintohelpers.setuppy.common -
Moved network related tests from
test_general.pyinto the newtest_net.py -
The
setup.pyused for privex-helpers itself now has the commandsbumpandextrasavailable, which uses the
new command classes fromprivex.helpers.setuppy.commands -
The file
privex/helpers/__init__.pynow importsprivex.loghelperinside of a try/except block, so if for some strange reason
privex-loghelperisn't installed or is broken, then it will fallback to standardlogging.getLoggerinstead of just breaking -
Fixed various issues with PyDoc blocks in several files, such as
cache.KeyManagerandcrypto.RedisCache -
Travis-CI now uses
pip install -U '.[dev]'instead of installing the requirements filedocs/requirements.txtand 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
setuppyfunctionality in the overview in README.md -
Updated the
docs/requirements.txtfile to include all important requirements -
Updated the
module.rstautosummary template to include attributes (if possible) -
Updated the
class.rstautosummary template so inherited attributes / methods are ignored (generated unit test class docs were often really spammy) -
Added detailed documentation for the
privex.helpers.setuppymodule -
Added an autosummary block for
privex.helpers.settingsso 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