fauxdata-cli 0.1.5__tar.gz → 0.1.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fauxdata_cli-0.1.5 → fauxdata_cli-0.1.6}/.claude/settings.local.json +2 -1
- {fauxdata_cli-0.1.5 → fauxdata_cli-0.1.6}/LOG.md +6 -0
- {fauxdata_cli-0.1.5 → fauxdata_cli-0.1.6}/PKG-INFO +1 -1
- {fauxdata_cli-0.1.5 → fauxdata_cli-0.1.6}/pyproject.toml +1 -1
- {fauxdata_cli-0.1.5 → fauxdata_cli-0.1.6}/src/fauxdata/__init__.py +1 -1
- {fauxdata_cli-0.1.5 → fauxdata_cli-0.1.6}/src/fauxdata/generator.py +10 -0
- {fauxdata_cli-0.1.5 → fauxdata_cli-0.1.6}/tests/test_generator.py +8 -0
- {fauxdata_cli-0.1.5 → fauxdata_cli-0.1.6}/uv.lock +1 -1
- {fauxdata_cli-0.1.5 → fauxdata_cli-0.1.6}/.gitignore +0 -0
- {fauxdata_cli-0.1.5 → fauxdata_cli-0.1.6}/.python-version +0 -0
- {fauxdata_cli-0.1.5 → fauxdata_cli-0.1.6}/LICENSE +0 -0
- {fauxdata_cli-0.1.5 → fauxdata_cli-0.1.6}/README.md +0 -0
- {fauxdata_cli-0.1.5 → fauxdata_cli-0.1.6}/docs/deployment.md +0 -0
- {fauxdata_cli-0.1.5 → fauxdata_cli-0.1.6}/docs/index.html +0 -0
- {fauxdata_cli-0.1.5 → fauxdata_cli-0.1.6}/docs/share.png +0 -0
- {fauxdata_cli-0.1.5 → fauxdata_cli-0.1.6}/schemas/events.yml +0 -0
- {fauxdata_cli-0.1.5 → fauxdata_cli-0.1.6}/schemas/orders.yml +0 -0
- {fauxdata_cli-0.1.5 → fauxdata_cli-0.1.6}/schemas/people.yml +0 -0
- {fauxdata_cli-0.1.5 → fauxdata_cli-0.1.6}/share.png +0 -0
- {fauxdata_cli-0.1.5 → fauxdata_cli-0.1.6}/src/fauxdata/commands/__init__.py +0 -0
- {fauxdata_cli-0.1.5 → fauxdata_cli-0.1.6}/src/fauxdata/commands/generate.py +0 -0
- {fauxdata_cli-0.1.5 → fauxdata_cli-0.1.6}/src/fauxdata/commands/infer.py +0 -0
- {fauxdata_cli-0.1.5 → fauxdata_cli-0.1.6}/src/fauxdata/commands/init.py +0 -0
- {fauxdata_cli-0.1.5 → fauxdata_cli-0.1.6}/src/fauxdata/commands/preview.py +0 -0
- {fauxdata_cli-0.1.5 → fauxdata_cli-0.1.6}/src/fauxdata/commands/validate.py +0 -0
- {fauxdata_cli-0.1.5 → fauxdata_cli-0.1.6}/src/fauxdata/main.py +0 -0
- {fauxdata_cli-0.1.5 → fauxdata_cli-0.1.6}/src/fauxdata/output.py +0 -0
- {fauxdata_cli-0.1.5 → fauxdata_cli-0.1.6}/src/fauxdata/schema.py +0 -0
- {fauxdata_cli-0.1.5 → fauxdata_cli-0.1.6}/src/fauxdata/validator.py +0 -0
- {fauxdata_cli-0.1.5 → fauxdata_cli-0.1.6}/tasks/todo.md +0 -0
- {fauxdata_cli-0.1.5 → fauxdata_cli-0.1.6}/tests/__init__.py +0 -0
- {fauxdata_cli-0.1.5 → fauxdata_cli-0.1.6}/tests/conftest.py +0 -0
- {fauxdata_cli-0.1.5 → fauxdata_cli-0.1.6}/tests/test_cli.py +0 -0
- {fauxdata_cli-0.1.5 → fauxdata_cli-0.1.6}/tests/test_infer.py +0 -0
- {fauxdata_cli-0.1.5 → fauxdata_cli-0.1.6}/tests/test_new_fields.py +0 -0
- {fauxdata_cli-0.1.5 → fauxdata_cli-0.1.6}/tests/test_output.py +0 -0
- {fauxdata_cli-0.1.5 → fauxdata_cli-0.1.6}/tests/test_schema.py +0 -0
- {fauxdata_cli-0.1.5 → fauxdata_cli-0.1.6}/tests/test_validator.py +0 -0
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Log
|
|
2
2
|
|
|
3
|
+
## 2026-07-04 — fix issue #2: `precision` float ignorato
|
|
4
|
+
|
|
5
|
+
- Bug: l'opzione `precision` dei float veniva letta nello schema ma mai applicata (`pb.float_field` non ha il parametro). Valori generati con precisione piena.
|
|
6
|
+
- Fix in `generator.py`: dopo `pb.generate_dataset`, arrotondo con `pl.col(...).round(precision)` le colonne `float` con `precision` impostato.
|
|
7
|
+
- Verifica: reproducer della issue → output atteso (`27.74, 169.64, …`). Test `test_generate_float_precision`. 103/103 pass.
|
|
8
|
+
|
|
3
9
|
## 2026-06-12 — pointblank 0.25 + comando `infer`
|
|
4
10
|
|
|
5
11
|
- Bump `pointblank>=0.25` (uscito su PyPI). Schemi inclusi (people/orders/events) verificati: tutti PASS.
|
|
@@ -27,6 +27,16 @@ def generate_dataset(schema: SchemaConfig, rows: int | None = None, seed: int |
|
|
|
27
27
|
f"Reduce --rows, widen min/max, or drop 'unique'."
|
|
28
28
|
) from e
|
|
29
29
|
raise
|
|
30
|
+
|
|
31
|
+
# pointblank has no float precision option: round after generation
|
|
32
|
+
round_exprs = [
|
|
33
|
+
pl.col(col.name).round(col.precision)
|
|
34
|
+
for col in schema.columns
|
|
35
|
+
if col.col_type == "float" and col.precision is not None
|
|
36
|
+
]
|
|
37
|
+
if round_exprs:
|
|
38
|
+
df = df.with_columns(round_exprs)
|
|
39
|
+
|
|
30
40
|
return df
|
|
31
41
|
|
|
32
42
|
|
|
@@ -87,6 +87,14 @@ def test_generate_seed_reproducibility(minimal_schema):
|
|
|
87
87
|
assert df1.equals(df2)
|
|
88
88
|
|
|
89
89
|
|
|
90
|
+
def test_generate_float_precision():
|
|
91
|
+
"""float `precision` rounds generated values to the requested decimals."""
|
|
92
|
+
schema = _make_schema([ColumnSchema(name="f", col_type="float", min=1.0, max=200.0, precision=2)])
|
|
93
|
+
df = generate_dataset(schema, rows=20, seed=1)
|
|
94
|
+
for v in df["f"].to_list():
|
|
95
|
+
assert v == round(v, 2)
|
|
96
|
+
|
|
97
|
+
|
|
90
98
|
def test_generate_all_types():
|
|
91
99
|
"""Generate a dataset with all supported column types."""
|
|
92
100
|
schema = _make_schema([
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|