Skip to content

Conversation

@mlell
Copy link

@mlell mlell commented Nov 6, 2025

As someone new to beancount, I found the function documentation really hard to navigate. The old help functions dumped everything on screen at once, which was overwhelming. While developing a BQL query, I found myself looking for functions to transform certain argument types, however I just had an alphabetical function list. (Re-open of #262)

What I changed:

Progressive disclosure:

  • help functions now shows just a category overview (takes ~10 lines instead of 100+) and explains custom object types
  • help functions amount shows only amount-related functions, same for date, position, atomic,...

Better function docs:

  • Added argument explanations to some functions (the old docs assumed you knew what arguments meant)
  • Example: grep(pattern, string) now explains "pattern" is a regex and "string" is input text
  • Examples on some types, e.g. Position is something like 10 HOOL {100.30 USD}

Technical implementation:

  • Query functions are grouped according to their first argument's type by _describe_function().
  • In addition, the decorators @function, @register and @aggregator take a group= argument to refine (e.g. for account names, which are strings)

The main benefit is you can find functions now much easier without scrolling through pages of text. When I started with beancount, I had no idea what functions were available or how to use them - I hope this makes it easier.

@mlell mlell force-pushed the dev-function-help branch from ccf5ec7 to ea59e3a Compare November 6, 2025 08:54
@mlell mlell force-pushed the dev-function-help branch 3 times, most recently from b7beaf0 to 187d474 Compare November 6, 2025 13:48
@dnicolodi
Copy link
Collaborator

Thanks for looking into improving the help system. I only went very quickly through the changes, but I feel that most of what you add some come in the form of documentation rather than in form of verbose help commands. Quite a few functions are deprecated and should be hidden from the help completely (or by default, or at least clearly marked as deprecated).

@mlell
Copy link
Author

mlell commented Nov 14, 2025

I am not sure I understand your point, did you mean: "I feel that most of what you add should come in the form of documentation..."? I would be happy to help with the documentation, however, at least in the beancount docs the help commands were mentioned as the location for function documentation, so I have amended those commands. Can you point me to where to add such information?

@mlell
Copy link
Author

mlell commented Nov 29, 2025

@dnicolodi Hi, I was just wondering if there is anything I could do to move this forward. I find this tool very useful and would lovehto help improve it!

@mlell mlell force-pushed the dev-function-help branch from 2704a02 to 1ef3360 Compare December 1, 2025 10:20
@mlell mlell force-pushed the dev-function-help branch from 1ef3360 to d0766ec Compare December 1, 2025 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants