wdmmg / wdmmg / lib /

Full commit
import logging

from celery.task import task

from wdmmg.lib import aggregator
from wdmmg.lib.csvimport import load_dataset as csv_load_dataset
from wdmmg.lib.cubes import Cube

log = logging.getLogger(__name__)

def load_dataset(resource_url, model, **kwargs):
    out = csv_load_dataset(resource_url, model, **kwargs)
    return out

def update_distincts(dataset_name):
    update the collection for all distinct values in the entries in
    a dataset *dataset_name*

        Name of a dataset

    Returns: None
    Raises: :exc:`pymongo.errors.OperationFailure` if the dataset does
    not exist.
    log.debug("Compute distincts collection for dataset: %s"
                  % dataset_name)

def update_all_cubes(dataset):

def remove_entries(dataset_name):
    # NB: does not record changesets
    from wdmmg.model import Entry"Deleting all entries in dataset: %s" % dataset_name)
    errors = Entry.c.remove({"": dataset_name})"Errors: %s" % errors)