Skip to content

Commit 6d3482c

Browse files
authored
Add and expose time converters targeting stocks (#56)
### What problem do you want to solve? This PR - renames time converters for flow variables (e.g. earnings **per** month) from `x_to_y` to `per_x_to_per_y` with x, y being our usual time abbreviations. - adds time converters for stock variables (e.g. number of unemployment periods on the monthly **level**) named `x_to_y` - exposes the stock time converters to make them importable via `ttsim.interface_dag_elements`.
1 parent 755304b commit 6d3482c

File tree

8 files changed

+1137
-609
lines changed

8 files changed

+1137
-609
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ releases are available on [Anaconda.org](https://anaconda.org/conda-forge/ttsim)
66

77
## v1.1.1 — unpublished
88

9+
- {gh}`56` Add and expose time converters targeting stocks.
910
- {gh}`53` Raise error if scalar is passed to ColumnFunction expecting array input.
1011
({ghuser}`MImmesberger`)
1112
- {gh}`52` Fix fail_if checks: input data tree was too greedy and environment had an

src/ttsim/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
version = "unknown"
1212
version_tuple = ("unknown", "unknown", "unknown")
1313

14-
from ttsim import plot
14+
from ttsim import plot, unit_converters
1515
from ttsim.entry_point import main
1616
from ttsim.interface_dag_elements.shared import (
1717
copy_environment,
@@ -45,6 +45,7 @@
4545
SpecializedEnvironmentForPlottingAndTemplates
4646
)
4747
TTTargets = TTTargets
48+
unit_converters = unit_converters
4849

4950
__all__ = [
5051
"InputData",
@@ -62,6 +63,7 @@
6263
"main",
6364
"merge_trees",
6465
"plot",
66+
"unit_converters",
6567
"upsert_tree",
6668
"version",
6769
"version_tuple",

0 commit comments

Comments
 (0)