Skip to content

Commit

Permalink
Merge branch 'fix-sentry-161120801' into rel-5.2.436
Browse files Browse the repository at this point in the history
  • Loading branch information
Crunch.io Jenkins Account committed Oct 15, 2018
2 parents 6aafd0d + 3269117 commit 5df324a
Show file tree
Hide file tree
Showing 30 changed files with 2,450 additions and 2,338 deletions.
3 changes: 3 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# History of Changes

#### 1.6.9 Bugfix
- When Categorical Array variable is selected in multitable export, and Scale Means is selected, the cube fails, because it tries to access the non-existing slice (the CA is only _interpreted_ as multiple slices in tabbooks). This fix makes sure that the export cube doesn't fail in such case.

#### 1.6.8 Scale Means Marginal
- Add capability to calculate the scale means marginal. This is used when analysing a 2D cube, and obtaining a sort of a "scale mean _total_" for each of the variables constituting a cube.

Expand Down
25 changes: 25 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
MAKE = make
PYTHON = python

.PHONY: clean cleandocs docs opendocs

help:
@echo "Usage: \`make <target>' where <target> is one or more of"
@echo " clean delete intermediate work product and start fresh"
@echo " cleandocs delete cached HTML documentation and start fresh"
@echo " docs build HTML documentation using Sphinx (incremental)"
@echo " opendocs open local HTML documentation in browser"

clean:
find . -type f -name \*.pyc -exec rm {} \;
find . -type f -name .DS_Store -exec rm {} \;
rm -rf dist .coverage

cleandocs:
$(MAKE) -C docs clean

docs:
$(MAKE) -C docs html

opendocs:
open docs/build/html/index.html
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,16 @@ The detailed description can be found

## Changes

#### 1.7.0 Normalization, PEP8 and bugfix
- Refactored to remove a couple modules
- Fixed pesky numpy warnings
- Replaced vulnerable lazyproperty implementation

#### 1.6.11 Deprecate `shape`
- Deprecate the `CubeSlice` `shape` property
- Use `get_shape(prune=False)` instead
- Will be removed in future versions

#### 1.6.10 Fix README on pypi

#### 1.6.9 Bugfix
- When Categorical Array variable is selected in multitable export, and Scale Means is selected, the cube fails, because it tries to access the non-existing slice (the CA is only _interpreted_ as multiple slices in tabbooks). This fix makes sure that the export cube doesn't fail in such case.

For a complete list of changes see [history](https://github.com/Crunch-io/crunch-cube/blob/master/HISTORY.md).
13 changes: 6 additions & 7 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,16 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['sphinx.ext.autodoc',
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
#'sphinx.ext.intersphinx',
# 'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.ifconfig',
'sphinx.ext.viewcode',
#'sphinx.ext.githubpages'
#'sphinxcontrib.napoleon'
]
# 'sphinx.ext.githubpages'
# 'sphinxcontrib.napoleon'
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand Down Expand Up @@ -169,7 +170,5 @@
]




# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'https://docs.python.org/': None}
29 changes: 0 additions & 29 deletions docs/source/cr.cube.rst

This file was deleted.

8 changes: 8 additions & 0 deletions docs/source/crunch_cube.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

CrunchCube objects
==================

.. autoclass:: cr.cube.crunch_cube.CrunchCube
:members:
:undoc-members:
:inherited-members:
8 changes: 8 additions & 0 deletions docs/source/cube_slice.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

CubeSlice objects
=================

.. autoclass:: cr.cube.cube_slice.CubeSlice
:members:
:undoc-members:
:inherited-members:
7 changes: 7 additions & 0 deletions docs/source/dimension.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

Dimension objects
-----------------

.. autoclass:: cr.cube.dimension.Dimension()
:members:
:inherited-members:
55 changes: 29 additions & 26 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
.. Crunch Cube documentation master file, created by
sphinx-quickstart on Fri Oct 20 07:37:21 2017.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

Welcome to Crunch Cube's documentation!
=======================================

The purpose of this library is to make it much easier to manipulate cube responses that come from
the crunch api. (we'll refer to them as *cubes* in the subsequent text). When used in conjunction
with pycrunch, this library can unlock powerful second-order analytics and visualizations.
Crunch Cube allows you to manipulate cube responses from the Crunch API using
Python. We'll refer to these cube responses as *cubes* in the subsequent
text. When used in conjunction with `pycrunch`, this library can unlock
powerful second-order analytics and visualizations.

*Cubes* are obtained from the *Crunch.io* platform, as JSON responses to the specific *queries* created by the user.
These queries specify which data the user wants to extract from the Crunch.io system.
The most common usage is to obtain the following:
A *cube* is obtained from the *Crunch.io* platform as a JSON response to
a specific *query* created by a user. The most common usage is to obtain the
following:

- Cross correlation between different variable
- Margins of the cross tab *cube*
- Proportions of the cross tab *cube* (e.g. proportions of each single element to the entire sample size)
- Percentages
* Cross correlation between different variables
* Margins of the cross-tab *cube*
* Proportions of the cross-tab *cube* (e.g. proportions of each single
element to the entire sample size)

When the data is obtained from the Crunch.io platform, it needs to be interpreted to the form that's convenient for a user. The actual shape of the *cube* JSON contains many internal details, which are not of essence to the end-user (but are still necessary for proper *cube* functionality).
Crunch Cube allows you to access these values from a cube response without
dealing with the complexities of the underlying JSON format.

The job of this library is to provide a convenient API that handles those intricacies, and enables the user to quickly and easily obtain (extract) the relevant data from the *cube*. Such data is best represented in a table-like format. For this reason, the most of the API functions return some form of the `ndarray` type, from the `numpy` package. Each function is explained in greater detail, uner its own section, under the API subsection of this document.
The data in a cube is often best represented in a table-like format. For this
reason, many API methods return data as a `numpy.ndarray` object.


Installation
Expand Down Expand Up @@ -53,6 +52,17 @@ is as simple as:
])
API Reference
-------------

.. toctree::
:maxdepth: 2

crunch_cube
cube_slice
dimension



For developers
---------------
Expand All @@ -69,21 +79,14 @@ your code has proper coverage before submitting. All pull requests
will be tested by travis.


.. toctree::
:maxdepth: 4
:caption: Contents:

cr.cube


.. image:: https://www.travis-ci.org/Crunch-io/crunch-cube.svg?branch=master
:target: https://www.travis-ci.org/Crunch-io/crunch-cube
:target: https://www.travis-ci.org/Crunch-io/crunch-cube

.. image:: https://coveralls.io/repos/github/Crunch-io/crunch-cube/badge.svg?branch=master
:target: https://coveralls.io/github/Crunch-io/crunch-cube?branch=master
:target: https://coveralls.io/github/Crunch-io/crunch-cube?branch=master

.. image:: https://readthedocs.org/projects/crunch-cube/badge/?version=latest
:target: http://crunch-cube.readthedocs.io/en/latest/?badge=latest
:target: http://crunch-cube.readthedocs.io/en/latest/?badge=latest



Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from setuptools import setup, find_packages

version = '1.6.11'
version = '1.7.0'


def get_long_desc():
Expand Down
Loading

0 comments on commit 5df324a

Please sign in to comment.