gooddata-pandas 1.9.0__tar.gz → 1.9.1.dev1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of gooddata-pandas might be problematic. Click here for more details.

Files changed (21) hide show
  1. {gooddata-pandas-1.9.0/gooddata_pandas.egg-info → gooddata-pandas-1.9.1.dev1}/PKG-INFO +4 -4
  2. {gooddata-pandas-1.9.0 → gooddata-pandas-1.9.1.dev1}/README.md +1 -1
  3. {gooddata-pandas-1.9.0 → gooddata-pandas-1.9.1.dev1}/gooddata_pandas/result_convertor.py +15 -11
  4. {gooddata-pandas-1.9.0 → gooddata-pandas-1.9.1.dev1/gooddata_pandas.egg-info}/PKG-INFO +4 -4
  5. gooddata-pandas-1.9.1.dev1/gooddata_pandas.egg-info/requires.txt +2 -0
  6. {gooddata-pandas-1.9.0 → gooddata-pandas-1.9.1.dev1}/setup.py +3 -3
  7. gooddata-pandas-1.9.0/gooddata_pandas.egg-info/requires.txt +0 -2
  8. {gooddata-pandas-1.9.0 → gooddata-pandas-1.9.1.dev1}/LICENSE.txt +0 -0
  9. {gooddata-pandas-1.9.0 → gooddata-pandas-1.9.1.dev1}/MANIFEST.in +0 -0
  10. {gooddata-pandas-1.9.0 → gooddata-pandas-1.9.1.dev1}/gooddata_pandas/__init__.py +0 -0
  11. {gooddata-pandas-1.9.0 → gooddata-pandas-1.9.1.dev1}/gooddata_pandas/_version.py +0 -0
  12. {gooddata-pandas-1.9.0 → gooddata-pandas-1.9.1.dev1}/gooddata_pandas/data_access.py +0 -0
  13. {gooddata-pandas-1.9.0 → gooddata-pandas-1.9.1.dev1}/gooddata_pandas/dataframe.py +0 -0
  14. {gooddata-pandas-1.9.0 → gooddata-pandas-1.9.1.dev1}/gooddata_pandas/good_pandas.py +0 -0
  15. {gooddata-pandas-1.9.0 → gooddata-pandas-1.9.1.dev1}/gooddata_pandas/py.typed +0 -0
  16. {gooddata-pandas-1.9.0 → gooddata-pandas-1.9.1.dev1}/gooddata_pandas/series.py +0 -0
  17. {gooddata-pandas-1.9.0 → gooddata-pandas-1.9.1.dev1}/gooddata_pandas/utils.py +0 -0
  18. {gooddata-pandas-1.9.0 → gooddata-pandas-1.9.1.dev1}/gooddata_pandas.egg-info/SOURCES.txt +0 -0
  19. {gooddata-pandas-1.9.0 → gooddata-pandas-1.9.1.dev1}/gooddata_pandas.egg-info/dependency_links.txt +0 -0
  20. {gooddata-pandas-1.9.0 → gooddata-pandas-1.9.1.dev1}/gooddata_pandas.egg-info/top_level.txt +0 -0
  21. {gooddata-pandas-1.9.0 → gooddata-pandas-1.9.1.dev1}/setup.cfg +0 -0
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gooddata-pandas
3
- Version: 1.9.0
3
+ Version: 1.9.1.dev1
4
4
  Summary: GoodData Cloud to pandas
5
5
  Author: GoodData
6
6
  Author-email: support@gooddata.com
7
7
  License: MIT
8
- Project-URL: Documentation, https://gooddata-pandas.readthedocs.io/en/v1.9.0
8
+ Project-URL: Documentation, https://gooddata-pandas.readthedocs.io/en/v1.9.1.dev1
9
9
  Project-URL: Source, https://github.com/gooddata/gooddata-python-sdk
10
10
  Keywords: gooddata,pandas,series,data,frame,data_frame,analytics,headless,business,intelligence,headless-bi,cloud,native,semantic,layer,sql,metrics
11
11
  Classifier: Development Status :: 5 - Production/Stable
@@ -22,7 +22,7 @@ Classifier: Typing :: Typed
22
22
  Requires-Python: >=3.8.0
