tesorotools-python 0.0.41__tar.gz → 0.0.43__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 (69) hide show
  1. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/PKG-INFO +3 -1
  2. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/pyproject.toml +2 -1
  3. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/__init__.py +157 -148
  4. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/artists/__init__.py +48 -47
  5. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/artists/barh_plot.py +578 -372
  6. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/providers/__init__.py +10 -5
  7. tesorotools_python-0.0.43/src/tesorotools/providers/lseg.py +792 -0
  8. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/utils/shortcuts.py +38 -35
  9. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/.gitignore +0 -0
  10. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/_build_context.py +0 -0
  11. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/_registry.py +0 -0
  12. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/artists/_common.py +0 -0
  13. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/artists/line_plot.py +0 -0
  14. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/artists/stacked.py +0 -0
  15. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/artists/type_curve.py +0 -0
  16. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/assets/README.md +0 -0
  17. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/assets/fonts/CabinetGrotesk-Black.otf +0 -0
  18. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/assets/fonts/CabinetGrotesk-Bold.otf +0 -0
  19. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/assets/fonts/CabinetGrotesk-Extrabold.otf +0 -0
  20. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/assets/fonts/CabinetGrotesk-Extralight.otf +0 -0
  21. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/assets/fonts/CabinetGrotesk-Light.otf +0 -0
  22. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/assets/fonts/CabinetGrotesk-Medium.otf +0 -0
  23. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/assets/fonts/CabinetGrotesk-Regular.otf +0 -0
  24. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/assets/fonts/CabinetGrotesk-Thin.otf +0 -0
  25. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/assets/fonts/README.md +0 -0
  26. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/assets/plots.yaml +0 -0
  27. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/assets/tesoro.mplstyle +0 -0
  28. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/data_sources/__init__.py +0 -0
  29. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/data_sources/debug.py +0 -0
  30. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/database/__init__.py +0 -0
  31. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/database/local.py +0 -0
  32. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/database/push.py +0 -0
  33. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/database/shared.py +0 -0
  34. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/dependencies/__init__.py +0 -0
  35. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/dependencies/node.py +0 -0
  36. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/dependencies/resolution.py +0 -0
  37. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/driver.py +0 -0
  38. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/manifest.py +0 -0
  39. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/offsets/__init__.py +0 -0
  40. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/offsets/offsets.py +0 -0
  41. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/offsets/outliers.py +0 -0
  42. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/orchestration.py +0 -0
  43. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/pipeline/__init__.py +0 -0
  44. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/pipeline/diagnose.py +0 -0
  45. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/pipeline/engine.py +0 -0
  46. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/pipeline/rules.py +0 -0
  47. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/providers/base.py +0 -0
  48. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/providers/bde.py +0 -0
  49. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/providers/ecb.py +0 -0
  50. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/py.typed +0 -0
  51. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/render/__init__.py +0 -0
  52. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/render/content/__init__.py +0 -0
  53. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/render/content/content.py +0 -0
  54. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/render/content/images.py +0 -0
  55. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/render/content/section.py +0 -0
  56. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/render/content/subtitle.py +0 -0
  57. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/render/content/table.py +0 -0
  58. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/render/content/text.py +0 -0
  59. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/render/content/title.py +0 -0
  60. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/render/report.py +0 -0
  61. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/testing/__init__.py +0 -0
  62. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/testing/compare.py +0 -0
  63. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/utils/__init__.py +0 -0
  64. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/utils/config.py +0 -0
  65. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/utils/format.py +0 -0
  66. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/utils/globals.py +0 -0
  67. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/utils/matplotlib.py +0 -0
  68. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/tesorotools/utils/series.py +0 -0
  69. {tesorotools_python-0.0.41 → tesorotools_python-0.0.43}/src/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.41
3
+ Version: 0.0.43
4
4
  Requires-Python: >=3.13
5
5
  Requires-Dist: babel>=2.17
6
6
  Requires-Dist: matplotlib>=3.10
@@ -16,3 +16,5 @@ Provides-Extra: bde
16
16
  Requires-Dist: requests>=2.31; extra == 'bde'
17
17
  Provides-Extra: ecb
18
18
  Requires-Dist: requests>=2.31; extra == 'ecb'
19
+ Provides-Extra: lseg
20
+ Requires-Dist: lseg-data>=2.1; extra == 'lseg'
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  name = "tesorotools-python"
3
3
  requires-python = ">=3.13"
