Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Differentiated dimension-types #113

Merged
merged 41 commits into from
Nov 1, 2018
Merged

Commits on Oct 30, 2018

  1. Configuration menu
    Copy the full SHA
    c38a066 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7e2fad6 View commit details
    Browse the repository at this point in the history
  3. cube: make CrunchCube._all_dimensions private

    * Rename CrunchCube.all_dimensions to ._all_dimensions and move it to
      down to the implementation method section of the class.
    
    * Update all internal references.
    
    * Update references in tests.
    scanny committed Oct 30, 2018
    Configuration menu
    Copy the full SHA
    828549e View commit details
    Browse the repository at this point in the history
  4. cube: remove dead CrunchCube.ca_dim_ind

    CrunchCube.ca_dim_ind is not called by any other part of cr.cube or by
    current table-writer. Remove it as it will be made obsolete by other
    factoring.
    scanny committed Oct 30, 2018
    Configuration menu
    Copy the full SHA
    fbe683a View commit details
    Browse the repository at this point in the history
  5. cube: make CrunchCube.col_direction_axis private

    CrunchCube.col_direction_axis is not called outside cr.cube.crunch_cube.
    scanny committed Oct 30, 2018
    Configuration menu
    Copy the full SHA
    e060402 View commit details
    Browse the repository at this point in the history
  6. cube: make CrunchCube.data private

    CrunchCube.data is used only internally to the CrunchCube class.
    scanny committed Oct 30, 2018
    Configuration menu
    Copy the full SHA
    8a49d08 View commit details
    Browse the repository at this point in the history
  7. cube: make CrunchCube.flat_values private

    CrunchCube.flat_values is only used internally by CrunchCube and is not
    a required interface method.
    scanny committed Oct 30, 2018
    Configuration menu
    Copy the full SHA
    1978f4c View commit details
    Browse the repository at this point in the history
  8. cube: make CrunchCube.prune_indices private

    CrunchCube.prune_indices is not used outside CrunchCube.
    scanny committed Oct 30, 2018
    Configuration menu
    Copy the full SHA
    afe5478 View commit details
    Browse the repository at this point in the history
  9. cube: make .valid_indices_with_selections private

    CrunchCube.valid_indices_with_selections is not required outside
    CrunchCube. Make it private.
    scanny committed Oct 30, 2018
    Configuration menu
    Copy the full SHA
    1b2afe4 View commit details
    Browse the repository at this point in the history
  10. dim: extract DIMENSION_TYPE enumeration

    * Define DIMENSION_TYPE enumeration, defining all distinct types, even
      though current Dimension.dimension_type cannot differentiate all of
      them yet.
    
    * Change each use of `str` dimension-type key in code and tests to
      actual DIMENSION_TYPE member.
    
    * Remove some cruft from Dimension.dimension_type to bring it consistent
      with current cube response form.
    
    * Update a legacy fixture to all now-required subtype-class.
    scanny committed Oct 30, 2018
    Configuration menu
    Copy the full SHA
    f695725 View commit details
    Browse the repository at this point in the history
  11. cube: parameterize CrunchCube unit tests

    Use pytest parameterized fixtures to gather test cases into a single
    test plus a parameterized fixture. This clarifies the test and greatly
    shortens the test file making it easier to understand and maintain.
    scanny committed Oct 30, 2018
    Configuration menu
    Copy the full SHA
    10a93ad View commit details
    Browse the repository at this point in the history
  12. dim: add xfail integration test to drive TDD

    Add integration tests to drive test-driven development of dimension
    collections objects, including the core aspect of dimension type
    discovery.
    
    Along the way:
    
    * Normalize CAT_X_CAT fixture to allow uniform access to result dict.
    
    * Fix unit test that depended on CAT_X_CAT being a shojified cube response.
    scanny committed Oct 30, 2018
    Configuration menu
    Copy the full SHA
    c481b8f View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    94a0ebc View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    4b9f479 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    6425eb9 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    7538608 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    54b476e View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    f0d08d5 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    fc065fb View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    3c76720 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    252466f View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    e036050 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    b8bc449 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    7cc9814 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    eea9c34 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    6ad3053 View commit details
    Browse the repository at this point in the history
  27. dim: add _RawDimension._alias

    scanny committed Oct 30, 2018
    Configuration menu
    Copy the full SHA
    903dcce View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    fc5f12d View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    355cb48 View commit details
    Browse the repository at this point in the history
  30. dim: integrate new AllDimensions implementation

    * Move NewDimension methods into Dimension, replacing old
      implementations.
    
    * Update CrunchCube dimensions methods to use new dimension collections.
    
    * Update CrunchCube and Dimension tests as required.
    
    * Mark newly failing tests xfail for individual resolution in following
      commits.
    scanny committed Oct 30, 2018
    Configuration menu
    Copy the full SHA
    caa5424 View commit details
    Browse the repository at this point in the history
  31. cube: remimplement CrunchCube.is_univariate_ca

    With the new fully-differentiated dimension types, a CA dimension pair
    has a CA_CAT dimension where it used to have an (undifferentiated) CAT
    dimension.
    scanny committed Oct 30, 2018
    Configuration menu
    Copy the full SHA
    821a37d View commit details
    Browse the repository at this point in the history
  32. cube: reimplement CrunchCube.univariate_ca_main_axis

    Main axis of univariate CA is now CA_CAT type where before it was
    undifferentiated CAT type.
    scanny committed Oct 30, 2018
    Configuration menu
    Copy the full SHA
    b671c3d View commit details
    Browse the repository at this point in the history
  33. test: rework CrunchCube.dimensions integration test

    Move CrunchCube.dimensions integration test to test_crunch_cube.py and
    update it to reflect differentiated dimension type for CA_CAT.
    scanny committed Oct 30, 2018
    Configuration menu
    Copy the full SHA
    d8db2b5 View commit details
    Browse the repository at this point in the history
  34. test: rework logical-univariate integration test

    * Canonicalize unpunctuated logical-univariate JSON fixture.
    
    * Move test to CrunchCube integration test module since it exercises
      CrunchCube methods.
    
    * Test requires DIMENSION_TYPE.LOGICAL instead of CATEGORICAL now that
      categorical dimension types are differentiated.
    scanny committed Oct 30, 2018
    Configuration menu
    Copy the full SHA
    5562c9b View commit details
    Browse the repository at this point in the history
  35. test: rework cat-x-logical test

    JSON fixture named LOGICAL_X_CAT turns out to have CAT_X_LOGICAL
    dimensions. Canonicalize and rename that JSON fixture and move test to
    cube integration test module since that's its entry point. Use LOGICAL
    dimension-type to match now differentiated category type.
    scanny committed Oct 30, 2018
    Configuration menu
    Copy the full SHA
    159e9d1 View commit details
    Browse the repository at this point in the history
  36. rfctr: remove CrunchCube.is_mr_selections()

    CrunchCube.is_mr_selections() can now be replaced by
    `dimension.dimension_type == DT.MR_CAT`. Remove .is_mr_selections() and
    replace its usage with that snippet.
    scanny committed Oct 30, 2018
    Configuration menu
    Copy the full SHA
    6ed25b1 View commit details
    Browse the repository at this point in the history
  37. rfctr: remove Dimension.is_selections

    Differentiated dimension-types make this API property unnecessary and
    making selection types explicit in client code makes it easier to reason
    about.
    scanny committed Oct 30, 2018
    Configuration menu
    Copy the full SHA
    34aa402 View commit details
    Browse the repository at this point in the history
  38. rfctr: remove CrunchCube.mr_selections_indices

    CrunchCube.mr_selections_indices is unused and should not be required as
    an API property. Remove it.
    scanny committed Oct 30, 2018
    Configuration menu
    Copy the full SHA
    b3d883d View commit details
    Browse the repository at this point in the history
  39. rfctr: remove Dimension.alias

    Dimension.alias is no longer used. Remove it on YAGNI rationale.
    scanny committed Oct 30, 2018
    Configuration menu
    Copy the full SHA
    4f3461b View commit details
    Browse the repository at this point in the history
  40. cube: make CrunchCube.dim_types immutable

    Returning a mutable type on an @lazyproperty is dangerous because it
    permits the caller to change the contents which would be returned to
    the next caller. Make CrunchCube.dim_types return a tuple rather than
    a list.
    scanny committed Oct 30, 2018
    Configuration menu
    Copy the full SHA
    b374ec1 View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    c7073c9 View commit details
    Browse the repository at this point in the history