tesorotools-python 0.0.42__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.
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/PKG-INFO +1 -1
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/pyproject.toml +1 -1
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/__init__.py +157 -154
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/artists/__init__.py +48 -47
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/artists/barh_plot.py +578 -372
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/utils/shortcuts.py +38 -35
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/.gitignore +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/_build_context.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/_registry.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/artists/_common.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/artists/line_plot.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/artists/stacked.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/artists/type_curve.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/assets/README.md +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/assets/fonts/CabinetGrotesk-Black.otf +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/assets/fonts/CabinetGrotesk-Bold.otf +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/assets/fonts/CabinetGrotesk-Extrabold.otf +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/assets/fonts/CabinetGrotesk-Extralight.otf +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/assets/fonts/CabinetGrotesk-Light.otf +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/assets/fonts/CabinetGrotesk-Medium.otf +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/assets/fonts/CabinetGrotesk-Regular.otf +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/assets/fonts/CabinetGrotesk-Thin.otf +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/assets/fonts/README.md +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/assets/plots.yaml +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/assets/tesoro.mplstyle +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/data_sources/__init__.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/data_sources/debug.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/database/__init__.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/database/local.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/database/push.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/database/shared.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/dependencies/__init__.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/dependencies/node.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/dependencies/resolution.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/driver.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/manifest.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/offsets/__init__.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/offsets/offsets.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/offsets/outliers.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/orchestration.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/pipeline/__init__.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/pipeline/diagnose.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/pipeline/engine.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/pipeline/rules.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/providers/__init__.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/providers/base.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/providers/bde.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/providers/ecb.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/providers/lseg.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/py.typed +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/render/__init__.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/render/content/__init__.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/render/content/content.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/render/content/images.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/render/content/section.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/render/content/subtitle.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/render/content/table.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/render/content/text.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/render/content/title.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/render/report.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/testing/__init__.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/testing/compare.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/utils/__init__.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/utils/config.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/utils/format.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/utils/globals.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/utils/matplotlib.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/utils/series.py +0 -0
- {tesorotools_python-0.0.42 → tesorotools_python-0.0.43}/src/tesorotools/utils/template.py +0 -0
|
@@ -1,154 +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]``, ``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
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
from tesorotools.
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
register_artist("
|
|
77
|
-
register_artist("
|
|
78
|
-
register_artist("
|
|
79
|
-
register_artist("
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
register_tag("
|
|
84
|
-
register_tag("
|
|
85
|
-
register_tag("
|
|
86
|
-
register_tag("
|
|
87
|
-
register_tag("
|
|
88
|
-
register_tag("
|
|
89
|
-
register_tag("
|
|
90
|
-
register_tag("
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
"
|
|
103
|
-
"
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
"
|
|
107
|
-
"
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
"
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
"
|
|
116
|
-
"
|
|
117
|
-
"
|
|
118
|
-
"
|
|
119
|
-
"
|
|
120
|
-
"
|
|
121
|
-
"
|
|
122
|
-
"
|
|
123
|
-
"
|
|
124
|
-
"
|
|
125
|
-
"
|
|
126
|
-
"
|
|
127
|
-
"
|
|
128
|
-
"
|
|
129
|
-
"
|
|
130
|
-
"
|
|
131
|
-
"
|
|
132
|
-
"
|
|
133
|
-
"
|
|
134
|
-
"
|
|
135
|
-
"
|
|
136
|
-
"
|
|
137
|
-
"
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
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
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
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
|
+
]
|