Metadata-Version: 2.1
Name: etools-validator
Version: 0.5
Summary: Django package that handles exporting of data
Home-page: https://github.com/unicef/etools-validator
Author: UNICEF
Author-email: dev@unicef.org
License: Apache 2 License
Platform: any
Classifier: Environment :: Web Environment
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Framework :: Django
Classifier: Framework :: Django :: 2.2
Classifier: Framework :: Django :: 3.0
Classifier: Framework :: Django :: 3.1
Classifier: Framework :: Django :: 3.2
Classifier: Intended Audience :: Developers
License-File: LICENSE
Requires-Dist: Django
Requires-Dist: djangorestframework
Requires-Dist: django-fsm
Provides-Extra: test
Requires-Dist: flake8 ; extra == 'test'
Requires-Dist: isort ; extra == 'test'
Requires-Dist: pytest ; extra == 'test'
Requires-Dist: pytest-cov ; extra == 'test'
Requires-Dist: pytest-django ; extra == 'test'
Requires-Dist: pytest-echo ; extra == 'test'
Requires-Dist: pytest-pythonpath ; extra == 'test'
Requires-Dist: factory-boy ; extra == 'test'

Validator
#########

Validator is a library that provides an improved handling of validation.

The following parts of validation are handled;

    - state
    - transistion


Installation
============

.. code-block:: bash

   pip install etools-validator


Setup
=====

Add ``validator`` to ``INSTALLED_APPS`` in ``settings.py``
.. code-block:: python

   INSTALLED_APPS = (
       ...
       'etools_validator',

   )


Usage
=====

Use ``validator`` in views

..  code-block:: python

   from validator.mixins import ValidatorViewMixin

   class ExampleView(ValidatorViewMixin, ListCreateAPIView):
       ...


Contributing
============

Environment Setup
-----------------

To install the necessary libraries

::

   $ pip install -r requirements/dev.txt


Coding Standards
----------------

See `PEP 8 Style Guide for Python Code <https://www.python.org/dev/peps/pep-0008/>`_ for complete details on the coding standards.

To run checks on the code to ensure code is in compliance

::

   $ flake8 .


Testing
-------

Testing is important and tests are located in `tests/` directory and can be run with;

::

   $ coverage run manage.py test

Coverage report is viewable in `build/coverage` directory, and can be generated with;

::

   $ coverage html


Links
-----

+--------------------+----------------+--------------+--------------------+
| Stable             |                | |master-cov| |                    |
+--------------------+----------------+--------------+--------------------+
| Development        |                | |dev-cov|    |                    |
+--------------------+----------------+--------------+--------------------+
| Source Code        |https://github.com/unicef/etools-validator          |
+--------------------+----------------+-----------------------------------+
| Issue tracker      |https://github.com/unicef/etools-validator/issues   |
+--------------------+----------------+-----------------------------------+


.. |master-cov| image:: https://circleci.com/gh/unicef/etools-validator/tree/master.svg?style=svg
                    :target: https://circleci.com/gh/unicef/etools-validator/tree/master


.. |dev-cov| image:: https://circleci.com/gh/unicef/etools-validator/tree/develop.svg?style=svg
                    :target: https://circleci.com/gh/unicef/etools-validator/tree/develop


Compatibility Matrix
--------------------

.. image:: https://travis-matrix-badges.herokuapp.com/repos/unicef/etools-validator/branches/develop


