# Path: tasks/meta.py
# class OBSTag(Base):
#     '''
#     Tags permit arbitrary groupings of columns.
# 
#     They should only be created as part of a :meth:`~.tasks.TagsTask.tags`
#     implementation.
# 
#     .. py:attribute:: id
# 
#        The unique identifier for this table.  Is always qualified by
#        the module name of the :class:`~.tasks.TagsTask` that created it, and
#        should never be specified manually.
# 
#     .. py:attribute:: name
# 
#        The name of this tag.  This is exposed in the API and user interfaces.
# 
#     .. py:attribute:: type
# 
#        The type of this tag.  This is used to provide more information about
#        what the tag means.  Examples are ``section``, ``subsection``,
#        ``license``, ``unit``, although any arbitrary type can be defined.
# 
#     .. py:attribute:: description
# 
#        Description of this tag.  This may be exposed in the API and catalog.
# 
#     .. py:attribute:: columns
# 
#        An iterable of all the :class:`~.meta.OBSColumn`s tagged with this tag.
# 
#     .. py:attribute:: version
# 
#        A version control number, used to determine whether the tag and its
#        metadata should be updated.
# 
#     '''
#     __tablename__ = 'obs_tag'
# 
#     id = Column(Text, primary_key=True)
# 
#     name = Column(Text, nullable=False)
#     type = Column(Text, nullable=False)
#     description = Column(Text)
# 
#     columns = association_proxy('tag_column_tags', 'column')
# 
#     version = Column(Numeric, default=0, nullable=False)
# 
# Path: tasks/base_tasks.py
# class TagsTask(Task):
#     '''
#     This will update-or-create :class:`OBSTag <tasks.meta.OBSTag>` objects
#     int the database when run.
# 
#     The :meth:`~.TagsTask.tags` method must be overwritten.
# 
#     :meth:`~TagsTask.version` is used to control updates to the database.
#     '''
# 
#     def tags(self):
#         '''
#         This method must be overwritten in subclasses.
# 
#         The return value must be an iterable of instances of
#         :class:`OBSTag <tasks.meta.OBSTag>`.
#         '''
#         raise NotImplementedError('Must return iterable of OBSTags')
# 
#     def on_failure(self, ex):
#         session_rollback(self, ex)
#         super(TagsTask, self).on_failure(ex)
# 
#     def on_success(self):
#         session_commit(self)
# 
#     def run(self):
#         for _, tagtarget in self.output().items():
#             tagtarget.update_or_create()
# 
#     def version(self):
#         return 0
# 
#     def output(self):
#         # if self.deps() and not all([d.complete() for d in self.deps()]):
#         #    raise Exception('Must run prerequisites first')
#         output = {}
#         for tag in self.tags():
#             orig_id = tag.id
#             tag.id = '.'.join([classpath(self), orig_id])
#             if not tag.version:
#                 tag.version = self.version()
#             output[orig_id] = TagTarget(tag, self)
#         return output


