Summarize data

Please, check my code!
I forgot to include some kind of readme.st. To test custom command:
python manage.py summarize [date YYYY-MM-DD] [--nodeletion]
If you pass no parameters it summarizes current date minus 15 days (single day and no a 15-days period)
Done.

On Tue, Oct 7, 2014 at 12:50 AM, Daniel Gonzalez Gasull <
notifications@github.com> wrote:

> In okapiweb/management/commands/summarize.py:
>
> > +    quarters = {1: 1, 2: 1, 3: 1, 4: 2, 5: 2, 6: 2, 7: 3, 8: 3, 9: 3, 10: 4, 11: 4, 12: 4}
> > +    DEFAULT_DATE_FORMAT = "%Y-%m-%d"
> > +    DAYS_SUFFIX = "_days"
> > +    RAW_SUFFIX = "_raw"
> > +
> > +    help = 'Summarizes the data'
> > +    args = "[date_from] [date to]"
> > +    option_list = BaseCommand.option_list + (
> > +        make_option('--nodelete',
> > +                    action='store_true',
> > +                    dest='nodelete',
> > +                    default=False,
> > +                    help='Preserve processed data'),
> > +    )
> > +
> > +    def check_date(self, processed_date="", format_string=DEFAULT_DATE_FORMAT):
>
> Nitpicking: Since the function returns a boolean, I usually like to name
> it in a way that it's obvious it returns such. E.g. is_valid_date.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/redbeacon/okapi-web/pull/23/files#r18491197>.
>



-- 
Alejandro Garcia
Software Engineer at RedBeacon.com