completely off the cuff, just something to catch a glaringly obvious
mismatch btn datasets.  we can make it optional if you think users would
want to tighten or loosen it up.


On Fri, Mar 21, 2014 at 10:34 AM, e0d <notifications@github.com> wrote:

> In forums/clean_cs_users.py:
>
> > +            logger.info("loaded {} rows".format(cnt))
> > +    sqlite_cx.commit()
> > +    logger.info("done loading cs_user data")
> > +
> > +def sanity_check(sqlite_cx):
> > +    """
> > +    """
> > +    cur = sqlite_cx.cursor()
> > +    cur.execute('SELECT count(*) FROM lms_user')
> > +    lms_user_count = int(cur.fetchone()[0])
> > +    assert lms_user_count > 0
> > +    cur.execute('SELECT count(*) FROM cs_user')
> > +    cs_user_count = int(cur.fetchone()[0])
> > +    assert cs_user_count > 0
> > +    ratio = float(lms_user_count)/float(cs_user_count)
> > +    assert 0.75 < ratio < 1.33
>
> Curious how you arrived at this? Not too important for a one off, but I
> think the thresholds should be options with defaults.
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/edx/edx-tools/pull/5/files#r10837541>
> .
>