from tasks.meta import OBSTag
from tasks.base_tasks import TagsTask
            OBSTag(id='ine_property',
                   name='National Statistics Institute (INE) Property',
                   type='license',
                   description='http://www.ine.es/ss/Satellite?L=1&c=Page&cid=1254735849170&p=1254735849170&pagename=Ayuda%2FINELayout#'),
            OBSTag(id='zillow',
                   name='Zillow Group Data',
                   type='license',
                   description='http://www.zillow.com/research/data/. All data accessed and downloaded from this page is free for public use by consumers, media, analysts, academics etc., consistent with our published Terms of Use. Proper and clear attribution of all data to Zillow is required.'),
            OBSTag(id='eurostat_copyright',
                   name='Eurostat Copyright',
                   type='license',
                   description='''
                               Eurostat has a policy of encouraging free re-use of its data, both for
                               non-commercial and commercial purposes. All statistical
                               data, metadata, content of web pages or other dissemination
                               tools, official publications and other documents published
                               on its website, with the exceptions listed below, can be
                               reused without any payment or written licence provided that:
                               the source is indicated as Eurostat; when re-use involves
                               modifications to the data or text, this must be stated
                               clearly to the end user of the information. `Full copyright
                               notice
                               <http://ec.europa.eu/eurostat/about/our-partners/copyright>`_.'''),
            OBSTag(id='us_government_works',
                   name='U.S. Government Works',
                   type='license',
                   description='''
                               United States government creative works, including writing, images,
                               and computer code, are usually prepared by officers or employees
                               of the United States government as part of their official duties.

# Path: tasks/meta.py
# class OBSTag(Base):
#     '''
#     Tags permit arbitrary groupings of columns.
# 
#     They should only be created as part of a :meth:`~.tasks.TagsTask.tags`
#     implementation.
# 
#     .. py:attribute:: id
# 
#        The unique identifier for this table.  Is always qualified by
#        the module name of the :class:`~.tasks.TagsTask` that created it, and
#        should never be specified manually.
# 
#     .. py:attribute:: name
# 
#        The name of this tag.  This is exposed in the API and user interfaces.
# 
#     .. py:attribute:: type
# 
#        The type of this tag.  This is used to provide more information about
#        what the tag means.  Examples are ``section``, ``subsection``,
#        ``license``, ``unit``, although any arbitrary type can be defined.
# 
#     .. py:attribute:: description
# 
#        Description of this tag.  This may be exposed in the API and catalog.
# 
#     .. py:attribute:: columns
# 
#        An iterable of all the :class:`~.meta.OBSColumn`s tagged with this tag.
# 
#     .. py:attribute:: version
# 
#        A version control number, used to determine whether the tag and its
#        metadata should be updated.
# 
#     '''
#     __tablename__ = 'obs_tag'
# 
#     id = Column(Text, primary_key=True)
# 
#     name = Column(Text, nullable=False)
#     type = Column(Text, nullable=False)
#     description = Column(Text)
# 
#     columns = association_proxy('tag_column_tags', 'column')
# 
#     version = Column(Numeric, default=0, nullable=False)
# 
# Path: tasks/base_tasks.py
# class TagsTask(Task):
#     '''
#     This will update-or-create :class:`OBSTag <tasks.meta.OBSTag>` objects
#     int the database when run.
# 
#     The :meth:`~.TagsTask.tags` method must be overwritten.
# 
#     :meth:`~TagsTask.version` is used to control updates to the database.
#     '''
# 
#     def tags(self):
#         '''
#         This method must be overwritten in subclasses.
# 
#         The return value must be an iterable of instances of
#         :class:`OBSTag <tasks.meta.OBSTag>`.
#         '''
#         raise NotImplementedError('Must return iterable of OBSTags')
# 
#     def on_failure(self, ex):
#         session_rollback(self, ex)
#         super(TagsTask, self).on_failure(ex)
# 
#     def on_success(self):
#         session_commit(self)
# 
#     def run(self):
#         for _, tagtarget in self.output().items():
#             tagtarget.update_or_create()
# 
#     def version(self):
#         return 0
# 
#     def output(self):
#         # if self.deps() and not all([d.complete() for d in self.deps()]):
#         #    raise Exception('Must run prerequisites first')
#         output = {}
#         for tag in self.tags():
#             orig_id = tag.id
#             tag.id = '.'.join([classpath(self), orig_id])
#             if not tag.version:
#                 tag.version = self.version()
#             output[orig_id] = TagTarget(tag, self)
#         return output


# Path: tasks/tags.py
from tasks.meta import OBSTag
from tasks.base_tasks import TagsTask

            OBSTag(id='ine_property',
                   name='National Statistics Institute (INE) Property',
                   type='license',
                   description='http://www.ine.es/ss/Satellite?L=1&c=Page&cid=1254735849170&p=1254735849170&pagename=Ayuda%2FINELayout#'),
            OBSTag(id='zillow',
                   name='Zillow Group Data',
                   type='license',
                   description='http://www.zillow.com/research/data/. All data accessed and downloaded from this page is free for public use by consumers, media, analysts, academics etc., consistent with our published Terms of Use. Proper and clear attribution of all data to Zillow is required.'),
            OBSTag(id='eurostat_copyright',
                   name='Eurostat Copyright',
                   type='license',
                   description='''
                               Eurostat has a policy of encouraging free re-use of its data, both for
                               non-commercial and commercial purposes. All statistical
                               data, metadata, content of web pages or other dissemination
                               tools, official publications and other documents published
                               on its website, with the exceptions listed below, can be
                               reused without any payment or written licence provided that:
                               the source is indicated as Eurostat; when re-use involves
                               modifications to the data or text, this must be stated
                               clearly to the end user of the information. `Full copyright
                               notice
                               <http://ec.europa.eu/eurostat/about/our-partners/copyright>`_.'''),
            OBSTag(id='us_government_works',
                   name='U.S. Government Works',
                   type='license',
                   description='''
                               United States government creative works, including writing, images,
                               and computer code, are usually prepared by officers or employees
                               of the United States government as part of their official duties.

                               A government work is generally not subject to copyright in the United States