ahelium/monthlyrep — pull request #3 by anxiousmodernman (2014-11-17 03:15:55+00:00)
Title: Now we can write to Excel

You were so right. I should have just wrapped the work you'd done in a class first. I went ahead an did that by add two new attributes that just hold onto the ```DataFrame``` objects we need for Excel rendering:

```python
self._industry_subs = self._compute_subs_by_industry()
self._unsubs_by_category = self._compute_unsubs_by_category()
```

...and we make use of this in the ```render_excel()``` method.

I still believe that properties or methods that return precomputed stats will be a good idea for, say, doing something like this (in a script):

```python
last_month = Unsubscribes('lastmonth.xls')
this_month = Unsubscribes('thismonth.xls')
sub_growth = this_month.total_subs - last_month.total_subs
```

That could be handy. But first things first.

I also started sketching out the main entry point into our program: ```mrep.py```. This isn't going to just work, since you're going to have to do something different on both OSX and Windows to be able to call (and pass arguments to) ```mrep.py``` from any directory on your file system. I don't even know how to do this yet on Windows, but on OSX it will probably involve creating a symbolic link from a directory on your PATH directly to the script in your monthlyrep folder. We'll work that out later.