tesorotools-python 0.0.15__tar.gz → 0.0.16__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 (52) hide show
  1. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/PKG-INFO +1 -1
  2. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/pyproject.toml +1 -1
  3. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/artists/barh_plot.py +2 -2
  4. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/artists/line_plot.py +4 -2
  5. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/artists/table.py +5 -4
  6. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/artists/type_curve.py +4 -2
  7. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/.gitignore +0 -0
  8. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/__init__.py +0 -0
  9. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/artists/__init__.py +0 -0
  10. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/assets/README.md +0 -0
  11. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/assets/fonts/CabinetGrotesk-Black.otf +0 -0
  12. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/assets/fonts/CabinetGrotesk-Bold.otf +0 -0
  13. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/assets/fonts/CabinetGrotesk-Extrabold.otf +0 -0
  14. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/assets/fonts/CabinetGrotesk-Extralight.otf +0 -0
  15. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/assets/fonts/CabinetGrotesk-Light.otf +0 -0
  16. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/assets/fonts/CabinetGrotesk-Medium.otf +0 -0
  17. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/assets/fonts/CabinetGrotesk-Regular.otf +0 -0
  18. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/assets/fonts/CabinetGrotesk-Thin.otf +0 -0
  19. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/assets/fonts/README.md +0 -0
  20. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/assets/plots.yaml +0 -0
  21. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/assets/tesoro.mplstyle +0 -0
  22. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/convert.py +0 -0
  23. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/data_sources/README.md +0 -0
  24. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/data_sources/__init__.py +0 -0
  25. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/data_sources/debug.py +0 -0
  26. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/data_sources/lseg.py +0 -0
  27. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/database/__init__.py +0 -0
  28. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/database/push.py +0 -0
  29. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/dependencies/__init__.py +0 -0
  30. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/dependencies/functions.py +0 -0
  31. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/dependencies/node.py +0 -0
  32. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/dependencies/resolution.py +0 -0
  33. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/main.py +0 -0
  34. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/offsets/__init__.py +0 -0
  35. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/offsets/offsets.py +0 -0
  36. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/offsets/outliers.py +0 -0
  37. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/render/__init__.py +0 -0
  38. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/render/content/__init__.py +0 -0
  39. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/render/content/content.py +0 -0
  40. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/render/content/images.py +0 -0
  41. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/render/content/section.py +0 -0
  42. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/render/content/subtitle.py +0 -0
  43. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/render/content/table.py +0 -0
  44. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/render/content/text.py +0 -0
  45. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/render/content/title.py +0 -0
  46. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/render/report.py +0 -0
  47. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/utils/__init__.py +0 -0
  48. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/utils/config.py +0 -0
  49. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/utils/globals.py +0 -0
  50. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/utils/matplotlib.py +0 -0
  51. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/utils/series.py +0 -0
  52. {tesorotools_python-0.0.15 → tesorotools_python-0.0.16}/tesorotools/utils/template.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tesorotools-python
3
- Version: 0.0.15
3
+ Version: 0.0.16
4
4
  Requires-Dist: babel
5
5
  Requires-Dist: eikon
6
6
  Requires-Dist: lseg-data
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "tesorotools-python"
3
- version = "0.0.15"
3
+ version = "0.0.16"
4
4
  dependencies = ["psycopg2", "SQLAlchemy", "pandas", "matplotlib", "pyarrow", "python-docx", "openpyxl", "PyYAML", "babel", "eikon", "lseg-data"]
5
5
 
6
6
  [build-system]
