Permalink
Browse files

Better depreciation wording and placement; NEWS updated; minor fixes

  • Loading branch information...
Stiivi committed May 11, 2012
1 parent 5af2580 commit 20f429be87180b18523307b834602f083642e918
Showing with 28 additions and 17 deletions.
  1. +23 −11 NEWS
  2. +2 −2 cubes/model.py
  3. +3 −3 cubes/util.py
  4. +0 −1 examples/hello_world/aggregate.py
View
34 NEWS
@@ -4,16 +4,21 @@ Changes in the Cubes
Version 0.9
===========
-TODO
-----
+Important Changes
+-----------------
-What needs to be done for 0.9 release:
+Summary if most important changes that might affect your code:
-* rename SQLStarBrowser to StarBrowser
-* state in documentation that designated way of creating worskpace and getting
- a browser is through: create_workspace() and ws.browser()
-* create a backend template
-* add documentation about modelling -> aggregation
+**Slicer**: Change all your slicer.ini configuration files to have [workspace]
+section instead of old [db] or [backend]. Depreciation warning is issued, will
+work if not changed.
+
+**Model**: Change `dimensions` in `model` to be an array instead of a
+dictionary. Same with `cubes`. Old style: `"dimensions" = { "date" = ... }`
+new style: `"dimensions" = [ { "name": "date", ... } ]`. Will work if not
+changed, just be prepared.
+
+**Python**: Use Dimension.hierarchy() instead of Dimension.default_hierarchy.
New Features
------------
@@ -38,6 +43,9 @@ New Features
* AggregationBrowser.cut_details(): New method returning values of attributes
representing a single cut. Preliminary implementation, return value might
change.
+
+* Dimension.validate() now checks whether there are duplicate attributes
+* Cube.validate() now checks whether there are duplicate measures or details
SQL backend:
@@ -63,6 +71,10 @@ Slicer:
* slicer test - test configuration and model against database and report list
of issues, if any
+* Backend options are now in [workspace], removed configurability of custom
+ backend section. Warning are issued when old section names [db] and
+ [backend] are used
+
* server responds to /details which is a result of
AggregationBrowser.cell_details()
@@ -73,14 +85,14 @@ Examples:
Changes
-------
+* in Model: dimension and cube dictionary specification during model
+ initialization is depreciated, list should be used (with explicitly
+ mentioned attribute "name") -- **important**
* **important**: Now all attribute references in the model (dimension
attributes, measures, ...) are required to be instances of Attribute() and
the attribute knows it's dimension
* removed `hierarchy` argument from `Dimension.all_attributes()` and `.key_attributes()`
* renamed builder to denormalizer
-* in Model: dimension and cube dictionary specification during model
- initialization is depreciated, list should be used (with explicitly
- mentioned attribute "name")
* Dimension.default_hierarchy is now depreciated in favor of
Dimension.hierarchy() which now accepts no arguments or argument None -
returning default hierarchy in those two cases
View
@@ -204,7 +204,7 @@ def __init__(self, name=None, label=None, description=None,
if dimensions:
if isinstance(dimensions, dict):
# logger.warn("model initialization: dimensions as dictionary "
- # "is depreciated, use list instead")
+ # "is depreciated, use array instead")
for dim_name, dim_desc in dimensions.items():
desc = dict([("name", dim_name)] + dim_desc.items())
@@ -222,7 +222,7 @@ def __init__(self, name=None, label=None, description=None,
if cubes:
if isinstance(cubes, dict):
# logger.warn("model initialization: cubes as dictionary is "
- # "depreciated, use list instead")
+ # "depreciated, use array instead")
for cube_name, cube_desc in cubes.items():
desc = dict([("name", cube_name)] + cube_desc.items())
View
@@ -310,15 +310,15 @@ def create_slicer_context(config):
try:
config_dict = dict(config.items(section))
except ConfigParser.NoSectionError:
- logger.warn("no backend options in config section [%s], trying [backend]" % section)
try:
config_dict = dict(config.items("backend"))
+ logger.warn("slicer config [backend] section is depreciated, rename to [workspace]")
except ConfigParser.NoSectionError:
- logger.warn("no backend options in config section [backend], trying [db]")
try:
config_dict = dict(config.items("db"))
+ logger.warn("slicer config [db] section is depreciated, rename to [workspace]")
except ConfigParser.NoSectionError:
- logger.warn("No section [workspace] found, using empty options" % section)
+ logger.warn("slicer config no section [workspace] found, using empty options")
config_dict = {}
else:
config_dict = {}
@@ -1,4 +1,3 @@
-import sqlalchemy
import cubes
# 1. Prepare SQL data in memory

0 comments on commit 20f429b

Please sign in to comment.