DataBrewery / cubes

[NOT MAINTAINED] Light-weight Python OLAP framework for multi-dimensional data analysis
http://cubes.databrewery.org
Other
1.49k stars 314 forks source link

Change formatters doc example from "text_table" option #367

Open RacingTadpole opened 8 years ago

RacingTadpole commented 8 years ago

This looks like a great framework, thanks! I am spending some time getting my head around how it works, and thought I'd start by submitting a PR for a documentation change :-)

I noticed the example at http://cubes.readthedocs.io/en/v1.1/formatters.html doesn't work, because it references the "text_table" formatter, which is no longer available by default.

This PR needs a tiny change to merge - the old line

print formatter.format(result, "date") 

needs to be replaced, but I'm not sure what with yet.

Btw, I notice the slicer server accepts a format=json|csv parameter; I was looking at https://github.com/DataBrewery/cubes/blob/release-1.1/cubes/ext.py#L50-L52 because I guessed the allowed formats would match those (but they don't)...