News for hackers. Stuff that matters.
Re:Some Data Should Be Code by zahlman on Wednesday February 04, 2026 @04:12PM (#46891847)
> I wish I could, instead, write a make.py file with something like this:

I have had in mind a project which I hope could make this more ergonomic. I think the example could look more like so (and be made to work):

  from whatever import *

  @depends("inputs/checkbook_pro_export.csv")
  @makes(ledger_path="ledger/{year}_{month:02d}.toml") # n.b. not an f-string
  @parametrized_rule(year=range(2019, 2026), month=range(1, 13))
  def import_month():
      return import_from_checkbook(ledger_path, year, month)

There are no comments on this comment yet.