Skip to content

Commit

Permalink
Merge pull request #404 from Crunch-io/fix-ci-pep625
Browse files Browse the repository at this point in the history
Fix build name
  • Loading branch information
ernestoarbitrio authored Nov 20, 2024
2 parents 5a560f7 + 5666b96 commit e896136
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 36 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
pypi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.11
- name: Autobump version
run: |
# from refs/tags/v0.1.2 get 0.1.2
Expand Down Expand Up @@ -45,9 +45,9 @@ jobs:
runs-on: ubuntu-latest
needs: pypi
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install dependencies
Expand Down
32 changes: 21 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ Open Source Python implementation of the API for working with CrunchCubes

This package contains the implementation of the CrunchCube API. It is used to
extract useful information from CrunchCube responses (we'll refer to them as
_cubes_ in the subsequent text). _Cubes_ are obtained from the *Crunch.io*
_cubes_ in the subsequent text). _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:

- 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 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

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
Expand All @@ -34,7 +34,6 @@ The `cr.cube` package can be installed by using the `pip install`:

pip install cr.cube


### For developers

For development mode, `cr.cube` needs to be installed from the local checkout
Expand Down Expand Up @@ -64,7 +63,6 @@ And then tests can be run using `py.test` in the root directory:
After the `cr.cube` package has been successfully installed, the usage is as
simple as:


>>> from cr.cube.cube import Cube

>>> ### Obtain the crunch cube JSON payload using app.crunch.io, pycrunch, rcrunch or scrunch
Expand Down Expand Up @@ -103,50 +101,62 @@ The detailed description can be found
[here](http://crunch-cube.readthedocs.io/en/latest/cr.cube.html#cr-cube-crunch-cube-module).

---
[![Build Status](https://travis-ci.org/Crunch-io/crunch-cube.png?branch=master)](https://travis-ci.org/Crunch-io/crunch-cube)
[![Coverage Status](https://codecov.io/gh/Crunch-io/crunch-cube/branch/master/graph/badge.svg?token=C6auKOj8tZ)](https://codecov.io/gh/Crunch-io/crunch-cube)
[![Documentation Status](https://readthedocs.org/projects/crunch-cube/badge/?version=latest)](http://crunch-cube.readthedocs.io/en/latest/?badge=latest)

![Build Status](https://github.com/Crunch-io/crunch-cube/workflows/CI/badge.svg?branch=master)
![Coverage Status](https://codecov.io/gh/Crunch-io/crunch-cube/branch/master/graph/badge.svg?token=C6auKOj8tZ)
![Documentation Status](https://readthedocs.org/projects/crunch-cube/badge/?version=latest)
---

## Changes

### 3.1.0

- Subtotal diff (wave difference) for categorical date dimensions

### 3.0.45

- Enumerator refactoring

### 3.0.44

- Bug fix median measure for exporter

### 3.0.43

- Median measure

### 3.0.42

- Inflate cubes that are single column filters

### 3.0.41

- Remove `deepcopy` from dimension module due to a performance issue

### 3.0.40

- Fix bug with weighted vs unweighted in pairwise effect calculation

### 3.0.39

- Remove cube response deepcopy due to a performance issue

### 3.0.38

- Improve calculation of DoF for pairwise comparison
- Use effective counts as column bases for DoF

### 3.0.37

- Add squared counts as a cube measure
- Enable calculating pairwise stats with effective denominator

### 3.0.36

- Fix bug in pairwise sig values for means.

### 3.0.35
- Fix bug where categorical dimension would sometimes be interpreted as `MR_CATS`.

- Fix bug where categorical dimension would sometimes be interpreted as `MR_CATS`.

For a complete list of changes see [history](https://github.com/Crunch-io/crunch-cube/blob/master/HISTORY.md).
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def ascii_bytes_from(path, *paths):
"date": datetime.date.today().strftime("%d/%m/%y"),
}
html_theme_options = {
"display_version": True,
"version_selector": True,
"prev_next_buttons_location": "bottom",
"style_external_links": False,
# Toc options
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def ascii_bytes_from(path, *paths):
test_requires = ["pytest", "pytest-cov", "mock", "coverage"]

setup(
name="cr.cube",
name="cr_cube",
version=version,
description="Crunch.io Cube library",
long_description=readme,
Expand Down
36 changes: 18 additions & 18 deletions src/cr/cube/cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,29 +275,29 @@ def augment_response(self, summary_cube_resp) -> "Cube":
filter cube) will have a different shape. Basically the filter cube will miss
the row labes that have 0 as counts.
| FCUBE | CAT
----+-------+----
A | 1 | 1
B | 1 | 1
C | 1 | 1
D | | 1
E | | 1
F | | 1
The FUCBE have D E and F missing cause its results doesn't count them. And the
| | FCUBE | CAT |
| --- | ---- | ---- |
| A | 1 | 1 |
| B | 1 | 1 |
| C | 1 | 1 |
| D | | 1 |
| E | | 1 |
| F | | 1 |
The FCUBE have D E and F missing cause its results doesn't count them. And the
rendering starts from the top without the correct row label association.
For a correct result the FCUBE cube_response needs to be augmentes with all the
elements of the summary cube and position the values in the corresponding
position of the only existing labels in the response.
| FCUBE | CAT
----+-------+----
A | 0 | 1
B | 0 | 1
C | 1 | 1
D | 1 | 1
E | 1 | 1
F | 0 | 1
| | FCUBE | CAT |
| --- | ---- | ---- |
| A | 0 | 1 |
| B | 0 | 1 |
| C | 1 | 1 |
| D | 1 | 1 |
| E | 1 | 1 |
| F | 0 | 1 |
"""
cube_resp = self._cube_response

Expand Down

0 comments on commit e896136

Please sign in to comment.