Thanks for considering a contribution. This is a small project; the bar is "does it ship correct, attributable, offline data and clean math?" — not process compliance.
bundle install
bundle exec rspec # default suite (fixture + real-data goldens)
TIMEPRICE_REAL_DATA=1 bundle exec rspec # also runs real-data smoke testsCI runs against Ruby 3.4 (gem supports >= 3.2). Both bundle exec rspec and bundle exec rubocop must be green.
- No runtime network calls. Ever. The whole point of this gem is that
require "timeprice"and the CLI work fully offline. Fetchers intools/data_pipeline/run in CI only and write JSON todata/ahead of time. - Data PRs are normal PRs. The monthly
chore(data): refresh ...PR auto-merges if CI + golden snapshots pass and drift checks find no rebase. Anything else gets a human review. - Attribution is required. Any new data source must come with its license
added to
DATA_LICENSES.md, an entry inNOTICE, an entry inlib/timeprice/sources.rb, and a clear attribution string. - Math regressions are the worst kind. If you touch
Inflation,Exchange, orCompare, the golden snapshot tests must still pass. Don't weaken them — add a new one for the case you care about.
Open an issue first using the new_source.md template. Include:
- The source URL and license terms.
- Frequency (monthly / annual), granularity, earliest date.
- Whether the data needs an API key, and how reliable the publisher is.
- The attribution string the publisher requires.
If the source is reasonable and the data fits the existing schema (see
PLAN.md §2a), the steps are:
- Add a fetcher under
tools/data_pipeline/. - Wire it into
tools/data_pipeline/runner.rb. - Add the bundled JSON file under
data/with a clean first pull. - Add a row to
DATA_LICENSES.md,NOTICE, andlib/timeprice/sources.rb. - Add a golden snapshot test or two against a hand-checked value.
(Maintainer-only.) Bump Timeprice::VERSION, move ## [Unreleased] to the
new version + today's date in CHANGELOG.md, commit, tag vX.Y.Z, push.
The release workflow handles the rest once it's wired up to RubyGems trusted
publishing.