Skip to content

Commit 506f1b5

Browse files
chore: release v0.8.0 (#52)
Bumps version to 0.8.0. Footer meta line no longer hard-codes the version or refresh date — both hydrate from Timeprice.metadata at boot, so future releases skip the index.html edit. Screenshot regenerated.
1 parent bf9d113 commit 506f1b5

5 files changed

Lines changed: 50 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,50 @@ Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
55

66
## [Unreleased]
77

8+
## [0.8.0] - 2026-05-17
9+
10+
### Added
11+
- **Offline forecasting past the bundled data.** New `Timeprice::Forecast`
12+
module: `CpiForecaster.project` and `FxForecaster.project` use a
13+
trailing-window CAGR for the point estimate and ±1σ of year-over-year
14+
changes for the band. Pure-Ruby, deterministic, no network calls or
15+
stats dependencies. Defaults: 10-year window for CPI, 5-year for FX;
16+
horizon caps 5y CPI / 2y FX (caps raise `horizon_exceeds_cap`
17+
warnings, they don't block). `Forecast::Result` is a frozen value
18+
object with `value`, `low`, `high`, `projection_method`, `sigma_pct`,
19+
`last_known_date`, `target_date`, `horizon_months`, `basis_kind`,
20+
`warnings`. `Timeprice.forecast(...)` is the public dispatcher.
21+
- `Timeprice.compare` accepts `forecast: true`; when the target date
22+
is past the bundled CPI window the result carries a populated
23+
`forecast: { basis_kind:, projection_method:, window_years:,
24+
sigma_pct:, last_known_date:, horizon_months:, low:, high:,
25+
warnings: }` block and `granularity: :forecast`.
26+
- CLI: `timeprice compare --forecast` prints the range, basis, and
27+
caveats; `--json` exposes the same fields machine-readably.
28+
- `Timeprice::Compare.series_for(from:, to:, forecast:, amount:)` returns
29+
annual sample points for the chart strip; forecast points carry
30+
`:low` / `:high` for the ±1σ band.
31+
- `rake forecast:backtest` reports per-country MAPE for the bundled
32+
data with assertions, so accuracy regressions are caught in CI.
33+
34+
### Web calculator
35+
- Inline **📈 Forecast this date** affordance replaces the old form-level
36+
checkbox. It only appears when the entered target year is past the
37+
destination country's bundled CPI window. Clicking toggles
38+
`state.form.forecast` and re-computes; the toggle round-trips through
39+
the existing `&forecast=1` URL param.
40+
- New SVG strip beneath the result paints the measured polyline, the
41+
dashed forecast line, a striped ±1σ fan, and tick labels — answers
42+
"how did we get this number?" visually.
43+
- Amount input now carries locale thousands separators with a
44+
caret-preserving live formatter; `parseAmount` strips them before
45+
parsing.
46+
- From/To rows reflow to `label + currency (60%) + 'in' + date (40%)`
47+
on a single line, all three form rows ending at the same right edge.
48+
- Footer meta line ("refreshed …, gem v…") now hydrates from
49+
`Timeprice.metadata` at boot; the HTML carries placeholders only, so
50+
releases no longer hand-edit the index.
51+
852
### Changed
953
- `thor` is now a development dependency, not a runtime dependency. The
1054
CLI (`exe/timeprice`) still works exactly as before, but users who only

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ without hardcoding what the gem already knows.
142142
```ruby
143143
Timeprice.metadata
144144
# => {
145-
# version: "0.7.0",
145+
# version: "0.8.0",
146146
# generated_at: "2026-05-12",
147147
# countries: [
148148
# { code: "US", name: "United States", currency: "USD",

lib/timeprice/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module Timeprice
4-
VERSION = "0.7.0"
4+
VERSION = "0.8.0"
55
end

site/Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: ..
33
specs:
4-
timeprice (0.7.0)
4+
timeprice (0.8.0)
55

66
GEM
77
remote: https://rubygems.org/
@@ -47,7 +47,7 @@ CHECKSUMS
4747
ruby_wasm (2.9.4-x86_64-darwin) sha256=f9bf6860beb268c3375d91fd085be2f309a6bd80a21ae4768b2533fb042a589b
4848
ruby_wasm (2.9.4-x86_64-linux) sha256=0d5e19430745742c09f35167d58586ce68c7f124090c722b8e4f9c21b6adc943
4949
ruby_wasm (2.9.4-x86_64-linux-musl) sha256=05eba60cfb90b2e69068b4bc0b7a2ac74031c9387b4cd3d8094487b161bc31d7
50-
timeprice (0.7.0)
50+
timeprice (0.8.0)
5151

5252
BUNDLED WITH
5353
4.0.8

site/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,8 @@ <h2 class="sr-only">Money calculator</h2>
258258

259259
<p class="text-xs text-stone-500 text-center">
260260
Data: BLS · ONS · Eurostat · IMF · ECB · GSO ·
261-
refreshed <span class="mono" id="meta-refresh">2026-05-12</span> ·
262-
gem <span class="mono" id="meta-version">v0.7.0</span>
261+
refreshed <span class="mono" id="meta-refresh"></span> ·
262+
gem <span class="mono" id="meta-version"></span>
263263
</p>
264264

265265
<section class="rounded-xl border border-stone-200 dark:border-stone-800 p-4 sm:p-5">

0 commit comments

Comments
 (0)