@@ -289,7 +289,7 @@ def _normalize_from_flash(
289
289
 
290
290
 
291
291
  def plot_barh_charts_from_flash(
292
- flash: pd.DataFrame, config_dicts: dict[str, dict]
292
+ out_path: Path, flash: pd.DataFrame, config_dicts: dict[str, dict]
293
293
  ):
294
294
  for name, config in config_dicts.items():
295
295
  blocks: dict[str, Any] = config.get("blocks", None)
@@ -306,5 +306,5 @@ def plot_barh_charts_from_flash(
306
306
  units_bar=config["format"]["units"],
307
307
  units_axis=config.get("axis_format", {"units": ""})["units"],
308
308
  )
309
- out_file = Path(DEBUG / "barh" / f"{name}.png")
309
+ out_file = out_path / f"{name}.png"
310
310
  _plot_barh_chart(out_file, standard_dict, alias, **config)
@@ -100,7 +100,9 @@ def plot_line_chart(
100
100
  fig.savefig(out_name)
101
101
 
102
102
 
103
- def plot_line_charts(data: pd.DataFrame, config_dicts: dict[str, Any]):
103
+ def plot_line_charts(
104
+ out_path: Path, data: pd.DataFrame, config_dicts: dict[str, Any]
105
+ ):
104
106
  for name, config in config_dicts.items():
105
107
  start_date: pd.Timestamp = pd.to_datetime(config["start_date"])
106
108
  end_date_str: str | None = config["end_date"]
@@ -114,7 +116,7 @@ def plot_line_charts(data: pd.DataFrame, config_dicts: dict[str, Any]):
114
116
  slice(start_date, end_date), series.keys()
115
117
  ]
116
118
  trimmed_data = trimmed_data.rename(columns=series)
117
- out_name: Path = DEBUG / "line" / f"{name}.png"
119
+ out_name: Path = out_path / f"{name}.png"
118
120
  plot_line_chart(out_name, trimmed_data, **config)
119
121
 
120
122
 
@@ -1,4 +1,5 @@
1
1
  from math import floor
2
+ from pathlib import Path
2
3
  from typing import Any
3
4
 
4
5
  import pandas as pd
@@ -186,7 +187,7 @@ def generate_table(table_data: pd.DataFrame, table_cfg: dict[str, Any]):
186
187
 
187
188
 
188
189
  def generate_tables_from_flash(
189
- flash: pd.DataFrame, config_dicts: dict[str, dict]
190
+ out_path: Path, flash: pd.DataFrame, config_dicts: dict[str, dict]
190
191
  ):
191
192
  for table_name, table_cfg in config_dicts.items():
192
193
  series: list[str] = list(collect_series(table_cfg))
@@ -194,6 +195,6 @@ def generate_tables_from_flash(
194
195
  formatted_table, color_table, shade_table = generate_table(
195
196
  table_data, table_cfg
196
197
  )
197
- formatted_table.to_feather(DEBUG / "table" / f"{table_name}.feather")
198
- color_table.to_feather(DEBUG / "table" / f"{table_name}_color.feather")
199
- shade_table.to_feather(DEBUG / "table" / f"{table_name}_shade.feather")
198
+ formatted_table.to_feather(out_path / f"{table_name}.feather")
199
+ color_table.to_feather(out_path / f"{table_name}_color.feather")
200
+ shade_table.to_feather(out_path / f"{table_name}_shade.feather")
@@ -199,7 +199,9 @@ def plot_type_curve(
199
199
 
200
200
 
201
201
  # data is expected to be a simple time series data, columns are series and rows represents dates
202
- def plot_type_curves(data: pd.DataFrame, config_dicts: dict[str, Any]):
202
+ def plot_type_curves(
203
+ out_path: Path, data: pd.DataFrame, config_dicts: dict[str, Any]
204
+ ):
203
205
  for name, config in config_dicts.items():
204
206
  if not name.startswith("."): # aux entries
205
207
  series: dict[str, str] = config["series"]
@@ -211,6 +213,6 @@ def plot_type_curves(data: pd.DataFrame, config_dicts: dict[str, Any]):
211
213
  trimmed_data: pd.DataFrame = trimmed_data.rename(columns=series)
212
214
  plot_type_curve(
213
215
  data=trimmed_data,
214
- out_file=DEBUG / "type_curve" / f"{name}.png",
216
+ out_file=out_path / f"{name}.png",
215
217
  **config,
216
218
  )