luxorasap 0.1.33__py3-none-any.whl → 0.1.36__py3-none-any.whl
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.
- luxorasap/__init__.py +1 -1
- luxorasap/datareader/core.py +11 -3
- luxorasap/ingest/legacy_local/dataloader.py +1 -1
- luxorasap/utils/tools/excel.py +8 -1
- {luxorasap-0.1.33.dist-info → luxorasap-0.1.36.dist-info}/METADATA +1 -1
- {luxorasap-0.1.33.dist-info → luxorasap-0.1.36.dist-info}/RECORD +9 -9
- {luxorasap-0.1.33.dist-info → luxorasap-0.1.36.dist-info}/WHEEL +0 -0
- {luxorasap-0.1.33.dist-info → luxorasap-0.1.36.dist-info}/entry_points.txt +0 -0
- {luxorasap-0.1.33.dist-info → luxorasap-0.1.36.dist-info}/top_level.txt +0 -0
luxorasap/__init__.py
CHANGED
|
@@ -13,7 +13,7 @@ from types import ModuleType
|
|
|
13
13
|
try:
|
|
14
14
|
__version__: str = metadata.version(__name__)
|
|
15
15
|
except metadata.PackageNotFoundError: # editable install
|
|
16
|
-
__version__ = "0.1.
|
|
16
|
+
__version__ = "0.1.36"
|
|
17
17
|
|
|
18
18
|
# ─── Lazy loader ─────────────────────────────────────────────────
|
|
19
19
|
def __getattr__(name: str) -> ModuleType:
|
luxorasap/datareader/core.py
CHANGED
|
@@ -183,9 +183,17 @@ class LuxorQuery:
|
|
|
183
183
|
str_nan_format = str_nan_format.union(dtypes_override['str_nan_format'])
|
|
184
184
|
|
|
185
185
|
if table_name != "last_all_flds":
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
186
|
+
try:
|
|
187
|
+
for col in table_columns.intersection(float_dtypes):
|
|
188
|
+
table_data[col] = table_data[col].astype(float)
|
|
189
|
+
except :
|
|
190
|
+
logger.warning(f"Ao carregar tabela '{table_name}', nao foi possivel converter dados da coluna {col} para float.")
|
|
191
|
+
#logger.warning(f"Colunas com erro: {table_columns.intersection(float_dtypes)}")
|
|
192
|
+
#logger.warning(f"Colunas disponiveis: {table_columns}")
|
|
193
|
+
#print(table_data.dtypes)
|
|
194
|
+
|
|
195
|
+
raise ValueError(f"Erro ao converter colunas para float na tabela '{table_name}'.")
|
|
196
|
+
|
|
189
197
|
if table_name == "hist_risk_metrics":
|
|
190
198
|
try:
|
|
191
199
|
cols_to_format = list(set(table_data.columns) - {"Date", "Fund"})
|
|
@@ -151,7 +151,7 @@ class DataLoader:
|
|
|
151
151
|
# normalize_columns=file_data["normalize_columns"], export_to_blob=export_to_blob,
|
|
152
152
|
# blob_directory=blob_directory)
|
|
153
153
|
save_table(table_name, table_data, index=file_data["index"], index_name=file_data["index_name"],
|
|
154
|
-
normalize_columns=file_data["normalize_columns"], directory=blob_directory)
|
|
154
|
+
normalize_columns=file_data["normalize_columns"], directory=blob_directory, override=True)
|
|
155
155
|
|
|
156
156
|
self.tracked_files[tracked_file_path]["last_mtime"] = file_last_update
|
|
157
157
|
|
luxorasap/utils/tools/excel.py
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
|
|
2
|
+
import platform
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
if platform.system() == "Windows":
|
|
5
|
+
import win32com.client
|
|
4
6
|
|
|
5
7
|
|
|
6
8
|
def close_excel_worksheet(filename, save=True):
|
|
@@ -11,6 +13,11 @@ def close_excel_worksheet(filename, save=True):
|
|
|
11
13
|
"""
|
|
12
14
|
|
|
13
15
|
try:
|
|
16
|
+
|
|
17
|
+
if platform.system() != "Windows":
|
|
18
|
+
print("Esta função só está disponível no Windows.")
|
|
19
|
+
return
|
|
20
|
+
|
|
14
21
|
excel = win32com.client.Dispatch("Excel.Application")
|
|
15
22
|
for wb in excel.Workbooks:
|
|
16
23
|
if wb.Name.lower() == filename.lower(): # compara ignorando maiúsc/minúsc
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
luxorasap/__init__.py,sha256=
|
|
1
|
+
luxorasap/__init__.py,sha256=jUlL8MLFBkPCnG5FvYT8H_XGD0gDJy1PaVu9fa-e0cE,1356
|
|
2
2
|
luxorasap/btgapi/__init__.py,sha256=QUlfb5oiBY6K1Q5x4-a-x2wECe1At5wc2962I5odOJk,620
|
|
3
3
|
luxorasap/btgapi/auth.py,sha256=PvyCtbEyBO2B1CIeAlNXWugKW1OgiKfPcVzS6K5FBnQ,1872
|
|
4
4
|
luxorasap/btgapi/reports.py,sha256=ZVEMLoJPXc0r3XjPJPMsKQN0zZd1Npd7umNpAj1bncs,8040
|
|
5
5
|
luxorasap/btgapi/trades.py,sha256=956HZ9BvN9C_VQvKTyBLN0x6ZygwVqBZN11F7OnNbDI,5985
|
|
6
6
|
luxorasap/datareader/__init__.py,sha256=41RAvbrQ4R6oj67S32CrKqolx0CJ2W8cbOF6g5Cqm2g,120
|
|
7
|
-
luxorasap/datareader/core.py,sha256=
|
|
7
|
+
luxorasap/datareader/core.py,sha256=DJoHBxhPDHA6-q-XEUI_mdNXWbFX6AZKNP59sPl4hSE,156725
|
|
8
8
|
luxorasap/ingest/__init__.py,sha256=XhxDTN2ar-u6UCPhnxNU_to-nWiit-SpQ6cA_N9eMSs,795
|
|
9
9
|
luxorasap/ingest/cloud/__init__.py,sha256=7yqEgeDxplkqYTzZNB0kfkSQ8PXF-77BXMW2DMYtJbU,2911
|
|
10
|
-
luxorasap/ingest/legacy_local/dataloader.py,sha256=
|
|
10
|
+
luxorasap/ingest/legacy_local/dataloader.py,sha256=DF3CvojDAi0itVDZPsQbmpl5pqMTNwOOpxTz4Ju8mho,12419
|
|
11
11
|
luxorasap/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
12
|
luxorasap/utils/dataframe/__init__.py,sha256=heKpmq58FmX35syzzwrHqlOWKYBkH2Z1jyqaQ_Vg-00,265
|
|
13
13
|
luxorasap/utils/dataframe/reader.py,sha256=Vzjdw-AeS1lnWEHQ8RZNh0kK93NWTp0NWVi_B6mN5N0,616
|
|
@@ -15,9 +15,9 @@ luxorasap/utils/dataframe/transforms.py,sha256=OIvlTTcjFX6bUhuQp_syEp7ssm4sLzwvg
|
|
|
15
15
|
luxorasap/utils/storage/__init__.py,sha256=U3XRq94yzRp3kgBSUcRzs2tQgJ4o8h8a1ZzwiscA5XM,67
|
|
16
16
|
luxorasap/utils/storage/blob.py,sha256=0QnwrUP-9vWYK8ffa6NqE7rV_t6RdScRM8GQnMxY_4w,3184
|
|
17
17
|
luxorasap/utils/tools/__init__.py,sha256=dvK7Z4xnNQAuEiObVN7qjeLWAvP49JeFn2Oq9GdgmXs,76
|
|
18
|
-
luxorasap/utils/tools/excel.py,sha256=
|
|
19
|
-
luxorasap-0.1.
|
|
20
|
-
luxorasap-0.1.
|
|
21
|
-
luxorasap-0.1.
|
|
22
|
-
luxorasap-0.1.
|
|
23
|
-
luxorasap-0.1.
|
|
18
|
+
luxorasap/utils/tools/excel.py,sha256=SfeTcbJWsWq3uKruwKSjJ4aWgMovITzlNXjP2bhdMjI,1246
|
|
19
|
+
luxorasap-0.1.36.dist-info/METADATA,sha256=zxcRJsqEXutd68dbIn3nW3Sr_92sLWq5XVMWw5hARFw,3804
|
|
20
|
+
luxorasap-0.1.36.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
21
|
+
luxorasap-0.1.36.dist-info/entry_points.txt,sha256=XFh-dOwUhlya9DmGvgookMI0ezyUJjcOvTIHDEYS44g,52
|
|
22
|
+
luxorasap-0.1.36.dist-info/top_level.txt,sha256=9YOL6bUIpzY06XFBRkUW1e4rgB32Ds91fQPGwUEjxzU,10
|
|
23
|
+
luxorasap-0.1.36.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|