4
- version = "0.0.41"
4
+ version = "0.0.43"
5
5
  dependencies = [
6
6
  # database and ORM
7
7
  "psycopg[binary]>=3.1",
@@ -27,6 +27,7 @@ dependencies = [
27
27
  [project.optional-dependencies]
28
28
  bde = ["requests>=2.31"]
29
29
  ecb = ["requests>=2.31"]
30
+ lseg = ["lseg-data>=2.1"]
30
31
 
31
32
  [dependency-groups]
32
33
  dev = [
@@ -1,148 +1,157 @@
1
- """tesorotools public API.
2
-
3
- Importing ``tesorotools`` eagerly loads artist and render
4
- classes (their modules run matplotlib/locale setup as side
5
- effects) and registers their YAML tags via
6
- ``_register_builtins``.
7
-
8
- Provider subclasses gated by optional extras
9
- (``BdeProvider`` requires ``[bde]``, ``EcbProvider``
10
- requires ``[ecb]``) are exposed lazily through
11
- ``__getattr__``; importing this module does not require the
12
- extras to be installed.
13
-
14
- Third parties extend the package via ``register_artist``,
15
- ``register_tag``, and ``register_provider`` (and their
16
- plural variants). See ``docs/extending.md`` for the
17
- recommended idioms.
18
- """
19
-
20
- from typing import TYPE_CHECKING, Any
21
-
22
- if TYPE_CHECKING:
23
- from tesorotools.providers.bde import BdeProvider
24
- from tesorotools.providers.ecb import EcbProvider
25
-
26
- from tesorotools._build_context import BuildContext
27
- from tesorotools._registry import (
28
- Artist,
29
- YamlConstructor,
30
- all_artists,
31
- all_providers,
32
- all_tags,
33
- get_artist,
34
- get_provider,
35
- iter_artists,
36
- iter_providers,
37
- iter_tags,
38
- register_artist,
39
- register_artists,
40
- register_provider,
41
- register_providers,
42
- register_tag,
43
- register_tags,
44
- )
45
- from tesorotools.artists import (
46
- Format,
47
- HorizontalBarChart,
48
- Legend,
49
- LinePlot,
50
- StackedAreaPlot,
51
- StackedBarPlot,
52
- TypeCurve,
53
- )
54
- from tesorotools.orchestration import CompositeRegistry, iter_contexts
55
- from tesorotools.providers.base import (
56
- DataProvider,
57
- RegistryProtocol,
58
- bootstrap_providers,
59
- )
60
- from tesorotools.render import (
61
- Content,
62
- Image,
63
- Images,
64
- Report,
65
- Section,
66
- Subtitle,
67
- Table,
68
- Text,
69
- Title,
70
- )
71
-
72
-
73
- def _register_builtins() -> None:
74
- register_artist("line_plot", LinePlot)
75
- register_artist("stacked_area", StackedAreaPlot)
76
- register_artist("stacked_bar", StackedBarPlot)
77
- register_artist("barh", HorizontalBarChart)
78
- register_artist("type_curve", TypeCurve)
79
-
80
- register_tag("format", Format)
81
- register_tag("legend", Legend)
82
- register_tag("report", Report)
83
- register_tag("section", Section)
84
- register_tag("image", Image)
85
- register_tag("images", Images)
86
- register_tag("table", Table)
87
- register_tag("text", Text)
88
- register_tag("title", Title)
89
- register_tag("subtitle", Subtitle)
90
-
91
-
92
- _register_builtins()
93
-
94
-
95
- __all__ = [
96
- "Artist",
97
- "BdeProvider",
98
- "BuildContext",
99
- "CompositeRegistry",
100
- "Content",
101
- "DataProvider",
102
- "EcbProvider",
103
- "Format",
104
- "HorizontalBarChart",
105
- "Image",
106
- "Images",
107
- "Legend",
108
- "LinePlot",
109
- "RegistryProtocol",
110
- "Report",
111
- "Section",
112
- "StackedAreaPlot",
113
- "StackedBarPlot",
114
- "Subtitle",
115
- "Table",
116
- "Text",
117
- "Title",
118
- "TypeCurve",
119
- "YamlConstructor",
120
- "all_artists",
121
- "all_providers",
122
- "all_tags",
123
- "bootstrap_providers",
124
- "get_artist",
125
- "get_provider",
126
- "iter_artists",
127
- "iter_contexts",
128
- "iter_providers",
129
- "iter_tags",
130
- "register_artist",
131
- "register_artists",
132
- "register_provider",
133
- "register_providers",
134
- "register_tag",
135
- "register_tags",
136
- ]
137
-
138
-
139
- def __getattr__(name: str) -> Any:
140
- if name == "BdeProvider":
141
- from tesorotools.providers.bde import BdeProvider
142
-
143
- return BdeProvider
144
- if name == "EcbProvider":
145
- from tesorotools.providers.ecb import EcbProvider
146
-
147
- return EcbProvider
148
- raise AttributeError(f"module 'tesorotools' has no attribute {name!r}")
1
+ """tesorotools public API.
2
+
3
+ Importing ``tesorotools`` eagerly loads artist and render
4
+ classes (their modules run matplotlib/locale setup as side
5
+ effects) and registers their YAML tags via
6
+ ``_register_builtins``.
7
+
8
+ Provider subclasses gated by optional extras
9
+ (``BdeProvider`` requires ``[bde]``, ``EcbProvider``
10
+ requires ``[ecb]``, ``LSEGProvider`` requires ``[lseg]``)
11
+ are exposed lazily through ``__getattr__``; importing this
12
+ module does not require the extras to be installed.
13
+
14
+ Third parties extend the package via ``register_artist``,
15
+ ``register_tag``, and ``register_provider`` (and their
16
+ plural variants). See ``docs/extending.md`` for the
17
+ recommended idioms.
18
+ """
19
+
20
+ from typing import TYPE_CHECKING, Any
21
+
22
+ if TYPE_CHECKING:
23
+ from tesorotools.providers.bde import BdeProvider
24
+ from tesorotools.providers.ecb import EcbProvider
25
+ from tesorotools.providers.lseg import LSEGProvider
26
+
27
+ from tesorotools._build_context import BuildContext
28
+ from tesorotools._registry import (
29
+ Artist,
30
+ YamlConstructor,
31
+ all_artists,
32
+ all_providers,
33
+ all_tags,
34
+ get_artist,
35
+ get_provider,
36
+ iter_artists,
37
+ iter_providers,
38
+ iter_tags,
39
+ register_artist,
40
+ register_artists,
41
+ register_provider,
42
+ register_providers,
43
+ register_tag,
44
+ register_tags,
45
+ )
46
+ from tesorotools.artists import (
47
+ Format,
48
+ GroupedBarChart,
49
+ HorizontalBarChart,
50
+ Legend,
51
+ LinePlot,
52
+ StackedAreaPlot,
53
+ StackedBarPlot,
54
+ TypeCurve,
55
+ )
56
+ from tesorotools.orchestration import CompositeRegistry, iter_contexts
57
+ from tesorotools.providers.base import (
58
+ DataProvider,
59
+ RegistryProtocol,
60
+ bootstrap_providers,
61
+ )
62
+ from tesorotools.render import (
63
+ Content,
64
+ Image,
65
+ Images,
66
+ Report,
67
+ Section,
68
+ Subtitle,
69
+ Table,
70
+ Text,
71
+ Title,
72
+ )
73
+
74
+
75
+ def _register_builtins() -> None:
76
+ register_artist("line_plot", LinePlot)
77
+ register_artist("stacked_area", StackedAreaPlot)
78
+ register_artist("stacked_bar", StackedBarPlot)
79
+ register_artist("barh", HorizontalBarChart)
80
+ register_artist("grouped_barh", GroupedBarChart)
81
+ register_artist("type_curve", TypeCurve)
82
+
83
+ register_tag("format", Format)
84
+ register_tag("legend", Legend)
85
+ register_tag("report", Report)
86
+ register_tag("section", Section)
87
+ register_tag("image", Image)
88
+ register_tag("images", Images)
89
+ register_tag("table", Table)
90
+ register_tag("text", Text)
91
+ register_tag("title", Title)
92
+ register_tag("subtitle", Subtitle)
93
+
94
+
95
+ _register_builtins()
96
+
97
+
98
+ __all__ = [
99
+ "Artist",
100
+ "BdeProvider",
101
+ "BuildContext",
102
+ "CompositeRegistry",
103
+ "Content",
104
+ "DataProvider",
105
+ "EcbProvider",
106
+ "Format",
107
+ "GroupedBarChart",
108
+ "HorizontalBarChart",
109
+ "Image",
110
+ "Images",
111
+ "Legend",
112
+ "LinePlot",
113
+ "LSEGProvider",
114
+ "RegistryProtocol",
115
+ "Report",
116
+ "Section",
117
+ "StackedAreaPlot",
118
+ "StackedBarPlot",
119
+ "Subtitle",
120
+ "Table",
121
+ "Text",
122
+ "Title",
123
+ "TypeCurve",
124
+ "YamlConstructor",
125
+ "all_artists",
126
+ "all_providers",
127
+ "all_tags",
128
+ "bootstrap_providers",
129
+ "get_artist",
130
+ "get_provider",
131
+ "iter_artists",
132
+ "iter_contexts",
133
+ "iter_providers",
134
+ "iter_tags",
135
+ "register_artist",
136
+ "register_artists",
137
+ "register_provider",
138
+ "register_providers",
139
+ "register_tag",
140
+ "register_tags",
141
+ ]
142
+
143
+
144
+ def __getattr__(name: str) -> Any:
145
+ if name == "BdeProvider":
146
+ from tesorotools.providers.bde import BdeProvider
147
+
148
+ return BdeProvider
149
+ if name == "EcbProvider":
150
+ from tesorotools.providers.ecb import EcbProvider
151
+
152
+ return EcbProvider
153
+ if name == "LSEGProvider":
154
+ from tesorotools.providers.lseg import LSEGProvider
155
+
156
+ return LSEGProvider
157
+ raise AttributeError(f"module 'tesorotools' has no attribute {name!r}")
@@ -1,47 +1,48 @@
1
- """Image artists.
2
-
3
- Five chart classes, one shared helpers module, one
4
- matplotlib stylesheet side effect on import.
5
-
6
- Each class follows the same shape:
7
-
8
- * ``__init__(out_path, *, data | data_path, series, ...)``
9
- -- kw-only configuration; ``out_path`` must be ``.png``.
10
- Pass either ``data`` (DataFrame in memory) or
11
- ``data_path`` (``.feather`` on disk), never both.
12
- * ``from_yaml(loader, node)`` -- builds the same instance
13
- from a ``!{name}`` YAML tag.
14
- * ``plot()`` -- renders the chart and writes the PNG; some
15
- classes also expose ``build()`` / ``save()`` for
16
- fine-grained control.
17
-
18
- Shared layout, annotation and styling helpers (plus the
19
- ``Format`` and ``Legend`` config holders) live in
20
- :mod:`tesorotools.artists._common`.
21
-
22
- Document-element artists (Word tables, sections, titles)
23
- live under :mod:`tesorotools.render`; this package is
24
- strictly image output.
25
- """
26
-
27
- import matplotlib.style
28
-
29
- from tesorotools.artists._common import Artist, Format, Legend
30
- from tesorotools.artists.barh_plot import HorizontalBarChart
31
- from tesorotools.artists.line_plot import LinePlot
32
- from tesorotools.artists.stacked import StackedAreaPlot, StackedBarPlot
33
- from tesorotools.artists.type_curve import TypeCurve
34
- from tesorotools.utils.globals import STYLE_SHEET
35
-
36
- matplotlib.style.use(STYLE_SHEET)
37
-
38
- __all__ = [
39
- "Artist",
40
- "Format",
41
- "HorizontalBarChart",
42
- "Legend",
43
- "LinePlot",
44
- "StackedAreaPlot",
45
- "StackedBarPlot",
46
- "TypeCurve",
47
- ]
1
+ """Image artists.
2
+
3
+ Five chart classes, one shared helpers module, one
4
+ matplotlib stylesheet side effect on import.
5
+
6
+ Each class follows the same shape:
7
+
8
+ * ``__init__(out_path, *, data | data_path, series, ...)``
9
+ -- kw-only configuration; ``out_path`` must be ``.png``.
10
+ Pass either ``data`` (DataFrame in memory) or
11
+ ``data_path`` (``.feather`` on disk), never both.
12
+ * ``from_yaml(loader, node)`` -- builds the same instance
13
+ from a ``!{name}`` YAML tag.
14
+ * ``plot()`` -- renders the chart and writes the PNG; some
15
+ classes also expose ``build()`` / ``save()`` for
16
+ fine-grained control.
17
+
18
+ Shared layout, annotation and styling helpers (plus the
19
+ ``Format`` and ``Legend`` config holders) live in
20
+ :mod:`tesorotools.artists._common`.
21
+
22
+ Document-element artists (Word tables, sections, titles)
23
+ live under :mod:`tesorotools.render`; this package is
24
+ strictly image output.
25
+ """
26
+
27
+ import matplotlib.style
28
+
29
+ from tesorotools.artists._common import Artist, Format, Legend
30
+ from tesorotools.artists.barh_plot import GroupedBarChart, HorizontalBarChart
31
+ from tesorotools.artists.line_plot import LinePlot
32
+ from tesorotools.artists.stacked import StackedAreaPlot, StackedBarPlot
33
+ from tesorotools.artists.type_curve import TypeCurve
34
+ from tesorotools.utils.globals import STYLE_SHEET
35
+
36
+ matplotlib.style.use(STYLE_SHEET)
37
+
38
+ __all__ = [
39
+ "Artist",
40
+ "Format",
41
+ "GroupedBarChart",
42
+ "HorizontalBarChart",
43
+ "Legend",
44
+ "LinePlot",
45
+ "StackedAreaPlot",
46
+ "StackedBarPlot",
47
+ "TypeCurve",
48
+ ]