luxorasap 0.1.5__tar.gz → 0.1.7__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.
Files changed (34) hide show
  1. {luxorasap-0.1.5 → luxorasap-0.1.7}/PKG-INFO +3 -3
  2. {luxorasap-0.1.5 → luxorasap-0.1.7}/pyproject.toml +4 -4
  3. {luxorasap-0.1.5 → luxorasap-0.1.7}/src/luxorasap/__init__.py +1 -1
  4. {luxorasap-0.1.5 → luxorasap-0.1.7}/src/luxorasap/btgapi/reports.py +4 -3
  5. {luxorasap-0.1.5 → luxorasap-0.1.7}/src/luxorasap/ingest/cloud/__init__.py +8 -0
  6. {luxorasap-0.1.5 → luxorasap-0.1.7}/src/luxorasap.egg-info/PKG-INFO +3 -3
  7. {luxorasap-0.1.5 → luxorasap-0.1.7}/README.md +0 -0
  8. {luxorasap-0.1.5 → luxorasap-0.1.7}/setup.cfg +0 -0
  9. {luxorasap-0.1.5 → luxorasap-0.1.7}/src/luxorasap/btgapi/__init__.py +0 -0
  10. {luxorasap-0.1.5 → luxorasap-0.1.7}/src/luxorasap/btgapi/auth.py +0 -0
  11. {luxorasap-0.1.5 → luxorasap-0.1.7}/src/luxorasap/btgapi/trades.py +0 -0
  12. {luxorasap-0.1.5 → luxorasap-0.1.7}/src/luxorasap/datareader/__init__.py +0 -0
  13. {luxorasap-0.1.5 → luxorasap-0.1.7}/src/luxorasap/datareader/core.py +0 -0
  14. {luxorasap-0.1.5 → luxorasap-0.1.7}/src/luxorasap/ingest/__init__.py +0 -0
  15. {luxorasap-0.1.5 → luxorasap-0.1.7}/src/luxorasap/ingest/legacy_local/dataloader.py +0 -0
  16. {luxorasap-0.1.5 → luxorasap-0.1.7}/src/luxorasap/utils/__init__.py +0 -0
  17. {luxorasap-0.1.5 → luxorasap-0.1.7}/src/luxorasap/utils/dataframe/__init__.py +0 -0
  18. {luxorasap-0.1.5 → luxorasap-0.1.7}/src/luxorasap/utils/dataframe/reader.py +0 -0
  19. {luxorasap-0.1.5 → luxorasap-0.1.7}/src/luxorasap/utils/dataframe/transforms.py +0 -0
  20. {luxorasap-0.1.5 → luxorasap-0.1.7}/src/luxorasap/utils/storage/__init__.py +0 -0
  21. {luxorasap-0.1.5 → luxorasap-0.1.7}/src/luxorasap/utils/storage/blob.py +0 -0
  22. {luxorasap-0.1.5 → luxorasap-0.1.7}/src/luxorasap.egg-info/SOURCES.txt +0 -0
  23. {luxorasap-0.1.5 → luxorasap-0.1.7}/src/luxorasap.egg-info/dependency_links.txt +0 -0
  24. {luxorasap-0.1.5 → luxorasap-0.1.7}/src/luxorasap.egg-info/entry_points.txt +0 -0
  25. {luxorasap-0.1.5 → luxorasap-0.1.7}/src/luxorasap.egg-info/requires.txt +0 -0
  26. {luxorasap-0.1.5 → luxorasap-0.1.7}/src/luxorasap.egg-info/top_level.txt +0 -0
  27. {luxorasap-0.1.5 → luxorasap-0.1.7}/tests/test_btgapi_auth.py +0 -0
  28. {luxorasap-0.1.5 → luxorasap-0.1.7}/tests/test_btgapi_reports.py +0 -0
  29. {luxorasap-0.1.5 → luxorasap-0.1.7}/tests/test_btgapi_trades.py +0 -0
  30. {luxorasap-0.1.5 → luxorasap-0.1.7}/tests/test_datareader.py +0 -0
  31. {luxorasap-0.1.5 → luxorasap-0.1.7}/tests/test_ingest_cloud.py +0 -0
  32. {luxorasap-0.1.5 → luxorasap-0.1.7}/tests/test_ingest_legacy_local.py +0 -0
  33. {luxorasap-0.1.5 → luxorasap-0.1.7}/tests/test_utils_dataframe.py +0 -0
  34. {luxorasap-0.1.5 → luxorasap-0.1.7}/tests/test_utils_storage.py +0 -0
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: luxorasap
3
- Version: 0.1.5
3
+ Version: 0.1.7
4
4
  Summary: Toolbox da Luxor para ingestão, análise e automação de dados financeiros.
5
5
  Author-email: Luxor Group <backoffice@luxor.com.br>
6
6
  License: Proprietary – All rights reserved
7
- Project-URL: Homepage, https://github.com/luxor-group/luxor-asap
8
- Project-URL: Documentation, https://luxor-group.github.io/luxorasap-docs/
7
+ Project-URL: Homepage, https://github.com/luxorinvestimentos/luxor-asap
8
+ Project-URL: Documentation, https://luxorinvestimentos.github.io/luxorasap-docs/
9
9
  Classifier: Programming Language :: Python :: 3
