Skip to content

Commit

Permalink
upgrade to dictum-core 0.1.6 (#51)
Browse files Browse the repository at this point in the history
add docs section about division
roveo authored Aug 10, 2022
1 parent bdc197e commit 7eafcc1
Showing 5 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion dictum/dictum/__init__.py
Original file line number Diff line number Diff line change
@@ -2,4 +2,4 @@

__all__ = ["Project"]

__version__ = "0.1.4"
__version__ = "0.1.5"
6 changes: 3 additions & 3 deletions dictum/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dictum/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "dictum"
version = "0.1.4"
version = "0.1.5"
description = "Describe business metrics with YAML, query and visualize in Jupyter with zero SQL"
authors = ["Mikhail Akimov <[email protected]>"]

2 changes: 1 addition & 1 deletion dictum/tests/test_dictum.py
Original file line number Diff line number Diff line change
@@ -2,4 +2,4 @@


def test_version():
assert __version__ == "0.1.4"
assert __version__ == "0.1.5"
10 changes: 8 additions & 2 deletions docs/docs/reference/expression_language.md
Original file line number Diff line number Diff line change
@@ -45,13 +45,19 @@ Dimension references are prepended by `:` — `:sale_date`, `:channel`.

## Operators



### Arithmetic

Standard arithmetic operators are supported: `+`, `-`, `*`, `/`, `%` (division remainder),
`//` (floor division, or integer division), `**` (exponentiation, or power).

!!! important
Division in Dictum works the same way as in Python 3: when you divide a value by an
integer, the denominator is converted into float, e.g. `1 / 2 == 0.5`.

Some database engines, like SQLite and Postgres have different semantics. For them,
division works like this: `1 / 2 == 0`. Dictum overrides database engine semantics
for consistency.

### Comparison

`>`, `<`, `>=`, `<=` are supported. Equals operator can be written as `=` or `==`. Not

0 comments on commit 7eafcc1

Please sign in to comment.