Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tocoli/tocolib
A multipurpose utility library for Python 2 and 3.
https://github.com/tocoli/tocolib
auth encoding filter mapping python27 python36 reduce regex sorting testing utility-library
Last synced: about 2 months ago
JSON representation
A multipurpose utility library for Python 2 and 3.
- Host: GitHub
- URL: https://github.com/tocoli/tocolib
- Owner: tocoli
- License: mit
- Created: 2018-12-31T19:33:39.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-17T18:27:57.000Z (almost 6 years ago)
- Last Synced: 2024-10-13T09:41:36.178Z (3 months ago)
- Topics: auth, encoding, filter, mapping, python27, python36, reduce, regex, sorting, testing, utility-library
- Language: Python
- Homepage:
- Size: 129 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
tocolib
=======|build-status| |docs|
The ``tocolib`` contains utility functions for common use cases to make your life as developer easier.
For more information on the functionality included see the `description `_ file or
vist the `documentation `_.For latest changes see the `change log `_.
Install
=======System Dependencies
-------------------Make sure that ``pip2`` or ``pip3`` is globally available. For example, if you like to use the library under ubuntu do:
For Python 2 install ``pip2``:
``sudo apt-get install python-pip``
For Python 3 install ``pip3``:
``sudo apt-get install python3-pip``
.. note:: If you are unfamiliar with installing packages in python you might want to read the
documentation on this topic: `Installing Packages `_Library Dependencies
--------------------Install all runtime dependencies into a virtual environment.
.. note:: Make sure you have ``virtualenv`` installed globally on your system.
For Python 2:
::virtualenv -p /usr/bin/python2.7 py27
source py27/bin/activate
pip install -r requirements.txtFor Python 3:
::virtualenv -p /usr/bin/python3.6 py36
source py36/bin/activate
pip install -r requirements.txtTo leave a ``virtualenv`` run:
``deactivate``
.. note:: If you don't like to built heavy weighted dependencies by yourself,
then you might want to install some prebuild version globally.
E.g. under ubuntu do:
``sudo apt-get install python-levenshtein python-numpy``or
``sudo apt-get install python3-levenshtein python3-numpy``
Testing
=======Run all tests with the built-in test discovery or with ``pytest``.
.. note:: Make sure you have ``pytest`` installed. For example with:
``pip install pytest``
built-in testing:
``python -m unittest discover -s './tests' -p 'test_*.py'``
or with ``pytest``:
``pytest tests``
If you want to test just some parts of the library, then one can invoke more specficic commands. Replace ``test_module``, ``TestClass``, ``test_function`` respectivly by the actual name.
run a test suite:
``python -m unittest tests.test_module``
run a test class:
``python -m unittest tests.test_module.TestClass``
run a test function:
``python -m unittest tests.test_module.TestClass.test_function``
.. |build-status| image:: https://api.travis-ci.org/tocoli/tocolib.svg?branch=master
:alt: build status
:scale: 100%
:target: https://travis-ci.org/tocoli/tocolib.. |docs| image:: https://readthedocs.org/projects/tocolib/badge/?version=latest
:alt: Documentation Status
:scale: 100%
:target: https://tocolib.readthedocs.io/en/latest/?badge=latest