Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
python-version: '3.11'
- uses: actions/checkout@v4
- run: python -m pip install .[docs]
- run: python -m sphinx -W -b html docs/ build/html/
- run: python docs/make_bql_doc.py
- uses: actions/upload-pages-artifact@v3
with:
path: build/html
Expand All @@ -26,6 +26,6 @@ jobs:
environment:
name: github-pages
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/mlell'
steps:
- uses: actions/deploy-pages@v4
15 changes: 15 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,18 @@ beanquery is a customizable and extensible lightweight SQL query tool
that works on tabular data, including `Beancount`__ ledger data.

__ https://beancount.github.io/

With this tool you can write *queries* to extract information from your
Beancount ledger. This is the documentation of functions and field names
which are available for queries.

Please read the Manual of the `Beancount Query Language (BQL)`__ if you
do not yet know how to write queries.


__ http://furius.ca/beancount/doc/query

After you have learned the BQL, you can use the
`list and documentation of available functions and columns`__

__ https://beancount.github.io/beanquery
14 changes: 14 additions & 0 deletions beanquery/query_compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,11 +406,25 @@ def __call__(self, context):


class EvalFunction(EvalNode):
"""Base class for function evaluation nodes.

Class Attributes:
__intypes__: List of input parameter types for type checking.
__outtype__: Output type of the function. None means no type
annotation. To annotate that the function returns None, use
types.NoneType.
"""
__slots__ = ('operands',)

# Type constraints on the input arguments.
__intypes__ = []

# Output type annotation
__outtype__ = None

# Input argument names for documentation.
__param_names__ = []

def __init__(self, context, operands, dtype):
super().__init__(dtype)
self.context = context
Expand Down
Loading