Skip to content

Commit 2dd177e

Browse files
committed
Fixes for problem with exporting tables as feather
1 parent b8e4cfd commit 2dd177e

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "taigapy"
3-
version = "3.7.0"
3+
version = "3.8.0"
44
description = "Client library for fetching data from Taiga"
55
authors = ["Your Name <you@example.com>"]
66
readme = "README.md"

taigapy/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44

55
from .consts import DEFAULT_TAIGA_URL, DEFAULT_CACHE_DIR, CACHE_FILE
66
from .client import TaigaClient
7+
78
from .client_v3 import Client as ClientV3
89
from .client_v3 import LocalFormat
910

11+
1012
try:
1113
default_tc = TaigaClient()
1214
except Exception as e:
@@ -16,7 +18,6 @@
1618
)
1719

1820

19-
2021
def create_taiga_client_v3(*args, **kwargs):
2122
tc = TaigaClient(*args, **kwargs)
2223
tc._set_token_and_initialized_api()

taigapy/client_v3.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -495,8 +495,8 @@ def _dl_and_convert_csv_table(self, canonical_id, taiga_format, requested_format
495495
if requested_format == LocalFormat.CSV_TABLE:
496496
local_path = self._download_to_cache(canonical_id)
497497
else:
498-
assert requested_format == LocalFormat.CSV_FEATHER
499-
local_csv = self._download_to_cache(canonical_id)
498+
assert requested_format == LocalFormat.FEATHER_TABLE
499+
local_csv = self.download_to_cache(canonical_id, requested_format=LocalFormat.PARQUET_TABLE)
500500
df = pd.read_parquet(local_csv)
501501
local_path = self._get_unique_name(canonical_id, ".ftr")
502502
df.to_feather(local_path)
@@ -507,7 +507,7 @@ def _dl_and_convert_csv_table(self, canonical_id, taiga_format, requested_format
507507
local_path = self._get_unique_name(canonical_id, ".csv")
508508
df.to_csv(local_path)
509509
else:
510-
assert requested_format == LocalFormat.CSV_FEATHER
510+
assert requested_format == LocalFormat.FEATHER_TABLE
511511
local_path = self._get_unique_name(canonical_id, ".ftr")
512512
df.to_feather(local_path)
513513
else:

0 commit comments

Comments
 (0)