Repository: CartoDB/cartoframes

Issue:
Small tweaks to  catalog
[x] 1. Return slug at every object with slug. For example, Dataset.slug doesn't work but it appears at dataset.to_dict. We talked about removing slug for the model but I'm regretting it after I've played a little bit with the library. 

[x] 2. Dataset.to_dict(): remove summary_jsonb.

[x] 3. Rename Catalog to CatalogDataset

[ ] 4. Custom `__repr__` for Variable objet. 

![image](https://user-images.githubusercontent.com/1161870/66732255-6bd3fb80-ee5b-11e9-8e2e-975222e564ef.png)

That would be great to include only for Variable object the description fields at the __repr__.

For longer description (bigger than 20 characters  let's add an ellipsis.

<Variable('CRMCYPERC_1a97ab94', 'My cool short description')>
<Variable('CRMCYPERC_1a97ab94', 'My cool long description bla bla bla ...'  )>





Discussion:

Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 980b6e94..113591ed 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,10 +8,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 ## [Unreleased]
 ## Added
 - Add nested filters for catalog search (#1038, #1069)
+- Get list of catalog entities by list of ids or slugs (#1089)
 
 ## Changed
 - Remove pandas extension in catalog classes (#1038, #1044)
 - Download dataset and geographies (#1050)
+- Rename catalog's Dataset to CatalogDataset (#1100)
 
 ## [1.0b3] - 2019-08-27
 ### Added
diff --git a/cartoframes/data/observatory/__init__.py b/cartoframes/data/observatory/__init__.py
index 2522fbb6..e949b7e4 100644
--- a/cartoframes/data/observatory/__init__.py
+++ b/cartoframes/data/observatory/__init__.py
@@ -3,7 +3,7 @@ from __future__ import absolute_import
 from .catalog import Catalog
 from .category import Category
 from .country import Country
-from .dataset import Dataset
+from .dataset import CatalogDataset
 from .geography import Geography
 from .provider import Provider
 from .variable import Variable
@@ -13,7 +13,7 @@ __all__ = [
     'Catalog',
     'Category',
     'Country',
-    'Dataset',
+    'CatalogDataset',
     'Geography',
     'Provider',
     'Variable'
diff --git a/cartoframes/data/observatory/catalog.py b/cartoframes/data/observatory/catalog.py
index 04a3efec..a07b1c7a 100644
--- a/cartoframes/data/observatory/catalog.py
+++ b/cartoframes/data/observatory/catalog.py
@@ -4,7 +4,7 @@ from .entity import is_slug_value
 from .category import Category
 from .country import Country
 from .geography import Geography
-from .dataset import Dataset
+from .dataset import CatalogDataset
 from .repository.constants import COUNTRY_FILTER, CATEGORY_FILTER, GEOGRAPHY_FILTER
 
 
@@ -45,7 +45,7 @@ class Catalog(object):
 
         """
 
-        return Dataset.get_all(self.filters)
+        return CatalogDataset.get_all(self.filters)
 
     @property
     def geographies(self):
@@ -124,8 +124,8 @@ class Catalog(object):
                 Only required for the purchased datasets.
 
         Returns:
-            :py:class:`Datasets <cartoframes.data.observatory.Datasets>`
+            :py:class:`CatalogDatasets <cartoframes.data.observatory.CatalogDatasets>`
 
         """
 
-        return Dataset.get_all(self.filters, credentials)
+        return CatalogDataset.get_all(self.filters, credentials)
diff --git a/cartoframes/data/observatory/dataset.py b/cartoframes/data/observatory/dataset.py
index af6aecd4..e23a5dbb 100644
--- a/cartoframes/data/observatory/dataset.py
+++ b/cartoframes/data/observatory/dataset.py
@@ -8,7 +8,7 @@ from .repository.variable_group_repo import get_variable_group_repo
 from .repository.constants import DATASET_FILTER
 
 
-class Dataset(CatalogEntity):
+class CatalogDataset(CatalogEntity):
     entity_repo = get_dataset_repo()
 
     @property
diff --git a/cartoframes/data/observatory/entity.py b/cartoframes/data/observatory/entity.py
index ceaf83bd..4a64eed6 100644
--- a/cartoframes/data/observatory/entity.py
+++ b/cartoframes/data/observatory/entity.py
@@ -21,6 +21,7 @@ class CatalogEntity(ABC):
 
     id_field = 'id'
     entity_repo = None
+    export_excluded_fields = ['summary_jsonb']
 
     def __init__(self, data):
         self.data = data
@@ -52,7 +53,7 @@ class CatalogEntity(ABC):
         return pd.Series(self.data)
 
     def to_dict(self):
-        return self.data
+        return {key: value for key, value in self.data.items() if key not in self.export_excluded_fields}
 
     def __eq__(self, other):
         return self.data == other.data
diff --git a/cartoframes/data/observatory/repository/dataset_repo.py b/cartoframes/data/observatory/repository/dataset_repo.py
index 66a1eb9a..df92b68a 100644
--- a/cartoframes/data/observatory/repository/dataset_repo.py
+++ b/cartoframes/data/observatory/repository/dataset_repo.py
@@ -24,8 +24,8 @@ class DatasetRepository(EntityRepository):
 
     @classmethod
     def _get_entity_class(cls):
-        from cartoframes.data.observatory.dataset import Dataset
-        return Dataset
+        from cartoframes.data.observatory.dataset import CatalogDataset
+        return CatalogDataset
 
     def _get_rows(self, filters=None):
         return self.client.get_datasets(filters)
diff --git a/cartoframes/data/observatory/variable.py b/cartoframes/data/observatory/variable.py
index 31a50e05..d21a459e 100644
--- a/cartoframes/data/observatory/variable.py
+++ b/cartoframes/data/observatory/variable.py
@@ -6,6 +6,9 @@ from .repository.variable_repo import get_variable_repo
 from .repository.constants import VARIABLE_FILTER
 
 
+_DESCRIPTION_LENGTH_LIMIT = 30
+
+
 class Variable(CatalogEntity):
 
     entity_repo = get_variable_repo()
@@ -64,3 +67,12 @@ class Variable(CatalogEntity):
     def dataset_name(self):
         _, _, dataset, _ = self.id.split('.')
         return dataset
+
+    def __repr__(self):
+        descr = self.description
+
+        if descr and len(descr) > _DESCRIPTION_LENGTH_LIMIT:
+            descr = descr[0:_DESCRIPTION_LENGTH_LIMIT] + '...'
+
+        return "<{classname}('{entity_id}','{descr}')>"\
+               .format(classname=self.__class__.__name__, entity_id=self._get_print_id(), descr=descr)
diff --git a/old-examples/07_catalog/discovery.ipynb b/old-examples/07_catalog/discovery.ipynb
index e29c4d1b..511fed15 100644
--- a/old-examples/07_catalog/discovery.ipynb
+++ b/old-examples/07_catalog/discovery.ipynb
@@ -203,9 +203,9 @@
    "metadata": {},
    "outputs": [],
    "source": [
-    "from cartoframes.data.observatory.dataset import Dataset\n",
+    "from cartoframes.data.observatory.dataset import CatalogDataset\n",
     "\n",
-    "isinstance(demographics_datasets[0], Dataset)"
+    "isinstance(demographics_datasets[0], CatalogDataset)"
    ]
   },
   {
@@ -276,7 +276,23 @@
    "metadata": {},
    "outputs": [],
    "source": [
-    "print(Dataset.get('od_acsquantile_928a2a23'))"
+    "CatalogDataset.get('od_acsquantile_928a2a23').to_dict()"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "And if we have a list of ids or slugs that we want to get from the catalog, we can obtain them in one call:"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "CatalogDataset.get_list(['od_acsquantile_ae4e7c82', 'od_acs_13345497'])"
    ]
   },
   {
@@ -350,7 +366,7 @@
    "outputs": [],
    "source": [
     "catalog2 = Catalog()\n",
-    "catalog2.country('usa').category('demographics').datasets"
+    "catalog2.country('spain').category('demographics').datasets"
    ]
   },
   {
@@ -426,64 +442,11 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 45,
-   "metadata": {},
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "SELECT t.* FROM datasets_public t WHERE t.country_id = 'usa' AND t.category_id = 'demographics' AND t.geography_id = 'carto-do-public-data.tiger.geography_usa_countyclipped_2015'\n"
-     ]
-    },
-    {
-     "data": {
-      "text/plain": [
-       "[<Dataset('od_acs_1f614ee8')>,\n",
-       " <Dataset('od_acs_c2868f47')>,\n",
-       " <Dataset('od_acs_c1c86582')>,\n",
-       " <Dataset('od_bls_c2f65959')>,\n",
-       " <Dataset('od_acs_b581bfd1')>,\n",
-       " <Dataset('od_acsquantile_1fc24f44')>,\n",
-       " <Dataset('od_tiger_66b9092c')>,\n",
-       " <Dataset('od_acs_c5eb4b5e')>,\n",
-       " <Dataset('od_acsquantile_7985540b')>,\n",
-       " <Dataset('od_bls_c334336e')>,\n",
-       " <Dataset('od_bls_b29cadd6')>,\n",
-       " <Dataset('od_bls_2b95fc6c')>,\n",
-       " <Dataset('od_bls_5c92ccfa')>,\n",
-       " <Dataset('od_acs_5c10acf4')>,\n",
-       " <Dataset('od_acs_5b8fdefd')>,\n",
-       " <Dataset('od_acsquantile_16d4b47e')>,\n",
-       " <Dataset('od_acsquantile_55a55662')>,\n",
-       " <Dataset('od_acsquantile_7ee89012')>,\n",
-       " <Dataset('od_acsquantile_9efa084')>,\n",
-       " <Dataset('od_bls_b11879b8')>,\n",
-       " <Dataset('od_bls_b7d3bb53')>,\n",
-       " <Dataset('od_bls_2edaeae9')>,\n",
-       " <Dataset('od_bls_59ddda7f')>,\n",
-       " <Dataset('od_bls_c7b94fdc')>,\n",
-       " <Dataset('od_bls_b611d164')>,\n",
-       " <Dataset('od_bls_2f1880de')>,\n",
-       " <Dataset('od_bls_581fb048')>,\n",
-       " <Dataset('od_bls_c67b25eb')>,\n",
-       " <Dataset('od_bls_b35ec7e1')>,\n",
-       " <Dataset('od_bls_2a57965b')>,\n",
-       " <Dataset('od_bls_5d50a6cd')>,\n",
-       " <Dataset('od_bls_5ed472a3')>,\n",
-       " <Dataset('od_bls_c0b0e700')>,\n",
-       " <Dataset('od_bls_b0da138f')>,\n",
-       " <Dataset('od_bls_29d34235')>,\n",
-       " <Dataset('od_acs_550657ce')>]"
-      ]
-     },
-     "execution_count": 45,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
-   "source": [
-    "Catalog().country('usa').category('demographics').geography('carto-do-public-data.tiger.geography_usa_countyclipped_2015').datasets"
+   "execution_count": null,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "Catalog().country('usa').category('demographics').geography('od_countyclipp_caef1ec9').datasets"
    ]
   }
  ],


Test patch:
diff --git a/test/data/observatory/examples.py b/test/data/observatory/examples.py
index ecf8fa70..56206aae 100644
--- a/test/data/observatory/examples.py
+++ b/test/data/observatory/examples.py
@@ -1,5 +1,5 @@
 from cartoframes.data.observatory.variable import Variable
-from cartoframes.data.observatory.dataset import Dataset
+from cartoframes.data.observatory.dataset import CatalogDataset
 from cartoframes.data.observatory.category import Category
 from cartoframes.data.observatory.geography import Geography
 from cartoframes.data.observatory.country import Country
@@ -93,15 +93,15 @@ db_dataset2 = {
     'is_public_data': False,
     'summary_jsonb': {}
 }
-test_dataset1 = Dataset(db_dataset1)
-test_dataset2 = Dataset(db_dataset2)
+test_dataset1 = CatalogDataset(db_dataset1)
+test_dataset2 = CatalogDataset(db_dataset2)
 test_datasets = CatalogList([test_dataset1, test_dataset2])
 
 db_variable1 = {
     'id': 'carto-do.variable.var1',
     'slug': 'var1',
     'name': 'Population',
-    'description': 'The number of people within each geography',
+    'description': 'Number of people',
     'column_name': 'pop',
     'db_type': 'Numeric',
     'dataset_id': 'dataset1',
diff --git a/test/data/observatory/repository/test_dataset_repo.py b/test/data/observatory/repository/test_dataset_repo.py
index 93389a7e..2b491d50 100644
--- a/test/data/observatory/repository/test_dataset_repo.py
+++ b/test/data/observatory/repository/test_dataset_repo.py
@@ -1,7 +1,7 @@
 import unittest
 
 from cartoframes.auth import Credentials
-from cartoframes.data.observatory.dataset import Dataset
+from cartoframes.data.observatory.dataset import CatalogDataset
 
 from cartoframes.exceptions import DiscoveryException
 from cartoframes.data.observatory.entity import CatalogList
@@ -176,7 +176,7 @@ class TestDatasetRepo(unittest.TestCase):
         mocked_repo.return_value = [{'id': 'dataset1'}]
         repo = DatasetRepository()
 
-        expected_datasets = CatalogList([Dataset({
+        expected_datasets = CatalogList([CatalogDataset({
             'id': 'dataset1',
             'slug': None,
             'name': None,
diff --git a/test/data/observatory/test_catalog.py b/test/data/observatory/test_catalog.py
index be63d307..5759baf2 100644
--- a/test/data/observatory/test_catalog.py
+++ b/test/data/observatory/test_catalog.py
@@ -5,7 +5,7 @@ from cartoframes.auth import Credentials
 from cartoframes.data.observatory.geography import Geography
 from cartoframes.data.observatory.country import Country
 from cartoframes.data.observatory.category import Category
-from cartoframes.data.observatory.dataset import Dataset
+from cartoframes.data.observatory.dataset import CatalogDataset
 from cartoframes.data.observatory.catalog import Catalog
 from cartoframes.data.observatory.repository.geography_repo import GeographyRepository
 from .examples import test_country2, test_country1, test_category1, test_category2, test_dataset1, test_dataset2, \
@@ -45,7 +45,7 @@ class TestCatalog(unittest.TestCase):
         # Then
         assert categories == expected_categories
 
-    @patch.object(Dataset, 'get_all')
+    @patch.object(CatalogDataset, 'get_all')
     def test_datasets(self, mocked_datasets):
         # Given
         expected_datasets = [test_dataset1, test_dataset2]
@@ -84,7 +84,7 @@ class TestCatalog(unittest.TestCase):
         mocked_categories.called_once_with({'country_id': 'usa'})
         assert categories == test_categories
 
-    @patch.object(Dataset, 'get_all')
+    @patch.object(CatalogDataset, 'get_all')
     def test_filters_on_datasets(self, mocked_datasets):
         # Given
         mocked_datasets.return_value = test_datasets
@@ -110,7 +110,7 @@ class TestCatalog(unittest.TestCase):
         mocked_geographies.called_once_with({'country_id': 'usa', 'category_id': 'demographics'})
         assert geographies == test_geographies
 
-    @patch.object(Dataset, 'get_all')
+    @patch.object(CatalogDataset, 'get_all')
     def test_all_filters(self, mocked_datasets):
         # Given
         mocked_datasets.return_value = test_datasets
@@ -128,7 +128,7 @@ class TestCatalog(unittest.TestCase):
 
         assert datasets == test_datasets
 
-    @patch.object(Dataset, 'get_all')
+    @patch.object(CatalogDataset, 'get_all')
     @patch.object(GeographyRepository, 'get_by_id')
     def test_geography_filter_by_slug(self, mocked_repo, mocked_datasets):
         # Given
@@ -145,7 +145,7 @@ class TestCatalog(unittest.TestCase):
         mocked_datasets.assert_called_once_with({'geography_id': test_geography1.id})
         assert datasets == test_datasets
 
-    @patch.object(Dataset, 'get_all')
+    @patch.object(CatalogDataset, 'get_all')
     def test_purchased_datasets(self, mocked_purchased_datasets):
         # Given
         expected_datasets = [test_dataset1, test_dataset2]
diff --git a/test/data/observatory/test_category.py b/test/data/observatory/test_category.py
index 8beedc3d..5ba3f045 100644
--- a/test/data/observatory/test_category.py
+++ b/test/data/observatory/test_category.py
@@ -104,7 +104,7 @@ class TestCategory(unittest.TestCase):
         assert isinstance(category_dict, dict)
         assert category_dict == db_category1
 
-    def test_category_is_represented_with_id(self):
+    def test_category_is_represented_with_classname_and_id(self):
         # Given
         category = Category(db_category1)
 
@@ -137,7 +137,7 @@ class TestCategory(unittest.TestCase):
         assert isinstance(categories, CatalogList)
         assert categories == test_categories
 
-    def test_category_list_is_printed_with_classname(self):
+    def test_category_list_is_printed_with_classname_and_ids(self):
         # Given
         categories = CatalogList([test_category1, test_category2])
 
@@ -148,7 +148,7 @@ class TestCategory(unittest.TestCase):
         assert categories_str == "[<Category('{id1}')>, <Category('{id2}')>]" \
                                  .format(id1=db_category1['id'], id2=db_category2['id'])
 
-    def test_category_list_is_represented_with_ids(self):
+    def test_category_list_is_represented_with_classname_and_ids(self):
         # Given
         categories = CatalogList([test_category1, test_category2])
 
diff --git a/test/data/observatory/test_country.py b/test/data/observatory/test_country.py
index 3e54c4dc..1c9ecba4 100644
--- a/test/data/observatory/test_country.py
+++ b/test/data/observatory/test_country.py
@@ -117,7 +117,7 @@ class TestCountry(unittest.TestCase):
         assert isinstance(country_dict, dict)
         assert country_dict == db_country1
 
-    def test_country_is_represented_with_id(self):
+    def test_country_is_represented_with_classname_and_id(self):
         # Given
         country = Country(db_country1)
 
@@ -150,7 +150,7 @@ class TestCountry(unittest.TestCase):
         assert isinstance(countries, CatalogList)
         assert countries == test_countries
 
-    def test_country_list_is_printed_with_classname(self):
+    def test_country_list_is_printed_with_classname_and_ids(self):
         # Given
         countries = CatalogList([test_country1, test_country2])
 
@@ -161,7 +161,7 @@ class TestCountry(unittest.TestCase):
         assert countries_str == "[<Country('{id1}')>, <Country('{id2}')>]" \
                                 .format(id1=db_country1['id'], id2=db_country2['id'])
 
-    def test_country_list_is_represented_with_ids(self):
+    def test_country_list_is_represented_with_classname_and_ids(self):
         # Given
         countries = CatalogList([test_country1, test_country2])
 
diff --git a/test/data/observatory/test_dataset.py b/test/data/observatory/test_dataset.py
index b834bb1f..d7b503e7 100644
--- a/test/data/observatory/test_dataset.py
+++ b/test/data/observatory/test_dataset.py
@@ -7,7 +7,7 @@ from carto.exceptions import CartoException
 
 from cartoframes.auth import Credentials
 from cartoframes.data.observatory.entity import CatalogList
-from cartoframes.data.observatory.dataset import Dataset
+from cartoframes.data.observatory.dataset import CatalogDataset
 from cartoframes.data.observatory.repository.variable_repo import VariableRepository
 from cartoframes.data.observatory.repository.variable_group_repo import VariableGroupRepository
 from cartoframes.data.observatory.repository.dataset_repo import DatasetRepository
@@ -29,11 +29,11 @@ class TestDataset(unittest.TestCase):
         mocked_repo.return_value = test_dataset1
 
         # When
-        dataset = Dataset.get(test_dataset1.id)
+        dataset = CatalogDataset.get(test_dataset1.id)
 
         # Then
         assert isinstance(dataset, object)
-        assert isinstance(dataset, Dataset)
+        assert isinstance(dataset, CatalogDataset)
         assert dataset == test_dataset1
 
     def test_get_dataset_by_id_from_datasets_list(self):
@@ -45,7 +45,7 @@ class TestDataset(unittest.TestCase):
 
         # Then
         assert isinstance(dataset, object)
-        assert isinstance(dataset, Dataset)
+        assert isinstance(dataset, CatalogDataset)
         assert dataset == test_dataset1
 
     def test_get_dataset_by_slug_from_datasets_list(self):
@@ -57,7 +57,7 @@ class TestDataset(unittest.TestCase):
 
         # Then
         assert isinstance(dataset, object)
-        assert isinstance(dataset, Dataset)
+        assert isinstance(dataset, CatalogDataset)
         assert dataset == test_dataset1
 
     @patch.object(VariableRepository, 'get_all')
@@ -90,7 +90,7 @@ class TestDataset(unittest.TestCase):
 
     def test_dataset_properties(self):
         # Given
-        dataset = Dataset(db_dataset1)
+        dataset = CatalogDataset(db_dataset1)
 
         # When
         dataset_id = dataset.id
@@ -141,34 +141,35 @@ class TestDataset(unittest.TestCase):
 
     def test_dataset_is_exported_as_dict(self):
         # Given
-        dataset = Dataset(db_dataset1)
+        dataset = CatalogDataset(db_dataset1)
+        expected_dict = {key: value for key, value in db_dataset1.items() if key is not 'summary_jsonb'}
 
         # When
         dataset_dict = dataset.to_dict()
 
         # Then
         assert isinstance(dataset_dict, dict)
-        assert dataset_dict == db_dataset1
+        assert dataset_dict == expected_dict
 
-    def test_dataset_is_represented_with_id(self):
+    def test_dataset_is_represented_with_classname_and_slug(self):
         # Given
-        dataset = Dataset(db_dataset1)
+        dataset = CatalogDataset(db_dataset1)
 
         # When
         dataset_repr = repr(dataset)
 
         # Then
-        assert dataset_repr == "<Dataset('{id}')>".format(id=db_dataset1['slug'])
+        assert dataset_repr == "<CatalogDataset('{id}')>".format(id=db_dataset1['slug'])
 
     def test_dataset_is_printed_with_classname(self):
         # Given
-        dataset = Dataset(db_dataset1)
+        dataset = CatalogDataset(db_dataset1)
 
         # When
         dataset_str = str(dataset)
 
         # Then
-        assert dataset_str == 'Dataset({dict_str})'.format(dict_str=str(db_dataset1))
+        assert dataset_str == 'CatalogDataset({dict_str})'.format(dict_str=str(db_dataset1))
 
     @patch.object(DatasetRepository, 'get_all')
     def test_get_all_datasets(self, mocked_repo):
@@ -176,7 +177,7 @@ class TestDataset(unittest.TestCase):
         mocked_repo.return_value = test_datasets
 
         # When
-        datasets = Dataset.get_all()
+        datasets = CatalogDataset.get_all()
 
         # Then
         assert isinstance(datasets, list)
@@ -189,14 +190,14 @@ class TestDataset(unittest.TestCase):
         credentials = Credentials('user', '1234')
 
         # When
-        datasets = Dataset.get_all(credentials=credentials)
+        datasets = CatalogDataset.get_all(credentials=credentials)
 
         # Then
         mocked_repo.assert_called_once_with(None, credentials)
         assert isinstance(datasets, list)
         assert isinstance(datasets, CatalogList)
 
-    def test_dataset_list_is_printed_with_classname(self):
+    def test_dataset_list_is_printed_with_classname_and_slugs(self):
         # Given
         datasets = CatalogList([test_dataset1, test_dataset2])
 
@@ -204,10 +205,10 @@ class TestDataset(unittest.TestCase):
         datasets_str = str(datasets)
 
         # Then
-        assert datasets_str == "[<Dataset('{id1}')>, <Dataset('{id2}')>]"\
+        assert datasets_str == "[<CatalogDataset('{id1}')>, <CatalogDataset('{id2}')>]"\
                                .format(id1=db_dataset1['slug'], id2=db_dataset2['slug'])
 
-    def test_dataset_list_is_represented_with_slugs(self):
+    def test_dataset_list_is_represented_with_classname_and_slugs(self):
         # Given
         datasets = CatalogList([test_dataset1, test_dataset2])
 
@@ -215,7 +216,7 @@ class TestDataset(unittest.TestCase):
         datasets_repr = repr(datasets)
 
         # Then
-        assert datasets_repr == "[<Dataset('{id1}')>, <Dataset('{id2}')>]"\
+        assert datasets_repr == "[<CatalogDataset('{id1}')>, <CatalogDataset('{id2}')>]"\
                                 .format(id1=db_dataset1['slug'], id2=db_dataset2['slug'])
 
     def test_datasets_items_are_obtained_as_dataset(self):
@@ -226,7 +227,7 @@ class TestDataset(unittest.TestCase):
         dataset = datasets[0]
 
         # Then
-        assert isinstance(dataset, Dataset)
+        assert isinstance(dataset, CatalogDataset)
         assert dataset == test_dataset1
 
     def test_datasets_are_exported_as_dataframe(self):
@@ -257,7 +258,7 @@ class TestDataset(unittest.TestCase):
         username = 'fake_user'
         credentials = CredentialsMock(username)
 
-        dataset = Dataset.get(test_dataset1.id)
+        dataset = CatalogDataset.get(test_dataset1.id)
         response = dataset.download(credentials)
 
         assert response == file_path
@@ -275,6 +276,6 @@ class TestDataset(unittest.TestCase):
         username = 'fake_user'
         credentials = CredentialsMock(username)
 
-        dataset = Dataset.get(test_dataset1.id)
+        dataset = CatalogDataset.get(test_dataset1.id)
         with self.assertRaises(CartoException):
             dataset.download(credentials)
diff --git a/test/data/observatory/test_geography.py b/test/data/observatory/test_geography.py
index db384968..d9965f87 100644
--- a/test/data/observatory/test_geography.py
+++ b/test/data/observatory/test_geography.py
@@ -117,15 +117,16 @@ class TestGeography(unittest.TestCase):
     def test_geography_is_exported_as_dict(self):
         # Given
         geography = Geography(db_geography1)
+        expected_dict = {key: value for key, value in db_geography1.items() if key is not 'summary_jsonb'}
 
         # When
         geography_dict = geography.to_dict()
 
         # Then
         assert isinstance(geography_dict, dict)
-        assert geography_dict == db_geography1
+        assert geography_dict == expected_dict
 
-    def test_geography_is_represented_with_id(self):
+    def test_geography_is_represented_with_classname_and_slug(self):
         # Given
         geography = Geography(db_geography1)
 
@@ -158,7 +159,7 @@ class TestGeography(unittest.TestCase):
         assert isinstance(geographies, CatalogList)
         assert geographies == test_geographies
 
-    def test_geography_list_is_printed_with_classname(self):
+    def test_geography_list_is_printed_with_classname_and_slugs(self):
         # Given
         geographies = CatalogList([test_geography1, test_geography2])
 
@@ -169,7 +170,7 @@ class TestGeography(unittest.TestCase):
         assert categories_str == "[<Geography('{id1}')>, <Geography('{id2}')>]" \
                                  .format(id1=db_geography1['slug'], id2=db_geography2['slug'])
 
-    def test_geography_list_is_represented_with_ids(self):
+    def test_geography_list_is_represented_with_classname_and_slugs(self):
         # Given
         geographies = CatalogList([test_geography1, test_geography2])
 
diff --git a/test/data/observatory/test_provider.py b/test/data/observatory/test_provider.py
index 007555e6..a9e7ae52 100644
--- a/test/data/observatory/test_provider.py
+++ b/test/data/observatory/test_provider.py
@@ -88,7 +88,7 @@ class TestProvider(unittest.TestCase):
         assert isinstance(provider_dict, dict)
         assert provider_dict == db_provider1
 
-    def test_provider_is_represented_with_id(self):
+    def test_provider_is_represented_with_classname_and_id(self):
         # Given
         provider = Provider(db_provider1)
 
@@ -121,7 +121,7 @@ class TestProvider(unittest.TestCase):
         assert isinstance(providers, CatalogList)
         assert providers == test_providers
 
-    def test_provider_list_is_printed_with_classname(self):
+    def test_provider_list_is_printed_with_classname_and_ids(self):
         # Given
         providers = CatalogList([test_provider1, test_provider2])
 
@@ -132,7 +132,7 @@ class TestProvider(unittest.TestCase):
         assert providers_str == "[<Provider('{id1}')>, <Provider('{id2}')>]" \
                                 .format(id1=db_provider1['id'], id2=db_provider2['id'])
 
-    def test_provider_list_is_represented_with_ids(self):
+    def test_provider_list_is_represented_with_classname_and_ids(self):
         # Given
         providers = CatalogList([test_provider1, test_provider2])
 
diff --git a/test/data/observatory/test_variable.py b/test/data/observatory/test_variable.py
index cdf539c5..5bc5ba07 100644
--- a/test/data/observatory/test_variable.py
+++ b/test/data/observatory/test_variable.py
@@ -110,15 +110,16 @@ class TestVariable(unittest.TestCase):
     def test_variable_is_exported_as_dict(self):
         # Given
         variable = Variable(db_variable1)
+        expected_dict = {key: value for key, value in db_variable1.items() if key is not 'summary_jsonb'}
 
         # When
         variable_dict = variable.to_dict()
 
         # Then
         assert isinstance(variable_dict, dict)
-        assert variable_dict == db_variable1
+        assert variable_dict == expected_dict
 
-    def test_variable_is_represented_with_id(self):
+    def test_variable_is_represented_with_slug_and_description(self):
         # Given
         variable = Variable(db_variable1)
 
@@ -126,7 +127,8 @@ class TestVariable(unittest.TestCase):
         variable_repr = repr(variable)
 
         # Then
-        assert variable_repr == "<Variable('{id}')>".format(id=db_variable1['slug'])
+        assert variable_repr == "<Variable('{slug}','{descr}')>"\
+                                .format(slug=db_variable1['slug'], descr=db_variable1['description'])
 
     def test_variable_is_printed_with_classname(self):
         # Given
@@ -151,27 +153,31 @@ class TestVariable(unittest.TestCase):
         assert isinstance(variables, CatalogList)
         assert variables == test_variables
 
-    def test_variable_list_is_printed_with_classname(self):
+    def test_variable_list_is_printed_correctly(self):
         # Given
         variables = CatalogList([test_variable1, test_variable2])
+        shorten_description = test_variable2.description[0:30] + '...'
 
         # When
         variables_str = str(variables)
 
         # Then
-        assert variables_str == "[<Variable('{id1}')>, <Variable('{id2}')>]" \
-                                .format(id1=db_variable1['slug'], id2=db_variable2['slug'])
+        assert variables_str == "[<Variable('{id1}','{descr1}')>, <Variable('{id2}','{descr2}')>]" \
+                                .format(id1=db_variable1['slug'], descr1=db_variable1['description'],
+                                        id2=db_variable2['slug'], descr2=shorten_description)
 
-    def test_variable_list_is_represented_with_ids(self):
+    def test_variable_list_is_represented_correctly(self):
         # Given
         variables = CatalogList([test_variable1, test_variable2])
+        shorten_description = test_variable2.description[0:30] + '...'
 
         # When
         variables_repr = repr(variables)
 
         # Then
-        assert variables_repr == "[<Variable('{id1}')>, <Variable('{id2}')>]"\
-                                 .format(id1=db_variable1['slug'], id2=db_variable2['slug'])
+        assert variables_repr == "[<Variable('{id1}','{descr1}')>, <Variable('{id2}','{descr2}')>]" \
+                                 .format(id1=db_variable1['slug'], descr1=db_variable1['description'],
+                                         id2=db_variable2['slug'], descr2=shorten_description)
 
     def test_variables_items_are_obtained_as_variable(self):
         # Given
diff --git a/test/data/observatory/test_variable_group.py b/test/data/observatory/test_variable_group.py
index e25b927c..ab814005 100644
--- a/test/data/observatory/test_variable_group.py
+++ b/test/data/observatory/test_variable_group.py
@@ -107,7 +107,7 @@ class TestVariableGroup(unittest.TestCase):
         assert isinstance(variable_group_dict, dict)
         assert variable_group_dict == db_variable_group1
 
-    def test_variable_group_is_represented_with_id(self):
+    def test_variable_group_is_represented_with_classname_and_slug(self):
         # Given
         variable_group = VariableGroup(db_variable_group1)
 
@@ -140,7 +140,7 @@ class TestVariableGroup(unittest.TestCase):
         assert isinstance(variables_groups, CatalogList)
         assert variables_groups == test_variables_groups
 
-    def test_variable_group_list_is_printed_with_classname(self):
+    def test_variable_group_list_is_printed_with_classname_and_slug(self):
         # Given
         variables_groups = CatalogList([test_variable_group1, test_variable_group2])
 
@@ -151,7 +151,7 @@ class TestVariableGroup(unittest.TestCase):
         assert variables_groups_str == "[<VariableGroup('{id1}')>, <VariableGroup('{id2}')>]" \
                                        .format(id1=db_variable_group1['slug'], id2=db_variable_group2['slug'])
 
-    def test_variable_group_list_is_represented_with_ids(self):
+    def test_variable_group_list_is_represented_with_classname_and_slug(self):
         # Given
         variables_groups = CatalogList([test_variable_group1, test_variable_group2])