23
23
  Description-Content-Type: text/markdown
24
24
  License-File: LICENSE.txt
25
- Requires-Dist: gooddata-sdk~=1.9.0
25
+ Requires-Dist: gooddata-sdk~=1.9.1.dev1
26
26
  Requires-Dist: pandas<2.0.0,>=1.0.0
27
27
 
28
28
  # GoodData Pandas
@@ -37,7 +37,7 @@ See [DOCUMENTATION](https://gooddata-pandas.readthedocs.io/en/latest/) for more
37
37
  - GoodData.CN installation; either running on your cloud
38
38
  infrastructure or the free Community Edition running on your workstation
39
39
 
40
- - Python 3.7 or newer
40
+ - Python 3.8 or newer
41
41
 
42
42
  ## Installation
43
43
 
@@ -10,7 +10,7 @@ See [DOCUMENTATION](https://gooddata-pandas.readthedocs.io/en/latest/) for more
10
10
  - GoodData.CN installation; either running on your cloud
11
11
  infrastructure or the free Community Edition running on your workstation
12
12
 
13
- - Python 3.7 or newer
13
+ - Python 3.8 or newer
14
14
 
15
15
  ## Installation
16
16
 
@@ -30,7 +30,7 @@ class _DataWithHeaders:
30
30
  data: List[_DataArray]
31
31
  data_headers: Tuple[_DataHeaders, Optional[_DataHeaders]]
32
32
  grand_totals: Tuple[Optional[List[_DataArray]], Optional[List[_DataArray]]]
33
- grand_total_headers: Tuple[Optional[_DataHeaders], Optional[_DataHeaders]]
33
+ grand_total_headers: Tuple[Optional[List[Dict[str, _DataHeaders]]], Optional[List[Dict[str, _DataHeaders]]]]
34
34
 
35
35
 
36
36
  @define
@@ -50,7 +50,9 @@ class _AccumulatedData:
50
50
  data: List[_DataArray] = field(init=False, factory=list)
51
51
  data_headers: List[Optional[_DataHeaders]] = field(init=False, factory=lambda: [None, None])
52
52
  grand_totals: List[Optional[List[_DataArray]]] = field(init=False, factory=lambda: [None, None])
53
- grand_totals_headers: List[Optional[_DataHeaders]] = field(init=False, factory=lambda: [None, None])
53
+ grand_totals_headers: List[Optional[List[Dict[str, _DataHeaders]]]] = field(
54
+ init=False, factory=lambda: [None, None]
55
+ )
54
56
 
55
57
  def accumulate_data(self, from_result: ExecutionResult) -> None:
56
58
  """
@@ -119,6 +121,14 @@ class _AccumulatedData:
119
121
  for grand_total in grand_totals:
120
122
  # 2-dim results have always 1-dim grand totals (3-dim results have 2-dim gt but DataFrame stores 2D only)
121
123
  dims = grand_total["totalDimensions"]
124
+
125
+ # if dims are empty then data contain total of column and row grandtotals so extend existing data array
126
+ if len(dims) == 0:
127
+ grand_totals_item = cast(List[_DataArray], self.grand_totals[0])
128
+ for total_idx, total_data in enumerate(grand_total["data"]):
129
+ grand_totals_item[total_idx].extend(total_data)
130
+ continue
131
+
122
132
  assert len(dims) == 1, "Only 2-dimensional results are supported"
123
133
  dim_idx = dim_idx_dict[dims[0]]
124
134
  # the dimension id specified on the grand total says from what dimension were
@@ -134,11 +144,7 @@ class _AccumulatedData:
134
144
  # grand totals not initialized yet; initialize both data and headers by making
135
145
  # a shallow copy from the results
136
146
  self.grand_totals[opposite_dim] = grand_total["data"][:]
137
- # TODO: row total measure headers are currently not supported (only aggregation info w/o measure label)
138
- # measure header defs are under ["headerGroups"][>0]
139
- self.grand_totals_headers[opposite_dim] = grand_total["dimensionHeaders"][0]["headerGroups"][0][
140
- "headers"
141
- ][:]
147
+ self.grand_totals_headers[opposite_dim] = grand_total["dimensionHeaders"][0]["headerGroups"]
142
148
  elif paging_dim != opposite_dim:
143
149
  # grand totals are already initialized and the code is paging in the direction that reveals
144
150
  # additional grand total values; append them accordingly; no need to consider total headers:
@@ -446,10 +452,8 @@ def _merge_grand_total_headers_into_headers(extract: _DataWithHeaders) -> Tuple[
446
452
  if grand_total_headers is None:
447
453
  continue
448
454
  header = cast(List[List[Any]], headers[dim_idx])
449
- header[0].extend(grand_total_headers)
450
- padding = [None] * len(grand_total_headers)
451
- for other_headers in header[1:]:
452
- other_headers.extend(padding)
455
+ for level, grand_total_header in enumerate(grand_total_headers):
456
+ header[level].extend(grand_total_header["headers"])
453
457
 
454
458
  return headers
455
459
 
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gooddata-pandas
3
- Version: 1.9.0
3
+ Version: 1.9.1.dev1
4
4
  Summary: GoodData Cloud to pandas
5
5
  Author: GoodData
6
6
  Author-email: support@gooddata.com
7
7
  License: MIT
8
- Project-URL: Documentation, https://gooddata-pandas.readthedocs.io/en/v1.9.0
8
+ Project-URL: Documentation, https://gooddata-pandas.readthedocs.io/en/v1.9.1.dev1
9
9
  Project-URL: Source, https://github.com/gooddata/gooddata-python-sdk
10
10
  Keywords: gooddata,pandas,series,data,frame,data_frame,analytics,headless,business,intelligence,headless-bi,cloud,native,semantic,layer,sql,metrics
11
11
  Classifier: Development Status :: 5 - Production/Stable
@@ -22,7 +22,7 @@ Classifier: Typing :: Typed
22
22
  Requires-Python: >=3.8.0
23
23
  Description-Content-Type: text/markdown
24
24
  License-File: LICENSE.txt
25
- Requires-Dist: gooddata-sdk~=1.9.0
25
+ Requires-Dist: gooddata-sdk~=1.9.1.dev1
26
26
  Requires-Dist: pandas<2.0.0,>=1.0.0
27
27
 
28
28
  # GoodData Pandas
@@ -37,7 +37,7 @@ See [DOCUMENTATION](https://gooddata-pandas.readthedocs.io/en/latest/) for more
37
37
  - GoodData.CN installation; either running on your cloud
38
38
  infrastructure or the free Community Edition running on your workstation
39
39
 
40
- - Python 3.7 or newer
40
+ - Python 3.8 or newer
41
41
 
42
42
  ## Installation
43
43
 
@@ -0,0 +1,2 @@
1
+ gooddata-sdk~=1.9.1.dev1
2
+ pandas<2.0.0,>=1.0.0
@@ -7,7 +7,7 @@ this_directory = Path(__file__).parent
7
7
  long_description = (this_directory / "README.md").read_text(encoding="utf-8")
8
8
 
9
9
  REQUIRES = [
10
- "gooddata-sdk~=1.9.0",
10
+ "gooddata-sdk~=1.9.1.dev1",
11
11
  "pandas>=1.0.0,<2.0.0",
12
12
  ]
13
13
 
@@ -16,7 +16,7 @@ setup(
16
16
  description="GoodData Cloud to pandas",
17
17
  long_description=long_description,
18
18
  long_description_content_type="text/markdown",
19
- version="1.9.0",
19
+ version="1.9.1.dev1",
20
20
  author="GoodData",
21
21
  author_email="support@gooddata.com",
22
22
  license="MIT",
@@ -26,7 +26,7 @@ setup(
26
26
  packages=find_packages(exclude=["tests*"]),
27
27
  python_requires=">=3.8.0",
28
28
  project_urls={
29
- "Documentation": "https://gooddata-pandas.readthedocs.io/en/v1.9.0",
29
+ "Documentation": "https://gooddata-pandas.readthedocs.io/en/v1.9.1.dev1",
30
30
  "Source": "https://github.com/gooddata/gooddata-python-sdk",
31
31
  },
32
32
  classifiers=[
@@ -1,2 +0,0 @@
1
- gooddata-sdk~=1.9.0
2
- pandas<2.0.0,>=1.0.0