10
10
  Classifier: License :: Other/Proprietary License
11
11
  Classifier: Operating System :: OS Independent
@@ -10,7 +10,7 @@ build-backend = "setuptools.build_meta"
10
10
  #############################
11
11
  [project]
12
12
  name = "luxorasap"
13
- version = "0.1.5"
13
+ version = "0.1.7"
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"
@@ -57,8 +57,8 @@ dev = [
57
57
  ]
58
58
 
59
59
  [project.urls]
60
- Homepage = "https://github.com/luxor-group/luxor-asap"
61
- Documentation = "https://luxor-group.github.io/luxorasap-docs/"
60
+ Homepage = "https://github.com/luxorinvestimentos/luxor-asap"
61
+ Documentation = "https://luxorinvestimentos.github.io/luxorasap-docs/"
62
62
 
63
63
  #############################
64
64
  # Console scripts (opcional)
@@ -78,7 +78,7 @@ exclude = ["tests*"]
78
78
  # bumpver (sem-ver)
79
79
  #############################
80
80
  [tool.bumpver]
81
- current_version = "0.1.5"
81
+ current_version = "0.1.7"
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.5"
16
+ __version__ = "0.1.7"
17
17
 
18
18
  # ─── Lazy loader ─────────────────────────────────────────────────
19
19
  def __getattr__(name: str) -> ModuleType:
@@ -96,8 +96,9 @@ def check_report_ticket(token: str, ticket: str, *, page: Optional[int] = None)
96
96
 
97
97
  result = payload.get("result")
98
98
 
99
- if result == "Processando" or result == 'Aguardando processamento':
100
- raise BTGApiError("Processando")
99
+ if isinstance(result, str):
100
+ if (result.lower() in "processando") or ('process' in result.lower()):
101
+ raise BTGApiError("Processando")
101
102
 
102
103
  # 3. Quando pronto, result é JSON string com UrlDownload
103
104
  if isinstance(result, str):
@@ -117,7 +118,7 @@ def check_report_ticket(token: str, ticket: str, *, page: Optional[int] = None)
117
118
  except Exception as exc:
118
119
  raise BTGApiError(f"Falha ao converter resultado em DataFrame: {exc}") from exc
119
120
 
120
- raise BTGApiError("Formato de resposta desconhecido")
121
+ raise BTGApiError(f"Formato de resposta desconhecido. Resultado:\n{result}")
121
122
 
122
123
 
123
124
  def await_report_ticket_result(token: str, ticket: str, *, attempts: int = 10,
@@ -1,6 +1,7 @@
1
1
  """Camada moderna de ingestão: grava / incrementa tabelas em ADLS (Parquet)."""
2
2
 
3
3
  import pandas as pd
4
+ import datetime as dt
4
5
 
5
6
  from luxorasap.utils.storage import BlobParquetClient
6
7
  from luxorasap.utils.dataframe import prep_for_save
@@ -24,6 +25,9 @@ def save_table(
24
25
  ):
25
26
  """Salva DataFrame como Parquet em ADLS (sobrescrevendo)."""
26
27
 
28
+ if 'Last_Updated' not in df.columns:
29
+ df['Last_Updated'] = dt.datetime.now()
30
+
27
31
  if override == False:
28
32
  lq = LuxorQuery()
29
33
  if lq.table_exists(table_name):
@@ -43,8 +47,11 @@ def incremental_load(
43
47
  index_name: str = "index",
44
48
  normalize_columns: bool = True,
45
49
  directory: str = "enriched/parquet",
50
+ override = False
46
51
  ):
47
52
  """Concatena novos dados aos existentes, cortando duplicados pela data."""
53
+ df["Last_Updated"] = dt.datetime.now()
54
+
48
55
  if lq.table_exists(table_name):
49
56
  prev = lq.get_table(table_name)
50
57
  cutoff = df[increment_column].max()
@@ -58,4 +65,5 @@ def incremental_load(
58
65
  index_name=index_name,
59
66
  normalize_columns=normalize_columns,
60
67
  directory=directory,
68
+ override=override
61
69
  )
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: luxorasap
3
- Version: 0.1.5
3
+ Version: 0.1.7
4
4
  Summary: Toolbox da Luxor para ingestão, análise e automação de dados financeiros.
5
5
  Author-email: Luxor Group <backoffice@luxor.com.br>
6
6
  License: Proprietary – All rights reserved
7
- Project-URL: Homepage, https://github.com/luxor-group/luxor-asap
8
- Project-URL: Documentation, https://luxor-group.github.io/luxorasap-docs/
7
+ Project-URL: Homepage, https://github.com/luxorinvestimentos/luxor-asap
8
+ Project-URL: Documentation, https://luxorinvestimentos.github.io/luxorasap-docs/
9
9
  Classifier: Programming Language :: Python :: 3
10
10
  Classifier: License :: Other/Proprietary License
11
11
  Classifier: Operating System :: OS Independent
File without changes
File without changes