Metadata-Version: 2.0
Name: rios.core
Version: 0.5.0
Summary: Parsing and Validation Library for RIOS Files
Home-page: https://bitbucket.org/prometheus/rios.core
Author: Prometheus Research, LLC
Author-email: contact@prometheusresearch.com
License: AGPLv3
Keywords: rios prismh research instrument assessment standard validation
Platform: UNKNOWN
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Requires-Dist: six (>=1.5,<2)
Requires-Dist: colander (>=1.0,<1.1)
Requires-Dist: pyyaml
Provides-Extra: dev
Requires-Dist: coverage (>=3.7,<4); extra == 'dev'
Requires-Dist: nose (>=1.3,<2); extra == 'dev'
Requires-Dist: nosy (>=1.1,<2); extra == 'dev'
Requires-Dist: prospector[with_pyroma] (>=0.10,<0.11); extra == 'dev'
Requires-Dist: twine (>=1.5,<2); extra == 'dev'
Requires-Dist: wheel (>=0.24,<0.25); extra == 'dev'
Requires-Dist: Sphinx (>=1.3,<2); extra == 'dev'
Requires-Dist: sphinx-autobuild (>=0.5,<0.6); extra == 'dev'
Requires-Dist: tox (>=2,<3); extra == 'dev'
Requires-Dist: HTSQL (>=2.3,<2.4); extra == 'dev'

.. image:: https://drone.io/bitbucket.org/prometheus/rios.core/status.png
   :target: https://drone.io/bitbucket.org/prometheus/rios.core/latest
   :alt: Build Status
.. image:: https://readthedocs.org/projects/rioscore/badge/?version=latest
   :target: https://rioscore.readthedocs.org
   :alt: Documentation Status
.. image:: https://img.shields.io/pypi/v/rios.core.svg
   :target: https://pypi.python.org/pypi/rios.core
.. image:: https://img.shields.io/pypi/l/rios.core.svg
   :target: https://pypi.python.org/pypi/rios.core

******************
RIOS.CORE Overview
******************

RIOS.CORE is a `Python`_ package that provides basic validation and
formatting functionality for data structures that adhere to the `RIOS`_
specifications (formally known as PRISMH).

.. _`Python`: https://www.python.org
.. _`RIOS`: https://rios.readthedocs.org


Example Usage
=============

This package exposes a handful of simple functions for validating and
formatting the standard RIOS data structures::

    >>> from rios.core import validate_instrument, get_instrument_json

    >>> instrument = {"foo": "bar", "id": "urn:my-instrument", "title": "An Instrument Title", "record": [{"id": "field1","type": "text"}], "version": "1.0"}
    >>> validate_instrument(instrument)
    Traceback (most recent call last):
        ...
    colander.Invalid: {'': u'Unrecognized keys in mapping: "{\'foo\': \'bar\'}"'}

    >>> del instrument['foo']
    >>> validate_instrument(instrument)

    >>> print get_instrument_json(instrument)
    {
      "id": "urn:my-instrument",
      "version": "1.0",
      "title": "An Instrument Title",
      "record": [
        {
          "id": "field1",
          "type": "text"
        }
      ]
    }


For more information on the available functionality, please read the API
documentation.


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

Contributions and/or fixes to this package are more than welcome. Please submit
them by forking this repository and creating a Pull Request that includes your
changes. We ask that you please include unit tests and any appropriate
documentation updates along with your code changes.

This project will adhere to the `Semantic Versioning`_ methodology as much as
possible, so when building dependent projects, please use appropriate version
restrictions.

.. _`Semantic Versioning`: http://semver.org

A development environment can be set up to work on this package by doing the
following::

    $ virtualenv rios
    $ cd rios
    $ . bin/activate
    $ hg clone ssh://hg@bitbucket.org/prometheus/rios.core
    $ pip install -e ./rios.core[dev]


License/Copyright
=================

This project is licensed under the GNU Affero General Public License, version
3. See the accompanying ``LICENSE.rst`` file for details.

Copyright (c) 2015, Prometheus Research, LLC



