Making Commodity directives required?

65 views
Skip to first unread message

Martin Blais

unread,
Mar 25, 2016, 12:54:23 AM3/25/16
to Beancount
Zhuoyun Wei made a comment on a doc today that account names are required to be declared by default while commodities don't.
However, at this point they both have dedicated directives to declare them.
Commodity directives are so far only used to hang metadata off of them.
He suggests that Commodity directives should be required to be present by default.

I really like the idea:
- It would make the behavior similar as that of accounts
- It would be more pedantic by default
- Instead of a check_commodity plugin I could provide an auto_commodity plugin similar to auto_accounts, so you could use that in order to not bother.
- The stream of transactions would assured to always contain a Commodity directive if one appears, like for accounts.

I think I'm pretty sure I'm going to do this, it really feels like a cleanup of sorts.
Any thoughts / +1 / -1?

Zhuoyun Wei

unread,
Mar 25, 2016, 12:58:36 AM3/25/16
to bean...@googlegroups.com

On Fri, Mar 25, 2016 at 12:54 PM, Martin Blais <bl...@furius.ca> wrote:
- Instead of a check_commodity plugin I could provide an auto_commodity plugin similar to auto_accounts, so you could use that in order to not bother.

I like the idea of auto_commodity plugin. This way, users who like to be explicit and users who like to be causal could both be happy.


--
Zhuoyun Wei

Dominik Aumayr

unread,
Mar 25, 2016, 1:46:23 AM3/25/16
to bean...@googlegroups.com
I like the idea quite a lot! It was always kind of strange to explain to people, especially non-tech-people, that you explicitly have to open accounts, but commodities just are there when you use them. 

So I am all for it!
--
You received this message because you are subscribed to the Google Groups "Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beancount+...@googlegroups.com.
To post to this group, send email to bean...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/CAK21%2BhNrn-vTWwEr18dqf1UYfd1owUH6YeY%2BL4%2BSxbLmunbj%2Bg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Stefano Zacchiroli

unread,
Mar 25, 2016, 2:59:14 AM3/25/16
to bean...@googlegroups.com
On Fri, Mar 25, 2016 at 12:54:02AM -0400, Martin Blais wrote:
> He suggests that Commodity directives should be required to be present by
> default.
[...]
> Any thoughts / +1 / -1?

Strong +1. YAY for both increased uniformity and increased pedantry.

--
Stefano Zacchiroli . . . . . . . za...@upsilon.cc . . . . o . . . o . o
Maître de conférences . . . . . http://upsilon.cc/zack . . . o . . . o o
Former Debian Project Leader . . . . . @zacchiro . . . . o o o . . . o .
« the first rule of tautology club is the first rule of tautology club »

Daniël Bos

unread,
Mar 25, 2016, 3:01:30 AM3/25/16
to bean...@googlegroups.com

+1 from me as well. More consistency is always a plus.


--
You received this message because you are subscribed to the Google Groups "Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beancount+...@googlegroups.com.
To post to this group, send email to bean...@googlegroups.com.

Filippo Tampieri

unread,
Apr 11, 2016, 10:30:23 PM4/11/16
to Beancount
I am all for it. I already use the check_commodity plugin and I think it is a good idea that plugins would be able to rely on a commodity directive being there for commodities used in the file.
Reply all
Reply to author
Forward
0 new messages