tesorotools-python 0.1.12__tar.gz → 0.1.14__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.1.12 → tesorotools_python-0.1.14}/PKG-INFO +1 -1
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/__init__.py +43 -3
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/_registry.py +56 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/artists/__init__.py +29 -1
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/artists/_common.py +15 -1
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/artists/_dates.py +11 -117
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/artists/bar_line.py +8 -5
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/artists/barh_plot.py +7 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/artists/box_plot.py +3 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/artists/intraday_plot.py +3 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/artists/line_plot.py +3 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/artists/matrix.py +3 -0
- tesorotools_python-0.1.14/src/tesorotools/artists/names.py +131 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/artists/plotly_backend.py +90 -9
- tesorotools_python-0.1.14/src/tesorotools/artists/review.py +424 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/artists/sankey.py +3 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/artists/scatter.py +3 -0
- tesorotools_python-0.1.14/src/tesorotools/artists/sharing.py +306 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/artists/shock_plot.py +4 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/artists/stacked.py +61 -11
- tesorotools_python-0.1.14/src/tesorotools/artists/treemap.py +379 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/artists/type_curve.py +167 -73
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/artists/vector_plot.py +3 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/artists/waterfall.py +3 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/assets/plots.yaml +14 -0
- tesorotools_python-0.1.14/src/tesorotools/dates.py +165 -0
- tesorotools_python-0.1.14/src/tesorotools/extend.py +188 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/note/builder.py +2 -5
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/note/lint.py +5 -4
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/note/skill/SKILL.md +4 -4
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/palette.py +2 -1
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/pipeline/engine.py +21 -11
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/pipeline/rules.py +155 -4
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/presentation/__init__.py +2 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/presentation/builder.py +12 -18
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/presentation/charts.py +13 -15
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/presentation/cli.py +88 -12
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/presentation/house.py +3 -1
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/presentation/native.py +54 -37
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/presentation/skill/SKILL.md +44 -12
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/presentation/skill/reglas.md +3 -3
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/render/content/images.py +34 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/render/content/section.py +4 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/render/content/subtitle.py +11 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/render/content/table.py +19 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/render/content/text.py +4 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/render/content/title.py +8 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/render/report.py +8 -0
- tesorotools_python-0.1.14/src/tesorotools/utils/template.py +397 -0
- tesorotools_python-0.1.12/src/tesorotools/artists/sharing.py +0 -59
- tesorotools_python-0.1.12/src/tesorotools/utils/template.py +0 -132
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/.gitignore +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/pyproject.toml +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/_build_context.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/artists/_bars.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/artists/compact.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/artists/tikz_backend.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/assets/README.md +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/assets/fonts/CabinetGrotesk-Black.otf +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/assets/fonts/CabinetGrotesk-Bold.otf +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/assets/fonts/CabinetGrotesk-Extrabold.otf +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/assets/fonts/CabinetGrotesk-Extralight.otf +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/assets/fonts/CabinetGrotesk-Light.otf +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/assets/fonts/CabinetGrotesk-Medium.otf +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/assets/fonts/CabinetGrotesk-Regular.otf +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/assets/fonts/CabinetGrotesk-Thin.otf +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/assets/fonts/README.md +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/assets/nota_template.dotx +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/assets/template.docx +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/assets/tesoro.mplstyle +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/data_sources/__init__.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/data_sources/debug.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/database/__init__.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/database/local.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/database/push.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/database/shared.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/dependencies/__init__.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/dependencies/node.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/dependencies/resolution.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/driver.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/latex/__init__.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/latex/cli.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/latex/scaffold.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/latex/templates/article/main.tex.tmpl +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/latex/templates/article/sections/01-introduccion.tex +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/latex/templates/article/sections/02-analisis.tex +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/latex/templates/article/sections/03-conclusiones.tex +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/latex/templates/beamer/main.tex.tmpl +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/latex/templates/beamer/slides/01-contexto.tex +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/latex/templates/beamer/slides/02-analisis.tex +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/latex/templates/beamer/slides/03-conclusiones.tex +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/latex/templates/beamer/style/beamerthemeTesoro.sty +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/latex/templates/book/appendices/a-fuentes.tex +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/latex/templates/book/chapters/01-introduccion.tex +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/latex/templates/book/chapters/02-analisis.tex +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/latex/templates/book/frontmatter/resumen.tex +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/latex/templates/book/main.tex.tmpl +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/latex/templates/common/README.md.tmpl +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/latex/templates/common/dot-gitignore +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/latex/templates/common/dot-vscode/settings.json +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/latex/templates/common/figures/dot-gitkeep +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/latex/templates/common/fonts/README.md +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/latex/templates/common/latexmkrc +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/latex/templates/common/refs.bib +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/latex/templates/common/style/tesoro.sty +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/latex/templates/common/style/tesorobrand.sty.tmpl +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/latex/templates/common/style/tesorolocal.sty.tmpl +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/manifest.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/note/__init__.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/note/charts.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/note/cli.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/note/inline.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/note/issues.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/note/markdown.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/note/pdf.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/note/skeleton.md +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/note/skill/reglas.md +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/note/template.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/offsets/__init__.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/offsets/offsets.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/offsets/outliers.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/orchestration.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/pipeline/__init__.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/pipeline/diagnose.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/presentation/fit.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/presentation/fonts.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/presentation/glossary.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/presentation/lint.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/presentation/markdown.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/presentation/pdf.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/presentation/sections.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/presentation/skeleton.md +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/presentation/template.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/providers/__init__.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/providers/base.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/providers/bde.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/providers/ecb.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/providers/fred.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/providers/imf_irfcl.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/providers/lseg.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/py.typed +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/render/__init__.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/render/content/__init__.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/render/content/content.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/render/document.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/scaffold.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/testing/__init__.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/testing/compare.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/utils/__init__.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/utils/config.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/utils/format.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/utils/globals.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/utils/matplotlib.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/utils/series.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/utils/shortcuts.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/web/__init__.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/web/app.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/web/brand.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/web/cli.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/web/components.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/web/formatting.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/web/launcher.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/web/palette.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/web/period.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/web/plotting.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/web/scaffold.py +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/web/templates/Dockerfile.tmpl +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/web/templates/README.md.tmpl +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/web/templates/dot-dockerignore.tmpl +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/web/templates/dot-gitignore.tmpl +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/web/templates/dot-streamlit/config.toml.tmpl +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/web/templates/pyproject.toml.tmpl +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/web/templates/src/$package/__init__.py.tmpl +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/web/templates/src/$package/cli.py.tmpl +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/web/templates/src/$package/main.py.tmpl +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/web/templates/src/$package/sections.py.tmpl +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/web/templates/tests/__init__.py.tmpl +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/web/templates/tests/test_app.py.tmpl +0 -0
- {tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/web/theme.py +0 -0
|
@@ -14,11 +14,16 @@ requires ``[lseg]``) are exposed lazily through
|
|
|
14
14
|
extras to be installed.
|
|
15
15
|
|
|
16
16
|
Third parties extend the package via ``register_artist``,
|
|
17
|
-
``register_tag``,
|
|
18
|
-
plural variants)
|
|
19
|
-
|
|
17
|
+
``register_tag``, ``register_provider`` and ``register_rule``
|
|
18
|
+
(and their plural variants), with the building blocks of
|
|
19
|
+
:mod:`tesorotools.extend`; installed packages that declare a
|
|
20
|
+
``tesorotools.extensions`` entry point are loaded on import
|
|
21
|
+
(:func:`load_extensions`). See ``docs/extending.md`` for the
|
|
22
|
+
recommended idioms and ``docs/estabilidad.md`` for what is
|
|
23
|
+
public.
|
|
20
24
|
"""
|
|
21
25
|
|
|
26
|
+
import os
|
|
22
27
|
from importlib.metadata import PackageNotFoundError, version
|
|
23
28
|
from typing import TYPE_CHECKING, Any
|
|
24
29
|
|
|
@@ -40,6 +45,7 @@ if TYPE_CHECKING:
|
|
|
40
45
|
from tesorotools._build_context import BuildContext
|
|
41
46
|
from tesorotools._registry import (
|
|
42
47
|
Artist,
|
|
48
|
+
NO_EXTENSIONS_ENV,
|
|
43
49
|
YamlConstructor,
|
|
44
50
|
all_artists,
|
|
45
51
|
all_providers,
|
|
@@ -49,6 +55,8 @@ from tesorotools._registry import (
|
|
|
49
55
|
iter_artists,
|
|
50
56
|
iter_providers,
|
|
51
57
|
iter_tags,
|
|
58
|
+
load_extensions,
|
|
59
|
+
loaded_extensions,
|
|
52
60
|
register_artist,
|
|
53
61
|
register_artists,
|
|
54
62
|
register_provider,
|
|
@@ -71,12 +79,21 @@ from tesorotools.artists import (
|
|
|
71
79
|
ShockChart,
|
|
72
80
|
StackedAreaPlot,
|
|
73
81
|
StackedBarPlot,
|
|
82
|
+
TreemapChart,
|
|
74
83
|
TypeCurve,
|
|
75
84
|
VectorPlot,
|
|
76
85
|
Waterfall,
|
|
77
86
|
share_y_axes,
|
|
78
87
|
)
|
|
79
88
|
from tesorotools.orchestration import CompositeRegistry, iter_contexts
|
|
89
|
+
from tesorotools.pipeline.rules import (
|
|
90
|
+
RuleParam,
|
|
91
|
+
RuleSpec,
|
|
92
|
+
build_rule,
|
|
93
|
+
describe_rule,
|
|
94
|
+
describe_rules,
|
|
95
|
+
register_rule,
|
|
96
|
+
)
|
|
80
97
|
from tesorotools.providers.base import (
|
|
81
98
|
DataProvider,
|
|
82
99
|
RegistryProtocol,
|
|
@@ -94,6 +111,12 @@ from tesorotools.render import (
|
|
|
94
111
|
Title,
|
|
95
112
|
new_document,
|
|
96
113
|
)
|
|
114
|
+
from tesorotools.utils.template import (
|
|
115
|
+
Tagged,
|
|
116
|
+
TemplateDumper,
|
|
117
|
+
TemplateLoader,
|
|
118
|
+
dump_template,
|
|
119
|
+
)
|
|
97
120
|
|
|
98
121
|
|
|
99
122
|
def _register_builtins() -> None:
|
|
@@ -112,6 +135,7 @@ def _register_builtins() -> None:
|
|
|
112
135
|
register_artist("waterfall", Waterfall)
|
|
113
136
|
register_artist("sankey", SankeyPlot)
|
|
114
137
|
register_artist("scatter", ScatterPlot)
|
|
138
|
+
register_artist("treemap", TreemapChart)
|
|
115
139
|
|
|
116
140
|
register_tag("format", Format)
|
|
117
141
|
register_tag("legend", Legend)
|
|
@@ -127,6 +151,9 @@ def _register_builtins() -> None:
|
|
|
127
151
|
|
|
128
152
|
_register_builtins()
|
|
129
153
|
|
|
154
|
+
if os.environ.get(NO_EXTENSIONS_ENV) != "1":
|
|
155
|
+
load_extensions()
|
|
156
|
+
|
|
130
157
|
|
|
131
158
|
__all__ = [
|
|
132
159
|
"__version__",
|
|
@@ -161,8 +188,12 @@ __all__ = [
|
|
|
161
188
|
"StackedBarPlot",
|
|
162
189
|
"Subtitle",
|
|
163
190
|
"Table",
|
|
191
|
+
"Tagged",
|
|
192
|
+
"TemplateDumper",
|
|
193
|
+
"TemplateLoader",
|
|
164
194
|
"Text",
|
|
165
195
|
"Title",
|
|
196
|
+
"TreemapChart",
|
|
166
197
|
"TypeCurve",
|
|
167
198
|
"VectorPlot",
|
|
168
199
|
"Waterfall",
|
|
@@ -171,6 +202,7 @@ __all__ = [
|
|
|
171
202
|
"all_providers",
|
|
172
203
|
"all_tags",
|
|
173
204
|
"bootstrap_providers",
|
|
205
|
+
"dump_template",
|
|
174
206
|
"get_artist",
|
|
175
207
|
"get_provider",
|
|
176
208
|
"iter_artists",
|
|
@@ -185,6 +217,14 @@ __all__ = [
|
|
|
185
217
|
"register_tag",
|
|
186
218
|
"register_tags",
|
|
187
219
|
"share_y_axes",
|
|
220
|
+
"RuleParam",
|
|
221
|
+
"RuleSpec",
|
|
222
|
+
"build_rule",
|
|
223
|
+
"describe_rule",
|
|
224
|
+
"describe_rules",
|
|
225
|
+
"load_extensions",
|
|
226
|
+
"loaded_extensions",
|
|
227
|
+
"register_rule",
|
|
188
228
|
]
|
|
189
229
|
|
|
190
230
|
|
|
@@ -39,7 +39,9 @@ import the private dictionaries.
|
|
|
39
39
|
|
|
40
40
|
from __future__ import annotations
|
|
41
41
|
|
|
42
|
+
import warnings
|
|
42
43
|
from collections.abc import Iterator, Mapping
|
|
44
|
+
from importlib.metadata import entry_points
|
|
43
45
|
from typing import Any, Callable, Literal, Protocol, Self, cast, overload
|
|
44
46
|
|
|
45
47
|
from yaml.nodes import MappingNode
|
|
@@ -236,3 +238,57 @@ def iter_tags() -> Iterator[tuple[str, YamlConstructor]]:
|
|
|
236
238
|
def all_tags() -> dict[str, YamlConstructor]:
|
|
237
239
|
"""Return a snapshot dict of every registered ``!`` YAML tag."""
|
|
238
240
|
return dict(iter_tags())
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
# ----------------------------------------------------------------------
|
|
244
|
+
# Extensions declared by installed packages
|
|
245
|
+
# ----------------------------------------------------------------------
|
|
246
|
+
|
|
247
|
+
#: Entry point group of the packages that extend tesorotools.
|
|
248
|
+
EXTENSIONS_GROUP = "tesorotools.extensions"
|
|
249
|
+
#: Set it to ``1`` to import tesorotools without loading extensions.
|
|
250
|
+
NO_EXTENSIONS_ENV = "TESOROTOOLS_NO_EXTENSIONS"
|
|
251
|
+
_LOADED_EXTENSIONS: dict[str, str] = {}
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
def load_extensions(group: str = EXTENSIONS_GROUP) -> dict[str, str]:
|
|
255
|
+
"""Load the extensions that installed packages declare.
|
|
256
|
+
|
|
257
|
+
A package declares one in its ``pyproject.toml``::
|
|
258
|
+
|
|
259
|
+
[project.entry-points."tesorotools.extensions"]
|
|
260
|
+
mi_extension = "mi_paquete.extension:install"
|
|
261
|
+
|
|
262
|
+
and ``install()`` registers its artists, tags, providers and rules.
|
|
263
|
+
An entry point may also name a module, whose import registers them.
|
|
264
|
+
``import tesorotools`` calls this once (unless the environment
|
|
265
|
+
variable ``TESOROTOOLS_NO_EXTENSIONS`` is ``1``), so the extension
|
|
266
|
+
works from the command line, a project or a server alike.
|
|
267
|
+
|
|
268
|
+
An extension that fails is skipped with a :class:`RuntimeWarning`
|
|
269
|
+
naming it, and never stops tesorotools from loading. Returns every
|
|
270
|
+
extension loaded so far, by name, with its ``"module:attr"``; a
|
|
271
|
+
name already loaded is not loaded twice.
|
|
272
|
+
"""
|
|
273
|
+
for point in entry_points(group=group):
|
|
274
|
+
if point.name in _LOADED_EXTENSIONS:
|
|
275
|
+
continue
|
|
276
|
+
try:
|
|
277
|
+
target = point.load()
|
|
278
|
+
if callable(target):
|
|
279
|
+
target()
|
|
280
|
+
except Exception as error: # noqa: BLE001 - never break the import
|
|
281
|
+
warnings.warn(
|
|
282
|
+
f"tesorotools extension {point.name!r} ({point.value}) "
|
|
283
|
+
f"failed to load: {type(error).__name__}: {error}",
|
|
284
|
+
RuntimeWarning,
|
|
285
|
+
stacklevel=2,
|
|
286
|
+
)
|
|
287
|
+
continue
|
|
288
|
+
_LOADED_EXTENSIONS[point.name] = point.value
|
|
289
|
+
return dict(_LOADED_EXTENSIONS)
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
def loaded_extensions() -> dict[str, str]:
|
|
293
|
+
"""The extensions loaded so far, by name, with their ``module:attr``."""
|
|
294
|
+
return dict(_LOADED_EXTENSIONS)
|
|
@@ -20,6 +20,9 @@ Each class follows the same shape:
|
|
|
20
20
|
Plotly figure (all but ``IntradayPlot``);
|
|
21
21
|
:func:`plotly_unsupported` lists the keys it drops.
|
|
22
22
|
|
|
23
|
+
:func:`data_issues` reviews the data of a chart (too many series or
|
|
24
|
+
bars, mixed magnitudes, gaps) and returns ``Issue`` warnings.
|
|
25
|
+
|
|
23
26
|
:func:`share_y_axes` gives the charts that declare the same
|
|
24
27
|
``y_group`` one common y scale.
|
|
25
28
|
|
|
@@ -45,16 +48,31 @@ from tesorotools.artists.box_plot import BoxPlot
|
|
|
45
48
|
from tesorotools.artists.intraday_plot import IntradayPlot
|
|
46
49
|
from tesorotools.artists.line_plot import LinePlot
|
|
47
50
|
from tesorotools.artists.matrix import MatrixChart
|
|
51
|
+
from tesorotools.artists.names import (
|
|
52
|
+
KIND_NAMES,
|
|
53
|
+
KindName,
|
|
54
|
+
kind_from_name,
|
|
55
|
+
native_kind,
|
|
56
|
+
spanish_name,
|
|
57
|
+
)
|
|
58
|
+
from tesorotools.artists.review import ReviewLimits, data_issues
|
|
48
59
|
from tesorotools.artists.sankey import SankeyPlot
|
|
49
60
|
from tesorotools.artists.scatter import ScatterPlot
|
|
50
|
-
from tesorotools.artists.sharing import
|
|
61
|
+
from tesorotools.artists.sharing import (
|
|
62
|
+
align_plot_areas,
|
|
63
|
+
draw_together,
|
|
64
|
+
equal_axis_decimals,
|
|
65
|
+
share_y_axes,
|
|
66
|
+
)
|
|
51
67
|
from tesorotools.artists.shock_plot import ShockChart
|
|
52
68
|
from tesorotools.artists.stacked import StackedAreaPlot, StackedBarPlot
|
|
69
|
+
from tesorotools.artists.treemap import TreemapChart
|
|
53
70
|
from tesorotools.artists.type_curve import TypeCurve
|
|
54
71
|
from tesorotools.artists.vector_plot import VectorPlot
|
|
55
72
|
from tesorotools.artists.waterfall import Waterfall
|
|
56
73
|
|
|
57
74
|
__all__ = [
|
|
75
|
+
"KIND_NAMES",
|
|
58
76
|
"Artist",
|
|
59
77
|
"BarLinePlot",
|
|
60
78
|
"BoxPlot",
|
|
@@ -63,17 +81,27 @@ __all__ = [
|
|
|
63
81
|
"GroupedBarChart",
|
|
64
82
|
"HorizontalBarChart",
|
|
65
83
|
"IntradayPlot",
|
|
84
|
+
"KindName",
|
|
66
85
|
"Legend",
|
|
67
86
|
"LinePlot",
|
|
68
87
|
"MatrixChart",
|
|
88
|
+
"ReviewLimits",
|
|
69
89
|
"SankeyPlot",
|
|
70
90
|
"ScatterPlot",
|
|
71
91
|
"ShockChart",
|
|
72
92
|
"StackedAreaPlot",
|
|
73
93
|
"StackedBarPlot",
|
|
94
|
+
"TreemapChart",
|
|
74
95
|
"TypeCurve",
|
|
75
96
|
"VectorPlot",
|
|
76
97
|
"Waterfall",
|
|
98
|
+
"align_plot_areas",
|
|
99
|
+
"draw_together",
|
|
100
|
+
"equal_axis_decimals",
|
|
101
|
+
"kind_from_name",
|
|
102
|
+
"native_kind",
|
|
103
|
+
"data_issues",
|
|
77
104
|
"plotly_unsupported",
|
|
78
105
|
"share_y_axes",
|
|
106
|
+
"spanish_name",
|
|
79
107
|
]
|
|
@@ -27,7 +27,15 @@ import math
|
|
|
27
27
|
import warnings
|
|
28
28
|
from collections.abc import Sequence
|
|
29
29
|
from pathlib import Path
|
|
30
|
-
from typing import
|
|
30
|
+
from typing import (
|
|
31
|
+
Any,
|
|
32
|
+
ClassVar,
|
|
33
|
+
Literal,
|
|
34
|
+
Protocol,
|
|
35
|
+
Self,
|
|
36
|
+
cast,
|
|
37
|
+
runtime_checkable,
|
|
38
|
+
)
|
|
31
39
|
|
|
32
40
|
import matplotlib.colors as mcolors
|
|
33
41
|
import matplotlib.pyplot as plt
|
|
@@ -369,6 +377,9 @@ class Format:
|
|
|
369
377
|
noise) -- set it on the ``annot_fmt`` that labels the bars.
|
|
370
378
|
"""
|
|
371
379
|
|
|
380
|
+
#: Written on one line by ``dump_template``: ``!format {decimals: 1}``.
|
|
381
|
+
yaml_flow_style: ClassVar[bool] = True
|
|
382
|
+
|
|
372
383
|
def __init__(
|
|
373
384
|
self, units: str = "", decimals: int = 0, signed: bool = False
|
|
374
385
|
) -> None:
|
|
@@ -417,6 +428,9 @@ class Legend:
|
|
|
417
428
|
then.
|
|
418
429
|
"""
|
|
419
430
|
|
|
431
|
+
#: Written on one line by ``dump_template``: ``!legend {ncol: 2}``.
|
|
432
|
+
yaml_flow_style: ClassVar[bool] = True
|
|
433
|
+
|
|
420
434
|
def __init__(
|
|
421
435
|
self,
|
|
422
436
|
ncol: int | None = None,
|
|
@@ -14,6 +14,17 @@ from typing import Any
|
|
|
14
14
|
|
|
15
15
|
import pandas as pd
|
|
16
16
|
|
|
17
|
+
# The date texts live in :mod:`tesorotools.dates`; re-exported here for
|
|
18
|
+
# the modules that read them with the calendar grids.
|
|
19
|
+
from tesorotools.dates import MONTH_ABBREVIATIONS as MONTH_ABBREVIATIONS
|
|
20
|
+
from tesorotools.dates import MONTHS as MONTHS
|
|
21
|
+
from tesorotools.dates import data_frequency as data_frequency
|
|
22
|
+
from tesorotools.dates import date_label as date_label
|
|
23
|
+
from tesorotools.dates import dates_unit as dates_unit
|
|
24
|
+
from tesorotools.dates import day_label as day_label
|
|
25
|
+
from tesorotools.dates import month_label as month_label
|
|
26
|
+
from tesorotools.dates import quarter_label as quarter_label
|
|
27
|
+
|
|
17
28
|
#: Calendar steps, finest first. ``M`` counts months, ``Y`` years; the
|
|
18
29
|
#: month steps divide a year, so January is always on the grid.
|
|
19
30
|
DATE_STEPS: tuple[str, ...] = (
|
|
@@ -212,123 +223,6 @@ def date_layouts(
|
|
|
212
223
|
return layouts
|
|
213
224
|
|
|
214
225
|
|
|
215
|
-
#: Month names and abbreviations of the house dates. Spelled here and not
|
|
216
|
-
#: read from the locale (``%b``), which gives ``Dec`` on a server in
|
|
217
|
-
#: English and ``dic.`` on a Spanish desktop.
|
|
218
|
-
MONTHS: tuple[str, ...] = (
|
|
219
|
-
"enero",
|
|
220
|
-
"febrero",
|
|
221
|
-
"marzo",
|
|
222
|
-
"abril",
|
|
223
|
-
"mayo",
|
|
224
|
-
"junio",
|
|
225
|
-
"julio",
|
|
226
|
-
"agosto",
|
|
227
|
-
"septiembre",
|
|
228
|
-
"octubre",
|
|
229
|
-
"noviembre",
|
|
230
|
-
"diciembre",
|
|
231
|
-
)
|
|
232
|
-
MONTH_ABBREVIATIONS: tuple[str, ...] = (
|
|
233
|
-
"ene.",
|
|
234
|
-
"feb.",
|
|
235
|
-
"mar.",
|
|
236
|
-
"abr.",
|
|
237
|
-
"may.",
|
|
238
|
-
"jun.",
|
|
239
|
-
"jul.",
|
|
240
|
-
"ago.",
|
|
241
|
-
"sep.",
|
|
242
|
-
"oct.",
|
|
243
|
-
"nov.",
|
|
244
|
-
"dic.",
|
|
245
|
-
)
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
def month_label(when: Any, *, year: bool = False) -> str:
|
|
249
|
-
"""The month of *when* as the date axes print it: ``dic.``.
|
|
250
|
-
|
|
251
|
-
With *year*, ``dic. 2022``: the label of a month that stands alone
|
|
252
|
-
(the first date of an axis, a monthly bar).
|
|
253
|
-
"""
|
|
254
|
-
ts = pd.Timestamp(when)
|
|
255
|
-
month = MONTH_ABBREVIATIONS[ts.month - 1]
|
|
256
|
-
return f"{month} {ts.year}" if year else month
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
def quarter_label(when: Any, *, year: bool = False) -> str:
|
|
260
|
-
"""The quarter of *when* on a chart axis: ``2T``, ``2T 2025`` with *year*.
|
|
261
|
-
|
|
262
|
-
A chart axis has no room for the ``segundo trimestre de 2025`` of the
|
|
263
|
-
running text, so it prints the short form of the tables.
|
|
264
|
-
"""
|
|
265
|
-
ts = pd.Timestamp(when)
|
|
266
|
-
return f"{ts.quarter}T {ts.year}" if year else f"{ts.quarter}T"
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
def data_frequency(dates: Any) -> str:
|
|
270
|
-
"""How often *dates* come: ``"Y"``, ``"Q"``, ``"M"`` or ``"D"``.
|
|
271
|
-
|
|
272
|
-
Read from the shortest gap between two consecutive dates (a missing
|
|
273
|
-
period only widens the others), so a series with one bar per year
|
|
274
|
-
is annual whether it is dated on 1 January or on 31 December. Fewer
|
|
275
|
-
than two dates are daily: nothing says they are coarser.
|
|
276
|
-
"""
|
|
277
|
-
index = pd.DatetimeIndex(dates).unique().sort_values()
|
|
278
|
-
if len(index) < 2:
|
|
279
|
-
return "D"
|
|
280
|
-
gap = int((index[1:] - index[:-1]).days.min())
|
|
281
|
-
if gap >= 360:
|
|
282
|
-
return "Y"
|
|
283
|
-
if gap >= 88:
|
|
284
|
-
return "Q"
|
|
285
|
-
return "M" if gap >= 28 else "D"
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
def dates_unit(dates: Any) -> str:
|
|
289
|
-
"""The :func:`date_label` unit that names every one of *dates*.
|
|
290
|
-
|
|
291
|
-
``"Y"`` when they all close a year (31 December) or all open one
|
|
292
|
-
(1 January, one per year), ``"M"`` when they all close or open a
|
|
293
|
-
month, else ``"D"``: the dates of a bar chart read ``2025``, ``dic.
|
|
294
|
-
2025`` or ``31 de diciembre de 2025``, never ``2025-12-31 00:00:00``.
|
|
295
|
-
"""
|
|
296
|
-
index = pd.DatetimeIndex(dates)
|
|
297
|
-
year_ends = bool(((index.month == 12) & (index.day == 31)).all())
|
|
298
|
-
year_starts = bool(((index.month == 1) & (index.day == 1)).all())
|
|
299
|
-
if year_ends or (year_starts and len(index) > 1 and index.year.is_unique):
|
|
300
|
-
return "Y"
|
|
301
|
-
if bool((index.is_month_end | (index.day == 1)).all()):
|
|
302
|
-
return "M"
|
|
303
|
-
return "D"
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
def day_label(when: Any) -> str:
|
|
307
|
-
"""A day as the house writes it: ``29 de octubre de 2026``."""
|
|
308
|
-
ts = pd.Timestamp(when)
|
|
309
|
-
return f"{ts.day} de {MONTHS[ts.month - 1]} de {ts.year}"
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
def date_label(when: Any, unit: str = "D") -> str:
|
|
313
|
-
"""The one house text of a date, whatever the chart that prints it.
|
|
314
|
-
|
|
315
|
-
*unit* is what the date stands for: ``"Y"`` a year (``2025``),
|
|
316
|
-
``"Q"`` a quarter (``4T 2025``), ``"M"`` a month (``dic. 2022``)
|
|
317
|
-
and ``"D"`` a day (``29 de octubre de 2026``). Never the
|
|
318
|
-
``29/10/2026``, ``ene-21`` or ``2025-12-31 00:00:00`` of
|
|
319
|
-
``strftime`` and ``str``.
|
|
320
|
-
"""
|
|
321
|
-
if unit == "Y":
|
|
322
|
-
return str(pd.Timestamp(when).year)
|
|
323
|
-
if unit == "Q":
|
|
324
|
-
return quarter_label(when, year=True)
|
|
325
|
-
if unit == "M":
|
|
326
|
-
return month_label(when, year=True)
|
|
327
|
-
if unit == "D":
|
|
328
|
-
return day_label(when)
|
|
329
|
-
raise ValueError(f"date unit must be 'Y', 'Q', 'M' or 'D': {unit!r}")
|
|
330
|
-
|
|
331
|
-
|
|
332
226
|
def period_label(
|
|
333
227
|
period: pd.Timestamp, step: str, *, first: bool = False
|
|
334
228
|
) -> str:
|
|
@@ -196,6 +196,9 @@ class BarLinePlot(FigureLifecycle):
|
|
|
196
196
|
)
|
|
197
197
|
self.out_path = out_path
|
|
198
198
|
self.data = resolve_data(data, data_path)
|
|
199
|
+
#: Feather the data came from (None: built from in-memory data);
|
|
200
|
+
#: kept so the chart can be written back to YAML.
|
|
201
|
+
self.data_path = data_path
|
|
199
202
|
self.scale = scale
|
|
200
203
|
self.start_date = start_date
|
|
201
204
|
self.end_date = end_date
|
|
@@ -283,7 +286,7 @@ class BarLinePlot(FigureLifecycle):
|
|
|
283
286
|
cfg["data_path"] = Path(cfg["data_path"])
|
|
284
287
|
return cls(**cfg)
|
|
285
288
|
|
|
286
|
-
def
|
|
289
|
+
def prepare_data(self) -> pd.DataFrame:
|
|
287
290
|
"""Slice by date and scale -- the backend-neutral IR.
|
|
288
291
|
|
|
289
292
|
Returns the sliced, scaled frame carrying every bar and line
|
|
@@ -332,7 +335,7 @@ class BarLinePlot(FigureLifecycle):
|
|
|
332
335
|
month = strftime("%b").rstrip(".").replace("%", "%%")
|
|
333
336
|
return strftime(self.date_format.replace("%b", month)).lower()
|
|
334
337
|
|
|
335
|
-
def
|
|
338
|
+
def format_xticks(
|
|
336
339
|
self,
|
|
337
340
|
ax: Axes,
|
|
338
341
|
index: pd.Index,
|
|
@@ -385,7 +388,7 @@ class BarLinePlot(FigureLifecycle):
|
|
|
385
388
|
def build(self) -> tuple[Figure, Axes]:
|
|
386
389
|
"""Render the chart in memory; return ``(fig, ax)`` without saving."""
|
|
387
390
|
self._check_columns()
|
|
388
|
-
plot_data = self.
|
|
391
|
+
plot_data = self.prepare_data()
|
|
389
392
|
x = np.arange(len(plot_data))
|
|
390
393
|
# lines first, bars after them, in the house cycle; España keeps
|
|
391
394
|
# its own colour wherever it sits (series_colors)
|
|
@@ -473,7 +476,7 @@ class BarLinePlot(FigureLifecycle):
|
|
|
473
476
|
extend_to_ticks(axis)
|
|
474
477
|
# measured at the labels' real size, once the y-axes have taken
|
|
475
478
|
# their room
|
|
476
|
-
self.
|
|
479
|
+
self.format_xticks(ax, plot_data.index, x)
|
|
477
480
|
fit_x_rotation(fig, ax, self.x_rotation, compact=self.compact)
|
|
478
481
|
ylabel = self.ylabel or (
|
|
479
482
|
self._axis_title(secondary=False) if ax2 is not None else ""
|
|
@@ -506,7 +509,7 @@ class BarLinePlot(FigureLifecycle):
|
|
|
506
509
|
data, like a :class:`LinePlot`, and is never stretched down to 0.
|
|
507
510
|
Shared by :meth:`build` and :meth:`to_plotly`.
|
|
508
511
|
"""
|
|
509
|
-
data = self.
|
|
512
|
+
data = self.prepare_data()
|
|
510
513
|
|
|
511
514
|
def on(secondary: bool) -> bool:
|
|
512
515
|
cols = [
|
{tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/artists/barh_plot.py
RENAMED
|
@@ -620,7 +620,11 @@ class HorizontalBarChart(FigureLifecycle):
|
|
|
620
620
|
_check_label_position(value_label_position)
|
|
621
621
|
self.out_path = out_path
|
|
622
622
|
self.data = resolve_data(data, data_path)
|
|
623
|
+
#: Feather the data came from (None: built from in-memory data);
|
|
624
|
+
#: kept so the chart can be written back to YAML.
|
|
625
|
+
self.data_path = data_path
|
|
623
626
|
self.alias = _date_names(_collect_alias(blocks, series))
|
|
627
|
+
self.series = series
|
|
624
628
|
self.blocks = blocks
|
|
625
629
|
self.value_column = value_column
|
|
626
630
|
self.axis_column = axis_column
|
|
@@ -913,6 +917,9 @@ class GroupedBarChart(FigureLifecycle):
|
|
|
913
917
|
_check_label_position(value_label_position)
|
|
914
918
|
self.out_path = out_path
|
|
915
919
|
self.data = resolve_data(data, data_path)
|
|
920
|
+
#: Feather the data came from (None: built from in-memory data);
|
|
921
|
+
#: kept so the chart can be written back to YAML.
|
|
922
|
+
self.data_path = data_path
|
|
916
923
|
self.categories = _date_names(categories)
|
|
917
924
|
self.series = series
|
|
918
925
|
self.fmt = fmt or Format()
|
|
@@ -179,6 +179,9 @@ class BoxPlot(FigureLifecycle):
|
|
|
179
179
|
raise ValueError("weighted mode requires `weight_col`")
|
|
180
180
|
self.out_path = out_path
|
|
181
181
|
self.data = resolve_data(data, data_path)
|
|
182
|
+
#: Feather the data came from (None: built from in-memory data);
|
|
183
|
+
#: kept so the chart can be written back to YAML.
|
|
184
|
+
self.data_path = data_path
|
|
182
185
|
self.series = series
|
|
183
186
|
self.mode = mode
|
|
184
187
|
self.weight_col = weight_col
|
{tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/artists/intraday_plot.py
RENAMED
|
@@ -119,6 +119,9 @@ class IntradayPlot(FigureLifecycle):
|
|
|
119
119
|
raise ValueError(f"out_path must be .png: {out_path}")
|
|
120
120
|
self.out_path = out_path
|
|
121
121
|
self.data = resolve_data(data, data_path)
|
|
122
|
+
#: Feather the data came from (None: built from in-memory data);
|
|
123
|
+
#: kept so the chart can be written back to YAML.
|
|
124
|
+
self.data_path = data_path
|
|
122
125
|
self.label = label or "value"
|
|
123
126
|
self.fmt = fmt or Format(decimals=2)
|
|
124
127
|
self.legend = legend
|
{tesorotools_python-0.1.12 → tesorotools_python-0.1.14}/src/tesorotools/artists/line_plot.py
RENAMED
|
@@ -391,6 +391,9 @@ class LinePlot(FigureLifecycle):
|
|
|
391
391
|
)
|
|
392
392
|
self.out_path = out_path
|
|
393
393
|
self.data = resolve_data(data, data_path)
|
|
394
|
+
#: Feather the data came from (None: built from in-memory data);
|
|
395
|
+
#: kept so the chart can be written back to YAML.
|
|
396
|
+
self.data_path = data_path
|
|
394
397
|
self.series = series
|
|
395
398
|
|
|
396
399
|
self.scale = scale
|
|
@@ -147,6 +147,9 @@ class MatrixChart(FigureLifecycle):
|
|
|
147
147
|
raise ValueError("MatrixChart needs at least one row and column")
|
|
148
148
|
self.out_path = out_path
|
|
149
149
|
self.data = resolve_data(data, data_path)
|
|
150
|
+
#: Feather the data came from (None: built from in-memory data);
|
|
151
|
+
#: kept so the chart can be written back to YAML.
|
|
152
|
+
self.data_path = data_path
|
|
150
153
|
self.rows = rows
|
|
151
154
|
self.cols = cols
|
|
152
155
|
self.cell_labels = cell_labels or {}
|