luxorasap 0.1.32__tar.gz → 0.1.34__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.
- {luxorasap-0.1.32 → luxorasap-0.1.34}/PKG-INFO +1 -1
- {luxorasap-0.1.32 → luxorasap-0.1.34}/pyproject.toml +2 -2
- {luxorasap-0.1.32 → luxorasap-0.1.34}/src/luxorasap/__init__.py +1 -1
- {luxorasap-0.1.32 → luxorasap-0.1.34}/src/luxorasap/ingest/legacy_local/dataloader.py +2 -3
- {luxorasap-0.1.32 → luxorasap-0.1.34}/src/luxorasap/utils/tools/excel.py +3 -14
- {luxorasap-0.1.32 → luxorasap-0.1.34}/src/luxorasap.egg-info/PKG-INFO +1 -1
- {luxorasap-0.1.32 → luxorasap-0.1.34}/README.md +0 -0
- {luxorasap-0.1.32 → luxorasap-0.1.34}/setup.cfg +0 -0
- {luxorasap-0.1.32 → luxorasap-0.1.34}/src/luxorasap/btgapi/__init__.py +0 -0
- {luxorasap-0.1.32 → luxorasap-0.1.34}/src/luxorasap/btgapi/auth.py +0 -0
- {luxorasap-0.1.32 → luxorasap-0.1.34}/src/luxorasap/btgapi/reports.py +0 -0
- {luxorasap-0.1.32 → luxorasap-0.1.34}/src/luxorasap/btgapi/trades.py +0 -0
- {luxorasap-0.1.32 → luxorasap-0.1.34}/src/luxorasap/datareader/__init__.py +0 -0
- {luxorasap-0.1.32 → luxorasap-0.1.34}/src/luxorasap/datareader/core.py +0 -0
- {luxorasap-0.1.32 → luxorasap-0.1.34}/src/luxorasap/ingest/__init__.py +0 -0
- {luxorasap-0.1.32 → luxorasap-0.1.34}/src/luxorasap/ingest/cloud/__init__.py +0 -0
- {luxorasap-0.1.32 → luxorasap-0.1.34}/src/luxorasap/utils/__init__.py +0 -0
- {luxorasap-0.1.32 → luxorasap-0.1.34}/src/luxorasap/utils/dataframe/__init__.py +0 -0
- {luxorasap-0.1.32 → luxorasap-0.1.34}/src/luxorasap/utils/dataframe/reader.py +0 -0
- {luxorasap-0.1.32 → luxorasap-0.1.34}/src/luxorasap/utils/dataframe/transforms.py +0 -0
- {luxorasap-0.1.32 → luxorasap-0.1.34}/src/luxorasap/utils/storage/__init__.py +0 -0
- {luxorasap-0.1.32 → luxorasap-0.1.34}/src/luxorasap/utils/storage/blob.py +0 -0
- {luxorasap-0.1.32 → luxorasap-0.1.34}/src/luxorasap/utils/tools/__init__.py +0 -0
- {luxorasap-0.1.32 → luxorasap-0.1.34}/src/luxorasap.egg-info/SOURCES.txt +0 -0
- {luxorasap-0.1.32 → luxorasap-0.1.34}/src/luxorasap.egg-info/dependency_links.txt +0 -0
- {luxorasap-0.1.32 → luxorasap-0.1.34}/src/luxorasap.egg-info/entry_points.txt +0 -0
- {luxorasap-0.1.32 → luxorasap-0.1.34}/src/luxorasap.egg-info/requires.txt +0 -0
- {luxorasap-0.1.32 → luxorasap-0.1.34}/src/luxorasap.egg-info/top_level.txt +0 -0
- {luxorasap-0.1.32 → luxorasap-0.1.34}/tests/test_btgapi_auth.py +0 -0
- {luxorasap-0.1.32 → luxorasap-0.1.34}/tests/test_btgapi_reports.py +0 -0
- {luxorasap-0.1.32 → luxorasap-0.1.34}/tests/test_btgapi_trades.py +0 -0
- {luxorasap-0.1.32 → luxorasap-0.1.34}/tests/test_datareader.py +0 -0
- {luxorasap-0.1.32 → luxorasap-0.1.34}/tests/test_ingest_cloud.py +0 -0
- {luxorasap-0.1.32 → luxorasap-0.1.34}/tests/test_ingest_legacy_local.py +0 -0
- {luxorasap-0.1.32 → luxorasap-0.1.34}/tests/test_utils_dataframe.py +0 -0
- {luxorasap-0.1.32 → luxorasap-0.1.34}/tests/test_utils_storage.py +0 -0
|
@@ -10,7 +10,7 @@ build-backend = "setuptools.build_meta"
|
|
|
10
10
|
#############################
|
|
11
11
|
[project]
|
|
12
12
|
name = "luxorasap"
|
|
13
|
-
version = "0.1.
|
|
13
|
+
version = "0.1.34"
|
|
14
14
|
description = "Toolbox da Luxor para ingestão, análise e automação de dados financeiros."
|
|
15
15
|
readme = "README.md"
|
|
16
16
|
requires-python = ">=3.9"
|
|
@@ -78,7 +78,7 @@ exclude = ["tests*"]
|
|
|
78
78
|
# bumpver (sem-ver)
|
|
79
79
|
#############################
|
|
80
80
|
[tool.bumpver]
|
|
81
|
-
current_version = "0.1.
|
|
81
|
+
current_version = "0.1.34"
|
|
82
82
|
version_pattern = "MAJOR.MINOR.PATCH"
|
|
83
83
|
|
|
84
84
|
# regex explícito – obrigatório no bumpver 2024+
|
|
@@ -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.34"
|
|
17
17
|
|
|
18
18
|
# ─── Lazy loader ─────────────────────────────────────────────────
|
|
19
19
|
def __getattr__(name: str) -> ModuleType:
|
|
@@ -105,7 +105,7 @@ class DataLoader:
|
|
|
105
105
|
self.tracked_files[tracked_file_path]["last_mtime"] = file_mtime
|
|
106
106
|
|
|
107
107
|
|
|
108
|
-
def load_file_if_modified(self, tracked_file_path, export_to_blob=False, blob_directory='enriched/parquet'):
|
|
108
|
+
def load_file_if_modified(self, tracked_file_path, export_to_blob=False, blob_directory='enriched/parquet', trials=25):
|
|
109
109
|
"""Carrega arquivo no caminho indicado, carregando na base de dados caso modificado.
|
|
110
110
|
Args:
|
|
111
111
|
tracked_file_path (pathlib.Path): caminho ate o arquivo(cadastro previamente por add_file_tracker)
|
|
@@ -126,7 +126,6 @@ class DataLoader:
|
|
|
126
126
|
|
|
127
127
|
# tables sera sempre um dicionario de tabelas
|
|
128
128
|
tables = None
|
|
129
|
-
trials = 25
|
|
130
129
|
t_counter = 1
|
|
131
130
|
while trials - t_counter > 0:
|
|
132
131
|
try:
|
|
@@ -152,7 +151,7 @@ class DataLoader:
|
|
|
152
151
|
# normalize_columns=file_data["normalize_columns"], export_to_blob=export_to_blob,
|
|
153
152
|
# blob_directory=blob_directory)
|
|
154
153
|
save_table(table_name, table_data, index=file_data["index"], index_name=file_data["index_name"],
|
|
155
|
-
normalize_columns=file_data["normalize_columns"], directory=blob_directory)
|
|
154
|
+
normalize_columns=file_data["normalize_columns"], directory=blob_directory, override=True)
|
|
156
155
|
|
|
157
156
|
self.tracked_files[tracked_file_path]["last_mtime"] = file_last_update
|
|
158
157
|
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import platform
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
if platform.system() == "Windows":
|
|
6
|
-
import win32com.client as win32 # type: ignore
|
|
7
|
-
else:
|
|
8
|
-
win32 = None # type: ignore
|
|
9
|
-
except Exception:
|
|
10
|
-
win32 = None # type: ignore
|
|
3
|
+
import win32com.client
|
|
11
4
|
|
|
12
5
|
|
|
13
6
|
def close_excel_worksheet(filename, save=True):
|
|
@@ -17,11 +10,6 @@ def close_excel_worksheet(filename, save=True):
|
|
|
17
10
|
:param salvar: Se True, salva as alterações antes de fechar
|
|
18
11
|
"""
|
|
19
12
|
|
|
20
|
-
if platform.system() != "Windows" or win32 is None:
|
|
21
|
-
# Em Linux/WSL/macOS não faz nada e não quebra
|
|
22
|
-
print("close_excel_worksheet: ignorado (requer Windows/pywin32).")
|
|
23
|
-
return False
|
|
24
|
-
|
|
25
13
|
try:
|
|
26
14
|
excel = win32com.client.Dispatch("Excel.Application")
|
|
27
15
|
for wb in excel.Workbooks:
|
|
@@ -35,4 +23,5 @@ def close_excel_worksheet(filename, save=True):
|
|
|
35
23
|
return
|
|
36
24
|
print(f"O arquivo {filename} não estava aberto no Excel.")
|
|
37
25
|
except Exception as e:
|
|
38
|
-
print(f"Erro ao tentar fechar {filename} no Windows: {e}")
|
|
26
|
+
print(f"Erro ao tentar fechar {filename} no Windows: {e}")
|
|
27
|
+
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|