map-conform 0.2.0__tar.gz → 0.3.0__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.
- {map_conform-0.2.0 → map_conform-0.3.0}/.github/workflows/test.yml +5 -5
- {map_conform-0.2.0 → map_conform-0.3.0}/CHANGELOG.md +37 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/PKG-INFO +5 -3
- {map_conform-0.2.0 → map_conform-0.3.0}/README.md +4 -2
- {map_conform-0.2.0 → map_conform-0.3.0}/_typos.toml +5 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/docs/cookbook.md +3 -1
- {map_conform-0.2.0 → map_conform-0.3.0}/docs/detailed-design.md +22 -3
- {map_conform-0.2.0 → map_conform-0.3.0}/docs/exec-overview.md +4 -2
- {map_conform-0.2.0 → map_conform-0.3.0}/docs/plan-wbs.md +6 -3
- {map_conform-0.2.0 → map_conform-0.3.0}/docs/spec-reference.md +5 -5
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/expr/functions.py +66 -18
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/map-conform-spec.schema.json +2 -2
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/plan/compile.py +18 -2
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/spec/model.py +9 -2
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/transforms/casts.py +66 -24
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/transforms/nested.py +9 -5
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/transforms/numeric.py +45 -5
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/transforms/vector.py +3 -2
- map_conform-0.3.0/tests/e2e/lake_rows.py +28 -0
- map_conform-0.3.0/tests/e2e/test_target_ducklake.py +202 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/expr/test_functions.py +84 -3
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/fixtures/corpus/boolean.csv +12 -2
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/fixtures/corpus/numeric.csv +17 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/parity/test_parity.py +76 -1
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/plan/test_compile.py +27 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/test_rejects_metrics.py +12 -6
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/transforms/test_builtins.py +60 -1
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/transforms/test_numeric.py +10 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/uv.lock +4 -4
- {map_conform-0.2.0 → map_conform-0.3.0}/wiki/concepts/clean-landing-contract.md +39 -8
- {map_conform-0.2.0 → map_conform-0.3.0}/wiki/index.md +2 -1
- {map_conform-0.2.0 → map_conform-0.3.0}/wiki/log.md +11 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/wiki/plans/roadmap.md +3 -3
- map_conform-0.3.0/wiki/qa/target-ducklake-clean-landing.md +161 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/wiki/qa/test-strategy.md +2 -2
- {map_conform-0.2.0 → map_conform-0.3.0}/wiki/runbooks/release.md +1 -1
- {map_conform-0.2.0 → map_conform-0.3.0}/.gitattributes +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/.github/ISSUE_TEMPLATE/bug.yml +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/.github/ISSUE_TEMPLATE/feature.yml +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/.github/agile.json +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/.github/dependabot.yml +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/.github/pull_request_template.md +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/.github/workflows/build.yml +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/.github/workflows/run-zizmor.yml +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/.gitignore +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/.mdformat.toml +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/.pre-commit-config.yaml +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/CLAUDE.md +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/CONTRIBUTING.md +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/LICENSE +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/SECURITY.md +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/bin/create-agile-issues.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/bin/render-hub-definition.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/bin/wiki-lint-frontmatter.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/conform.yml +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/creating-a-better-mapper-guidance.md +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/docs/architecture-hld.md +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/examples/README.md +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/examples/check_lake.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/examples/conform.yml +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/examples/data/orders.csv +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/examples/meltano.yml +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/examples/plugins/extractors/tap-csv--meltanolabs.lock +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/__init__.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/__main__.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/batch/__init__.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/batch/arrow.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/batch/columnar.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/batch/engine.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/batch/files.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/cli.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/doctor.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/errors.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/expr/__init__.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/expr/compiler.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/expr/sandbox.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/expr/sdk.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/mapper.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/metadata.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/metrics.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/naming/__init__.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/naming/ascii-table.json +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/naming/conform.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/naming/flatten.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/naming/nested.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/naming/reserved/ansi.txt +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/naming/reserved/duckdb.txt +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/naming/reserved/postgres.txt +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/naming/reserved/snowflake.txt +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/naming/reserved.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/naming/shape.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/naming/streams.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/naming/translit.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/plan/__init__.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/plan/chain.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/plan/lower.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/plan/ops.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/plan/row.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/plan/validate.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/plan/vector.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/rejects.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/settings.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/spec/__init__.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/spec/_struct.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/spec/bridge.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/spec/check.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/spec/errors.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/spec/importer.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/spec/jsonschema.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/spec/load.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/spec/reference.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/spec/steps.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/spec/stream_maps.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/spec/zamboni.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/transforms/__init__.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/transforms/builtins.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/transforms/fake.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/transforms/polars_vector.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/transforms/privacy.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/transforms/registry.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/transforms/temporal.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/transforms/text.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/types/__init__.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/types/canonical.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/types/from_jsonschema.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/types/jsontext.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/types/to_arrow.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/types/to_jsonschema.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/types/wire.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/map_conform/udfs.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/meltano.yml +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/plugin-definition.yml +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/pyproject.toml +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/__init__.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/batch/__init__.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/batch/test_batch.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/batch/test_shape_batch.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/bench/__init__.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/bench/baseline.json +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/bench/test_bench.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/bench/workload.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/compat/__init__.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/compat/compare.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/compat/harness.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/compat/sdk_cases.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/compat/test_import.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/compat/test_sdk_parity.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/compat/test_source_streams.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/compat/test_translate.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/e2e/__init__.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/e2e/test_target_jsonl.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/expr/__init__.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/expr/test_compiler.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/expr/test_sandbox.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/expr/test_sdk_corpus.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/fixtures/README.md +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/fixtures/__init__.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/fixtures/batch/inventory_xlsx-0001.parquet +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/fixtures/batch/orders_export-0001.jsonl.gz +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/fixtures/batch/orders_export-0001.parquet +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/fixtures/batch/orders_export-0002.parquet +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/fixtures/catalogs/inventory_xlsx.catalog.json +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/fixtures/catalogs/orders_export.catalog.json +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/fixtures/catalogs/typed.catalog.json +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/fixtures/catalogs/typed.expected.json +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/fixtures/corpus/names.csv +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/fixtures/corpus/temporal.csv +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/fixtures/corpus/text.csv +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/fixtures/corpus/uuid.csv +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/fixtures/generate.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/fixtures/paths.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/fixtures/sources/orders_export.csv +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/fixtures/streams/inventory_xlsx.batch-parquet.singer.jsonl +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/fixtures/streams/inventory_xlsx.singer.jsonl +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/fixtures/streams/orders_export.batch-jsonl.singer.jsonl +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/fixtures/streams/orders_export.batch-parquet.singer.jsonl +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/fixtures/streams/orders_export.singer.jsonl +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/fixtures/udfs/project/project_udfs.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/fixtures/udfs/site/sample_udfs/__init__.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/fixtures/udfs/site/sample_udfs-0.1.dist-info/METADATA +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/fixtures/udfs/site/sample_udfs-0.1.dist-info/entry_points.txt +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/naming/__init__.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/naming/test_conform.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/naming/test_flatten.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/naming/test_length_collisions.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/naming/test_nested.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/naming/test_reserved.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/naming/test_sdk_preset.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/naming/test_shape.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/naming/test_streams.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/naming/test_translit.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/parity/__init__.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/parity/harness.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/parity/test_case_parity.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/parity/test_polars_parity.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/plan/__init__.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/plan/test_chain.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/plan/test_column_flatten.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/plan/test_expressions.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/plan/test_row.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/spec/__init__.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/spec/test_check.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/spec/test_jsonschema.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/spec/test_load.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/spec/test_model.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/spec/test_reference.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/test_bridge.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/test_cli.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/test_contract.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/test_cookbook.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/test_doctor.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/test_errors.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/test_fixtures.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/test_hub_definition.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/test_mapper.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/test_metadata.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/test_settings.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/test_udfs.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/test_undeclared.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/transforms/__init__.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/transforms/corpus.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/transforms/test_corpus_casts.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/transforms/test_fake.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/transforms/test_masking.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/transforms/test_temporal.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/transforms/test_vector_claims.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/types/__init__.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/types/snapshots/to_jsonschema.json +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/types/test_canonical.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/types/test_type_mappings.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/wiki/__init__.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/wiki/pages.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/tests/wiki/test_claims.py +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/wiki/architecture/overview.md +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/wiki/ci-cd/pipeline.md +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/wiki/components/cli-and-tools.md +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/wiki/components/execution-engines.md +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/wiki/components/metadata-and-errors.md +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/wiki/components/name-conformer.md +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/wiki/components/spec-loader.md +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/wiki/components/type-system-and-builtins.md +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/wiki/concepts/existing-systems-survey.md +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/wiki/decisions/0001-name-and-licence.md +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/wiki/decisions/0002-transform-authoring.md +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/wiki/decisions/0003-own-spec-with-zamboni-bridge.md +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/wiki/decisions/0004-batch-engine.md +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/wiki/decisions/0005-sdc-metadata.md +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/wiki/decisions/0006-error-policy.md +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/wiki/decisions/0007-wire-encoding.md +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/wiki/decisions/0008-naming-defaults.md +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/wiki/decisions/0009-undeclared-columns.md +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/wiki/decisions/0010-stream-map-superset.md +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/wiki/decisions/0011-uuid-in-batch.md +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/wiki/decisions/0012-bundled-transliteration-table.md +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/wiki/glossary.md +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/wiki/qa/benchmarks.md +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/wiki/runbooks/dev-environment.md +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/wiki/runbooks/wiki-maintenance.md +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/wiki/schemas/conform-spec.md +0 -0
- {map_conform-0.2.0 → map_conform-0.3.0}/wiki/schemas/plugin-settings.md +0 -0
|
@@ -38,7 +38,7 @@ jobs:
|
|
|
38
38
|
with:
|
|
39
39
|
persist-credentials: false
|
|
40
40
|
- name: Setup uv
|
|
41
|
-
uses: astral-sh/setup-uv@
|
|
41
|
+
uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0
|
|
42
42
|
- name: ruff check
|
|
43
43
|
run: uv run --locked --only-group lint ruff check --output-format=github .
|
|
44
44
|
- name: ruff format
|
|
@@ -54,7 +54,7 @@ jobs:
|
|
|
54
54
|
with:
|
|
55
55
|
persist-credentials: false
|
|
56
56
|
- name: Setup uv
|
|
57
|
-
uses: astral-sh/setup-uv@
|
|
57
|
+
uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0
|
|
58
58
|
- name: mypy and ty
|
|
59
59
|
run: uvx --managed-python --with=tox-uv tox -e typing
|
|
60
60
|
|
|
@@ -72,7 +72,7 @@ jobs:
|
|
|
72
72
|
fetch-depth: 0 # hatch-vcs derives the version from tags
|
|
73
73
|
persist-credentials: false
|
|
74
74
|
- name: Setup uv
|
|
75
|
-
uses: astral-sh/setup-uv@
|
|
75
|
+
uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0
|
|
76
76
|
with:
|
|
77
77
|
python-version: ${{ matrix.python-version }}
|
|
78
78
|
- name: Run tox
|
|
@@ -90,7 +90,7 @@ jobs:
|
|
|
90
90
|
fetch-depth: 0 # hatch-vcs derives the version from tags
|
|
91
91
|
persist-credentials: false
|
|
92
92
|
- name: Setup uv
|
|
93
|
-
uses: astral-sh/setup-uv@
|
|
93
|
+
uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0
|
|
94
94
|
with:
|
|
95
95
|
python-version: "3.14"
|
|
96
96
|
- name: Throughput and regression gate
|
|
@@ -110,7 +110,7 @@ jobs:
|
|
|
110
110
|
fetch-depth: 0 # hatch-vcs derives the version from tags
|
|
111
111
|
persist-credentials: false
|
|
112
112
|
- name: Setup uv
|
|
113
|
-
uses: astral-sh/setup-uv@
|
|
113
|
+
uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0
|
|
114
114
|
with:
|
|
115
115
|
python-version: "3.12"
|
|
116
116
|
- name: meltano install
|
|
@@ -5,6 +5,43 @@ All notable changes to map-conform are recorded here. The format follows
|
|
|
5
5
|
[Semantic Versioning](https://semver.org/). Before 1.0, a minor version may change behaviour;
|
|
6
6
|
each such change is listed.
|
|
7
7
|
|
|
8
|
+
## [0.3.0] - 2026-11-30
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- The Clean-Landing Contract has a copy-ready reviewer snippet for target repos, in two
|
|
13
|
+
variants: for a target always behind map-conform, and for one that keeps its own cleanup
|
|
14
|
+
options for other pipelines. The README links it.
|
|
15
|
+
- The `int16`/`int32`/`int64` casts also read PostgreSQL integer literals: `0x`, `0o` and
|
|
16
|
+
`0b` prefixes in any case (`0x1F`, `-0b101`, `0x_1F`) and single underscores between
|
|
17
|
+
digits (`1_000`). The rest of the numeric grammar is unchanged.
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- **Breaking:** `to_int()` reads text as PostgreSQL reads a `bigint`: optional whitespace and
|
|
22
|
+
sign, then decimal digits or a `0x`/`0o`/`0b` literal, with single underscores between
|
|
23
|
+
digits. It no longer accepts `"7.0"` or `"1e3"`; use `round()`, `floor()` or `ceil()` for
|
|
24
|
+
those. As a `bigint`, it refuses a value outside the 64-bit range (-2**63 to 2**63 - 1),
|
|
25
|
+
from text or a number; use `to_decimal()` for wider integers. `to_int(True)` is 1 and `to_int(False)` is 0 (they were errors), so
|
|
26
|
+
`to_int(to_bool(x))` lands 1 or 0 in a target with no boolean type. A non-finite float
|
|
27
|
+
is now a step error rather than a crash.
|
|
28
|
+
- Booleans follow one rule in `to_bool()` and the `boolean` cast (row and columnar): the
|
|
29
|
+
words, in any case, and then a number or numeric text as a counter: 0 or less is false,
|
|
30
|
+
more than 0 true. So `2`, `"2"` and `"1.0"` are true and `-1`, `"-0.5"` and `"0.0"` false,
|
|
31
|
+
where only 0 and 1 were accepted before. NaN is still an error.
|
|
32
|
+
- **Breaking:** a key property's column is never nullable, however it is declared or the
|
|
33
|
+
tap types it: the output SCHEMA and Arrow schema mark it non-null, and a null or missing
|
|
34
|
+
key fails the run, as a null in any `nullable: false` column does. Before, a key column
|
|
35
|
+
declared without `nullable: false`, or typed nullable by the tap, let a null key through,
|
|
36
|
+
which a merge can't match and a primary key refuses. `set_null` on a key column is a spec
|
|
37
|
+
error.
|
|
38
|
+
|
|
39
|
+
### Fixed
|
|
40
|
+
|
|
41
|
+
- A boolean member of a `struct` or `list` read only `true` and `false`. It now reads the
|
|
42
|
+
spec's `boolean` words (`yes`, `on`, `t`, ... in any case, surrounding ASCII whitespace
|
|
43
|
+
ignored) and then numbers as counters, as a boolean column does.
|
|
44
|
+
|
|
8
45
|
## [0.2.0] - 2026-11-23
|
|
9
46
|
|
|
10
47
|
### Added
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: map-conform
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: A Singer inline mapper that conforms names, types, values and metadata so data lands clean.
|
|
5
5
|
Project-URL: Homepage, https://github.com/paulcaron16k/map-conform
|
|
6
6
|
Project-URL: Documentation, https://github.com/paulcaron16k/map-conform/tree/main/docs
|
|
@@ -63,7 +63,9 @@ any target and, once, upstream:
|
|
|
63
63
|
|
|
64
64
|
Targets can then rely on the [Clean-Landing Contract](https://github.com/paulcaron16k/map-conform/blob/main/wiki/concepts/clean-landing-contract.md):
|
|
65
65
|
what every record, SCHEMA and BATCH file from map-conform guarantees, so a target writes data
|
|
66
|
-
instead of cleaning it.
|
|
66
|
+
instead of cleaning it. Target maintainers can paste its
|
|
67
|
+
[reviewer snippet](https://github.com/paulcaron16k/map-conform/blob/main/wiki/concepts/clean-landing-contract.md#7-reviewer-instruction-for-target-repos)
|
|
68
|
+
into their review rules, so reviewers stop asking for cleanup the mapper already did.
|
|
67
69
|
|
|
68
70
|
## Why
|
|
69
71
|
|
|
@@ -158,7 +160,7 @@ and value: nothing lands wrong silently. Check a spec before running it with
|
|
|
158
160
|
- [Spec reference](https://github.com/paulcaron16k/map-conform/blob/main/docs/spec-reference.md):
|
|
159
161
|
every setting, spec key, `parse` option, step and function, generated from the code.
|
|
160
162
|
- [Detailed design](https://github.com/paulcaron16k/map-conform/blob/main/docs/detailed-design.md): how each feature behaves, and why.
|
|
161
|
-
- [Clean-Landing Contract](https://github.com/paulcaron16k/map-conform/blob/main/wiki/concepts/clean-landing-contract.md): what a target may assume.
|
|
163
|
+
- [Clean-Landing Contract](https://github.com/paulcaron16k/map-conform/blob/main/wiki/concepts/clean-landing-contract.md): what a target may assume, and a reviewer snippet for target repos.
|
|
162
164
|
- The project's knowledge base is in [wiki/](https://github.com/paulcaron16k/map-conform/blob/main/wiki/index.md).
|
|
163
165
|
|
|
164
166
|
## Command line
|
|
@@ -29,7 +29,9 @@ any target and, once, upstream:
|
|
|
29
29
|
|
|
30
30
|
Targets can then rely on the [Clean-Landing Contract](https://github.com/paulcaron16k/map-conform/blob/main/wiki/concepts/clean-landing-contract.md):
|
|
31
31
|
what every record, SCHEMA and BATCH file from map-conform guarantees, so a target writes data
|
|
32
|
-
instead of cleaning it.
|
|
32
|
+
instead of cleaning it. Target maintainers can paste its
|
|
33
|
+
[reviewer snippet](https://github.com/paulcaron16k/map-conform/blob/main/wiki/concepts/clean-landing-contract.md#7-reviewer-instruction-for-target-repos)
|
|
34
|
+
into their review rules, so reviewers stop asking for cleanup the mapper already did.
|
|
33
35
|
|
|
34
36
|
## Why
|
|
35
37
|
|
|
@@ -124,7 +126,7 @@ and value: nothing lands wrong silently. Check a spec before running it with
|
|
|
124
126
|
- [Spec reference](https://github.com/paulcaron16k/map-conform/blob/main/docs/spec-reference.md):
|
|
125
127
|
every setting, spec key, `parse` option, step and function, generated from the code.
|
|
126
128
|
- [Detailed design](https://github.com/paulcaron16k/map-conform/blob/main/docs/detailed-design.md): how each feature behaves, and why.
|
|
127
|
-
- [Clean-Landing Contract](https://github.com/paulcaron16k/map-conform/blob/main/wiki/concepts/clean-landing-contract.md): what a target may assume.
|
|
129
|
+
- [Clean-Landing Contract](https://github.com/paulcaron16k/map-conform/blob/main/wiki/concepts/clean-landing-contract.md): what a target may assume, and a reviewer snippet for target repos.
|
|
128
130
|
- The project's knowledge base is in [wiki/](https://github.com/paulcaron16k/map-conform/blob/main/wiki/index.md).
|
|
129
131
|
|
|
130
132
|
## Command line
|
|
@@ -6,3 +6,8 @@ SCHEMAs = "SCHEMAs"
|
|
|
6
6
|
[default.extend-words]
|
|
7
7
|
# "Café%" under naming: sdk loses the é and the %, as the SDK's conform_name does.
|
|
8
8
|
caf = "caf"
|
|
9
|
+
|
|
10
|
+
[default]
|
|
11
|
+
# Git commit hashes, e.g. `ba226b0` (with a digit, so words of a-f are still checked):
|
|
12
|
+
# typos splits them into words such as "ba".
|
|
13
|
+
extend-ignore-re = ["\\b[a-f]*[0-9][0-9a-f]{4,}\\b"]
|
|
@@ -88,7 +88,9 @@ streams:
|
|
|
88
88
|
|
|
89
89
|
`locale` sets the separators: `eu` reads `1.234,56`, `ch` reads `1'234.56`. Dates follow the
|
|
90
90
|
`strptime` patterns you list, tried in order. Boolean words are stream defaults (a column can
|
|
91
|
-
set its own `true_values` and `false_values`); they are compared without case.
|
|
91
|
+
set its own `true_values` and `false_values`); they are compared without case. A number, or
|
|
92
|
+
text that is one, is read as a counter whatever the words: 0 or less is false, more than 0
|
|
93
|
+
true. For a target with no boolean type, `expr: to_int(to_bool(value))` lands 1 or 0.
|
|
92
94
|
|
|
93
95
|
```yaml cookbook:spec
|
|
94
96
|
version: 1
|
|
@@ -527,7 +527,7 @@ apart from the builtins, in `transforms/vector.py` (Arrow) and `transforms/polar
|
|
|
527
527
|
|
|
528
528
|
| Builtin | Kwargs / grammar | Vec |
|
|
529
529
|
| -- | -- | -- |
|
|
530
|
-
| `cast: int*` / `cast: float*` / `cast: decimal` | The default grammar accepts: surrounding whitespace; a sign; one currency symbol or ISO-4217 code before or after; thousands separators in valid groups (`thousands=","`, `decimal_point="."`, locale presets `us`, `eu`, `ch`); an exponent; `(x)` as negative when `parens_negative`; a trailing `-` when `trailing_minus`; `%` when `percent: divide`. | arrow, for plain numbers under the default grammar (a regex check, then a pyarrow cast); other rows, and every row under another `locale`, `thousands` or `decimal_point`, go row-wise |
|
|
530
|
+
| `cast: int*` / `cast: float*` / `cast: decimal` | The default grammar accepts: surrounding whitespace; a sign; one currency symbol or ISO-4217 code before or after; thousands separators in valid groups (`thousands=","`, `decimal_point="."`, locale presets `us`, `eu`, `ch`); an exponent; `(x)` as negative when `parens_negative`; a trailing `-` when `trailing_minus`; `%` when `percent: divide`. An `int*` cast also reads PostgreSQL integer literals: a `0x`, `0o` or `0b` prefix in any case (`0x1F`, `-0b101`, `0x_1F`) and single underscores between digits (`1_000`). | arrow, for plain numbers under the default grammar (a regex check, then a pyarrow cast); other rows, and every row under another `locale`, `thousands` or `decimal_point`, go row-wise |
|
|
531
531
|
| `rounding` (on cast) | `half_up` (default; halves round away from zero, `-12.5` → `-13`), `half_even`, `down`, `error`. Also controls int-from-fraction: `error` default. `"12.0"` → 12 is always allowed. | arrow for `half_up` on decimals; other modes row |
|
|
532
532
|
| `round` | `ndigits` | row |
|
|
533
533
|
| `clamp` | `min`, `max`, `on_out_of_range` | row |
|
|
@@ -588,7 +588,7 @@ Details pinned by the implementation (`map_conform/transforms/temporal.py`):
|
|
|
588
588
|
|
|
589
589
|
| Builtin | Kwargs | Vec |
|
|
590
590
|
| -- | -- | -- |
|
|
591
|
-
| `cast: boolean` | `true_values`, `false_values`, `case_sensitive=false
|
|
591
|
+
| `cast: boolean` | `true_values`, `false_values`, `case_sensitive=false`, compared after the trim. Then a number, or text that is a decimal number (`2`, `-1`, `0.5`, `1e3`), is a counter cast to a boolean: 0 or less is false, more than 0 true. NaN, infinity as text, other text and containers are errors. A boolean struct member or list item follows the same rule with the spec's `boolean` words, ASCII whitespace stripped. | arrow (ASCII tokens); numbers row |
|
|
592
592
|
| `cast: json` | `parse_strings` (decode text that is already JSON instead of double-encoding), `sort_keys`; non-ASCII kept as is, decimals kept exact | row |
|
|
593
593
|
| `cast: binary` | `encoding: base64 \| hex \| utf8`, strict | row |
|
|
594
594
|
| `cast: uuid` | `version=None`; accepts braces, no dashes, uppercase; normalises to canonical lowercase | row |
|
|
@@ -691,6 +691,23 @@ dialect accepts, so existing stream-map expressions run unchanged.
|
|
|
691
691
|
| UDFs | every registered UDF |
|
|
692
692
|
| builtins | every builtin transform, also callable as a function: `money(value)`, `cast(value, "decimal(18,2)")` |
|
|
693
693
|
|
|
694
|
+
**Coercion rules.**
|
|
695
|
+
|
|
696
|
+
- `to_int(v)` reads text as PostgreSQL 16 reads a `bigint`: ASCII whitespace around, an
|
|
697
|
+
optional sign, then decimal digits, or a `0x`/`0o`/`0b` prefix (any case, optionally
|
|
698
|
+
followed by one `_`) and its digits; single underscores between digits; leading zeros
|
|
699
|
+
are fine. `"7"`, `" -7 "`, `"0x1F"`, `"0b_101"`, `"1_000"` are integers; `"7.0"`,
|
|
700
|
+
`"1e3"`, `"$5"`, `"1,000"`, `"1__0"`, `"0x"` and non-ASCII digits are errors. An integral
|
|
701
|
+
number is itself (`7.0` is 7, `7.5` an error) and a boolean is 1 or 0, so
|
|
702
|
+
`to_int(to_bool(x))` serves a target with no boolean type. A result outside the 64-bit
|
|
703
|
+
range (-2**63 to 2**63 - 1), from text or a number, is an error, as PostgreSQL's
|
|
704
|
+
`bigint` refuses it; `to_decimal` holds wider integers. `round`, `floor` and `ceil`
|
|
705
|
+
convert leniently (`round("7.5")` is 8, `round("1e3")` is 1000). The `int*` cast keeps
|
|
706
|
+
its own, wider grammar (§6.2).
|
|
707
|
+
- `to_bool(v)` follows the boolean cast's rule (§6.4) with the default words
|
|
708
|
+
(`true/t/yes/y/on/1`, `false/f/no/n/off/0`, any case, ASCII whitespace stripped): a
|
|
709
|
+
number or numeric text is a counter cast to a boolean, 0 or less false, more than 0 true.
|
|
710
|
+
|
|
694
711
|
**Conditionals.** A conditional is either the `case:` step form (§3.4) or a ternary inside an
|
|
695
712
|
`expr`. `case` is preferred: each branch can contain builtins, and in BATCH a `case` whose
|
|
696
713
|
conditions lower to Arrow masks (§10.2: null and blank tests, comparisons and membership
|
|
@@ -882,7 +899,9 @@ As built (`map_conform/plan/row.py`, `map_conform/mapper.py`):
|
|
|
882
899
|
- decode JSON text and rename nested members;
|
|
883
900
|
- run the chain;
|
|
884
901
|
- apply the default;
|
|
885
|
-
- enforce `nullable: false` (always an error, even under `on_error: null`) and `enum`;
|
|
902
|
+
- enforce `nullable: false` (always an error, even under `on_error: null`) and `enum`; a
|
|
903
|
+
key property's column is always `nullable: false`, so a null or missing key fails the
|
|
904
|
+
run (MAPC-160);
|
|
886
905
|
- encode the result for the wire.
|
|
887
906
|
- **Failures.** A failed value follows the column's `on_error`. `reject` removes the row from
|
|
888
907
|
the output and logs it. The reject sink is WBS 7.3.
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# map-conform — Executive overview
|
|
2
2
|
|
|
3
|
-
Status: 0.1.0
|
|
3
|
+
Status: 0.1.0 and 0.2.0 are released (2026-11-23); phases P0–P5 are done and P6's stories are
|
|
4
|
+
done (2026-11-24): the contract's reviewer snippet is published and in target-ducklake's review
|
|
5
|
+
rules, and map-conform's RECORD output lands clean in DuckLake with the target's cleanup off.
|
|
4
6
|
|
|
5
7
|
## The problem
|
|
6
8
|
|
|
@@ -81,7 +83,7 @@ expression language with conditionals, and registered Python functions for anyth
|
|
|
81
83
|
| P3 Expressions, UDFs & stream-map parity | Expression language, conditionals, macros, UDF registry; SDK `stream_maps` drop-in; masking parity | Conditional examples and SDK stream-map test cases pass | Done |
|
|
82
84
|
| P4 BATCH engine | Arrow plan, parquet/JSONL I/O, splicing of row-wise columns, polars extra | RECORD and BATCH outputs are identical; benchmarks | Done |
|
|
83
85
|
| P5 Bridges & release | Zamboni/catalog bridge, `doctor`, docs, a reference Meltano project, PyPI 0.1.0, Meltano Hub listing | Published; a reference pipeline runs | Done, except the Hub listing |
|
|
84
|
-
| P6 Adoption | Clean-Landing Contract adopted in targets; duplicate cleanup removed | Targets pass with cleanup disabled |
|
|
86
|
+
| P6 Adoption | Clean-Landing Contract adopted in targets; duplicate cleanup removed | Targets pass with cleanup disabled | RECORD and BATCH pass; no cleanup removed (the target serves other pipelines) |
|
|
85
87
|
|
|
86
88
|
Details: [plan-wbs.md](plan-wbs.md).
|
|
87
89
|
|
|
@@ -5,8 +5,11 @@ Related: [exec overview](exec-overview.md) · [HLD](architecture-hld.md) ·
|
|
|
5
5
|
|
|
6
6
|
Tracking uses `gh agile` on `paulcaron16k/map-conform`, with key `MAPC` and 2-week sprints.
|
|
7
7
|
|
|
8
|
-
Status: P0–P5 are done and 0.
|
|
9
|
-
the maintainer's field testing
|
|
8
|
+
Status: P0–P5 are done; 0.1.0 and 0.2.0 are on PyPI (2026-11-23); the Meltano Hub PR (10.4)
|
|
9
|
+
waits for the maintainer's field testing. P6's stories are done (2026-11-24); its
|
|
10
|
+
report, [target-ducklake with its cleanup off](../wiki/qa/target-ducklake-clean-landing.md),
|
|
11
|
+
found no target cleanup to delete (the target serves other pipelines too); RECORD and
|
|
12
|
+
BATCH (parquet, JSONL) land clean once its bug fixes are in (DUCKLKD-152, 153, 160). Story rows below are the plan as filed, and
|
|
10
13
|
their titles are what `bin/create-agile-issues.py` matches on, so they are not edited after
|
|
11
14
|
the fact; notes record where the build differs. Work found later (bugs, follow-ups such as
|
|
12
15
|
MAPC-113 and MAPC-128 to 138) is tracked on the board only.
|
|
@@ -39,7 +42,7 @@ referenced by at least one target's review rules.
|
|
|
39
42
|
| **P3 Expressions, UDFs & stream-map parity** | E6, E12 | Safe expr, `case`, macros, UDF registry; SDK `stream_maps` settings accepted unchanged; SDK stream-map test cases pass in compatibility mode; pipelinewise masking parity | Done |
|
|
40
43
|
| **P4 BATCH engine** | E8 | Columnar executor; parquet/JSONL I/O; splice; polars extra; parity suite green; benchmarks recorded | Done |
|
|
41
44
|
| **P5 Bridges, docs & release** | E9, E10 | Catalog/Zamboni bridge; `doctor`, `explain`; user docs; 0.1.0 on PyPI; Meltano Hub PR | Done, except the Hub PR |
|
|
42
|
-
| **P6 Adoption** | E11 | Contract published; target review rules updated; duplicate cleanup removed from targets with tests |
|
|
45
|
+
| **P6 Adoption** | E11 | Contract published; target review rules updated; duplicate cleanup removed from targets with tests | Stories done; nothing removed (see the 11.2 report); RECORD and BATCH land clean |
|
|
43
46
|
|
|
44
47
|
Python 3.10 was dropped at its end of life before P0 finished
|
|
45
48
|
([ADR-0001](../wiki/decisions/0001-name-and-licence.md)); story 1.2's matrix is 3.11–3.14.
|
|
@@ -111,7 +111,7 @@ name when the rule has `source`.
|
|
|
111
111
|
| -- | -- | -- | -- |
|
|
112
112
|
| `name` | string or null | unset | Output name. It is checked, never silently conformed. |
|
|
113
113
|
| `type` | string or null | unset | Declared CType, e.g. int64, decimal(18,2), timestamptz. From the tap SCHEMA if absent. |
|
|
114
|
-
| `nullable` | boolean | `true` | If false, a null
|
|
114
|
+
| `nullable` | boolean | `true` | If false, a null fails the run, whatever on_error says. A key property's column is never nullable. |
|
|
115
115
|
| `source` | string or list of string or null | unset | Source column(s) if not the key; a list coalesces in order. |
|
|
116
116
|
| `expr` | string or null | unset | Derived value. Without source, it creates a new column. |
|
|
117
117
|
| `default` | any | unset | Used when the value is missing or null after transforms. |
|
|
@@ -174,8 +174,8 @@ is an error at `columns.<name>.parse.<key>`.
|
|
|
174
174
|
| `trim` | boolean | `defaults.values.trim` | Trim surrounding whitespace before parsing. |
|
|
175
175
|
| `null_tokens` | list of string | `defaults.values.null_tokens` | Text that means null, compared after trimming. |
|
|
176
176
|
| `null_tokens_case_sensitive` | boolean | `defaults.values.null_tokens_case_sensitive` | Compare null tokens case-sensitively. |
|
|
177
|
-
| `true_values` | list of string | `defaults.boolean.true_values` | Text read as true. |
|
|
178
|
-
| `false_values` | list of string | `defaults.boolean.false_values` | Text read as false. |
|
|
177
|
+
| `true_values` | list of string | `defaults.boolean.true_values` | Text read as true. Other numbers and numeric text above 0 are true too. |
|
|
178
|
+
| `false_values` | list of string | `defaults.boolean.false_values` | Text read as false. Other numbers and numeric text 0 or below are false too. |
|
|
179
179
|
| `case_sensitive` | boolean | `false` | Compare the tokens case-sensitively. |
|
|
180
180
|
|
|
181
181
|
### `date`, `time`, `timestamp`, `timestamptz`
|
|
@@ -317,10 +317,10 @@ too. Names in scope: `value`/`self`, columns by conformed name, `record`/`_`,
|
|
|
317
317
|
| `is_string(value)` | predicates | True for text. |
|
|
318
318
|
| `matches(pattern, value)` | predicates | True when the regular expression is found in the value's text; false for null. |
|
|
319
319
|
| `from_json(text)` | coercion | The value of JSON text; fractions are exact decimals. |
|
|
320
|
-
| `to_bool(value)` | coercion | A boolean from true/
|
|
320
|
+
| `to_bool(value)` | coercion | A boolean from true/t/yes/y/on/1 or false/f/no/n/off/0 (any case); a number > 0 is true. |
|
|
321
321
|
| `to_decimal(value, precision=None, scale=None)` | coercion | An exact decimal, rounded half up to ``scale`` digits when given. |
|
|
322
322
|
| `to_float(value)` | coercion | A float. |
|
|
323
|
-
| `to_int(value)` | coercion |
|
|
323
|
+
| `to_int(value)` | coercion | A 64-bit integer: text as PostgreSQL reads a bigint ("0x1F", "1_000"; not "7.0"). |
|
|
324
324
|
| `to_json(value)` | coercion | JSON text (null becomes the text null). |
|
|
325
325
|
| `to_str(value)` | coercion | Text: decimals in plain notation, temporals in ISO 8601, booleans as true/false. |
|
|
326
326
|
| `date_trunc(value, unit="day")` | temporal | The value truncated to year, month, day, hour, minute or second. |
|
|
@@ -26,11 +26,13 @@ from zoneinfo import ZoneInfo
|
|
|
26
26
|
|
|
27
27
|
from map_conform.errors import StepFailed
|
|
28
28
|
from map_conform.expr.sandbox import MAX_LENGTH, MODULES, SandboxError, safe_range
|
|
29
|
+
from map_conform.spec.model import BooleanDefaults
|
|
30
|
+
from map_conform.transforms.casts import ASCII_SPACE, parse_boolean
|
|
31
|
+
from map_conform.transforms.numeric import parse_integer_literal
|
|
29
32
|
from map_conform.transforms.temporal import TemporalCast, localize, parse_temporal
|
|
30
33
|
from map_conform.types.jsontext import dumps
|
|
31
34
|
|
|
32
|
-
|
|
33
|
-
_FALSE = frozenset({"false", "f", "no", "n", "0", "off"})
|
|
35
|
+
_BOOLEAN_WORDS = BooleanDefaults()
|
|
34
36
|
_UUID_NAMESPACES = MappingProxyType(
|
|
35
37
|
{
|
|
36
38
|
"dns": uuid.NAMESPACE_DNS,
|
|
@@ -196,11 +198,60 @@ def matches(pattern: str, value: object) -> bool:
|
|
|
196
198
|
@_function("coercion", "value")
|
|
197
199
|
@_nullable
|
|
198
200
|
def to_int(value: object) -> int:
|
|
199
|
-
"""
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
201
|
+
"""A 64-bit integer: text as PostgreSQL reads a bigint ("0x1F", "1_000"; not "7.0").
|
|
202
|
+
|
|
203
|
+
Text is ASCII whitespace, an optional sign, then decimal digits or a ``0x``/``0o``/``0b``
|
|
204
|
+
prefix and its digits, with single underscores between digits. A number must be
|
|
205
|
+
integral (``7.0`` is 7, ``7.5`` is an error); ``round``, ``floor`` and ``ceil`` convert
|
|
206
|
+
leniently. True is 1 and false 0, so ``to_int(to_bool(x))`` gives 1 or 0 for a target
|
|
207
|
+
with no boolean type. As PostgreSQL's bigint, a value outside -2**63 to 2**63 - 1 is an
|
|
208
|
+
error; use ``to_decimal`` for wider integers.
|
|
209
|
+
"""
|
|
210
|
+
if isinstance(value, bool):
|
|
211
|
+
return int(value)
|
|
212
|
+
if isinstance(value, int):
|
|
213
|
+
return _in_int64(value, value)
|
|
214
|
+
if isinstance(value, str):
|
|
215
|
+
literal = parse_integer_literal(value)
|
|
216
|
+
if literal is None:
|
|
217
|
+
raise StepFailed(f"{value!r} is not an integer (use round() for decimals)")
|
|
218
|
+
return _in_int64(literal, value)
|
|
219
|
+
if isinstance(value, (float, Decimal)):
|
|
220
|
+
number = _decimal(value)
|
|
221
|
+
if not number.is_finite():
|
|
222
|
+
raise StepFailed(f"{value!r} is not a finite number")
|
|
223
|
+
if number.adjusted() > _INT64_DIGITS:
|
|
224
|
+
# Checked before int(), which would build every digit of 1E+999999999.
|
|
225
|
+
raise StepFailed(f"{value!r} {_OUT_OF_INT64}")
|
|
226
|
+
if number != number.to_integral_value():
|
|
227
|
+
raise StepFailed(f"{value!r} has a fraction")
|
|
228
|
+
return _in_int64(int(number), value)
|
|
229
|
+
raise StepFailed(f"{type(value).__name__} is not an integer")
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
_INT64_MIN, _INT64_MAX = -(2**63), 2**63 - 1
|
|
233
|
+
# The most digits past the first an int64 has (9223372036854775807 has 18).
|
|
234
|
+
_INT64_DIGITS = 18
|
|
235
|
+
# How much of a value an error shows.
|
|
236
|
+
_SHOWN = 40
|
|
237
|
+
_OUT_OF_INT64 = (
|
|
238
|
+
"is out of range for a 64-bit integer (-9223372036854775808 to 9223372036854775807); "
|
|
239
|
+
"use to_decimal()"
|
|
240
|
+
)
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
def _in_int64(number: int, value: object) -> int:
|
|
244
|
+
"""``number``, ``to_int``'s result for ``value``, if a 64-bit integer holds it.
|
|
245
|
+
|
|
246
|
+
Raises:
|
|
247
|
+
StepFailed: outside -2**63 to 2**63 - 1, as PostgreSQL's bigint refuses it.
|
|
248
|
+
"""
|
|
249
|
+
if not _INT64_MIN <= number <= _INT64_MAX:
|
|
250
|
+
shown = repr(value) if isinstance(value, str) else f"{'-' if number < 0 else ''}a number"
|
|
251
|
+
if len(shown) > _SHOWN:
|
|
252
|
+
shown = shown[:_SHOWN] + "..."
|
|
253
|
+
raise StepFailed(f"{shown} {_OUT_OF_INT64}")
|
|
254
|
+
return number
|
|
204
255
|
|
|
205
256
|
|
|
206
257
|
@_function("coercion", "value")
|
|
@@ -225,17 +276,14 @@ def to_decimal(value: object, precision: int | None = None, scale: int | None =
|
|
|
225
276
|
@_function("coercion", "value")
|
|
226
277
|
@_nullable
|
|
227
278
|
def to_bool(value: object) -> bool:
|
|
228
|
-
"""A boolean from true/
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
if
|
|
235
|
-
|
|
236
|
-
if text in _FALSE:
|
|
237
|
-
return False
|
|
238
|
-
raise StepFailed(f"{value!r} is not a boolean")
|
|
279
|
+
"""A boolean from true/t/yes/y/on/1 or false/f/no/n/off/0 (any case); a number > 0 is true.
|
|
280
|
+
|
|
281
|
+
Text is stripped of ASCII whitespace first. A number, or text that is a decimal number,
|
|
282
|
+
is a counter cast to a boolean: 0 or less is false, more than 0 true. NaN, other text,
|
|
283
|
+
and lists or objects are errors.
|
|
284
|
+
"""
|
|
285
|
+
text = value.strip(ASCII_SPACE) if isinstance(value, str) else value
|
|
286
|
+
return parse_boolean(text, _BOOLEAN_WORDS.true_values, _BOOLEAN_WORDS.false_values)
|
|
239
287
|
|
|
240
288
|
|
|
241
289
|
@_function("coercion", "value")
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"$ref": "#/$defs/Spec",
|
|
6
6
|
"$defs": {
|
|
7
7
|
"BooleanDefaults": {
|
|
8
|
-
"description": "Words that cast to booleans (case-insensitive unless the cast says otherwise).",
|
|
8
|
+
"description": "Words that cast to booleans (case-insensitive unless the cast says otherwise). A number, or text that is one, is read as a counter: above 0 is true, 0 or less false.",
|
|
9
9
|
"type": "object",
|
|
10
10
|
"additionalProperties": false,
|
|
11
11
|
"properties": {
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
},
|
|
65
65
|
"nullable": {
|
|
66
66
|
"type": "boolean",
|
|
67
|
-
"description": "If false, a null
|
|
67
|
+
"description": "If false, a null fails the run, whatever on_error says. A key property's column is never nullable.",
|
|
68
68
|
"default": true
|
|
69
69
|
},
|
|
70
70
|
"source": {
|
|
@@ -177,12 +177,13 @@ def compile_stream( # noqa: PLR0913 -- the SCHEMA message's parts, plus the spe
|
|
|
177
177
|
)
|
|
178
178
|
builder = _ColumnBuilder(resolved, properties, compiler, issues, notes, path)
|
|
179
179
|
plans = [plan for column in columns if (plan := builder.build(column)) is not None]
|
|
180
|
+
renamed = _renamer(columns)
|
|
181
|
+
keys = _keys(resolved, key_properties, renamed, issues, path)
|
|
182
|
+
plans = [_not_null_key(p, issues, path) if p.name in keys else p for p in plans]
|
|
180
183
|
order = _order(plans, issues, path)
|
|
181
184
|
row_filter = _filter(resolved.spec.filter, scope, issues, path)
|
|
182
185
|
read = frozenset().union(*(p.reads for p in plans), row_filter.reads if row_filter else ())
|
|
183
186
|
plans = [dataclasses.replace(p, vector=vector_chain(p, read)) for p in plans]
|
|
184
|
-
renamed = _renamer(columns)
|
|
185
|
-
keys = _keys(resolved, key_properties, renamed, issues, path)
|
|
186
187
|
bookmarks = tuple(renamed.get(b, b) for b in bookmark_properties)
|
|
187
188
|
if issues or named is None:
|
|
188
189
|
raise SpecError(issues.items, f"the plan for stream {resolved.tap_stream!r}")
|
|
@@ -545,6 +546,21 @@ def _renamer(columns: list[OutputColumn]) -> dict[str, str]:
|
|
|
545
546
|
return out
|
|
546
547
|
|
|
547
548
|
|
|
549
|
+
def _not_null_key(plan: ColumnPlan, issues: Issues, path: str) -> ColumnPlan:
|
|
550
|
+
"""A key property's column is never null: a row needs its key to be matched.
|
|
551
|
+
|
|
552
|
+
PostgreSQL refuses a null in a primary key, and a merge can't match one, so a null or
|
|
553
|
+
missing key fails under the column's ``on_error`` however the column was declared or the
|
|
554
|
+
tap typed it (MAPC-160).
|
|
555
|
+
"""
|
|
556
|
+
if plan.chain.forces_nullable:
|
|
557
|
+
issues.add(
|
|
558
|
+
child(child(path, "columns"), plan.key),
|
|
559
|
+
"set_null can't be used on a key property's column: a key is never null",
|
|
560
|
+
)
|
|
561
|
+
return dataclasses.replace(plan, nullable=False)
|
|
562
|
+
|
|
563
|
+
|
|
548
564
|
def _keys(
|
|
549
565
|
resolved: ResolvedStream,
|
|
550
566
|
tap_keys: tuple[str, ...],
|
|
@@ -176,7 +176,10 @@ class TimestampDefaults:
|
|
|
176
176
|
|
|
177
177
|
@dataclass(frozen=True)
|
|
178
178
|
class BooleanDefaults:
|
|
179
|
-
"""Words that cast to booleans (case-insensitive unless the cast says otherwise).
|
|
179
|
+
"""Words that cast to booleans (case-insensitive unless the cast says otherwise).
|
|
180
|
+
|
|
181
|
+
A number, or text that is one, is read as a counter: above 0 is true, 0 or less false.
|
|
182
|
+
"""
|
|
180
183
|
|
|
181
184
|
true_values: tuple[str, ...] = documented(
|
|
182
185
|
"Strings that mean true.", default=("true", "t", "yes", "y", "1", "on")
|
|
@@ -287,7 +290,11 @@ class ColumnSpec:
|
|
|
287
290
|
default=None,
|
|
288
291
|
metadata={"check": ctype_problem},
|
|
289
292
|
)
|
|
290
|
-
nullable: bool = documented(
|
|
293
|
+
nullable: bool = documented(
|
|
294
|
+
"If false, a null fails the run, whatever on_error says. A key property's column is "
|
|
295
|
+
"never nullable.",
|
|
296
|
+
default=True,
|
|
297
|
+
)
|
|
291
298
|
source: str | tuple[str, ...] | None = documented(
|
|
292
299
|
"Source column(s) if not the key; a list coalesces in order.", default=None
|
|
293
300
|
)
|
|
@@ -11,6 +11,8 @@ import base64
|
|
|
11
11
|
import binascii
|
|
12
12
|
import datetime as dt
|
|
13
13
|
import json
|
|
14
|
+
import math
|
|
15
|
+
import re
|
|
14
16
|
import uuid
|
|
15
17
|
from dataclasses import dataclass
|
|
16
18
|
from decimal import Decimal
|
|
@@ -21,6 +23,8 @@ from map_conform.spec._struct import documented
|
|
|
21
23
|
from map_conform.transforms.registry import RAW, TEMPORAL, Registry, Transform
|
|
22
24
|
|
|
23
25
|
if TYPE_CHECKING:
|
|
26
|
+
from collections.abc import Iterable
|
|
27
|
+
|
|
24
28
|
from map_conform.plan.ops import CastArgs
|
|
25
29
|
from map_conform.spec.model import ColumnSpec, Defaults
|
|
26
30
|
from map_conform.transforms.registry import Context
|
|
@@ -138,13 +142,17 @@ def cast_string(value: object, args: CastArgs, _ctx: Context) -> object:
|
|
|
138
142
|
|
|
139
143
|
@dataclass(frozen=True)
|
|
140
144
|
class BooleanCast(Cleanup):
|
|
141
|
-
"""Options for casts to boolean."""
|
|
145
|
+
"""Options for casts to boolean: words, then numbers as counters (> 0 is true)."""
|
|
142
146
|
|
|
143
147
|
true_values: tuple[str, ...] = documented(
|
|
144
|
-
"Text read as true.
|
|
148
|
+
"Text read as true. Other numbers and numeric text above 0 are true too.",
|
|
149
|
+
default=("true",),
|
|
150
|
+
metadata={"from": "boolean.true_values"},
|
|
145
151
|
)
|
|
146
152
|
false_values: tuple[str, ...] = documented(
|
|
147
|
-
"Text read as false.
|
|
153
|
+
"Text read as false. Other numbers and numeric text 0 or below are false too.",
|
|
154
|
+
default=("false",),
|
|
155
|
+
metadata={"from": "boolean.false_values"},
|
|
148
156
|
)
|
|
149
157
|
case_sensitive: bool = documented("Compare the tokens case-sensitively.", default=False)
|
|
150
158
|
|
|
@@ -160,30 +168,64 @@ def _boolean_defaults(settings: Defaults, column: ColumnSpec | None) -> dict[str
|
|
|
160
168
|
return out
|
|
161
169
|
|
|
162
170
|
|
|
171
|
+
ASCII_SPACE = " \t\n\r\v\f"
|
|
172
|
+
"""The whitespace ``to_bool`` and boolean members ignore around a word."""
|
|
173
|
+
|
|
174
|
+
_NUMBER_TEXT = re.compile(r"[+-]?(?:[0-9]+\.?[0-9]*|\.[0-9]+)(?:[eE][+-]?[0-9]+)?")
|
|
175
|
+
"""Decimal text a boolean reads as a number: ASCII digits, no NaN, no infinity."""
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
def parse_boolean(
|
|
179
|
+
value: object,
|
|
180
|
+
true_values: Iterable[str],
|
|
181
|
+
false_values: Iterable[str],
|
|
182
|
+
*,
|
|
183
|
+
case_sensitive: bool = False,
|
|
184
|
+
) -> bool:
|
|
185
|
+
"""The one boolean rule, shared by ``cast: boolean`` and ``to_bool``.
|
|
186
|
+
|
|
187
|
+
A boolean is itself. Text equal to one of ``true_values`` or ``false_values`` (in any
|
|
188
|
+
case unless ``case_sensitive``) is that boolean. Otherwise a number, or text that is a
|
|
189
|
+
decimal number, is a counter cast to a boolean: greater than 0 is true, 0 or less false.
|
|
190
|
+
|
|
191
|
+
Raises:
|
|
192
|
+
StepFailed: for NaN, other text and any other type.
|
|
193
|
+
"""
|
|
194
|
+
if isinstance(value, bool):
|
|
195
|
+
return value
|
|
196
|
+
if isinstance(value, str):
|
|
197
|
+
fold = (lambda t: t) if case_sensitive else str.casefold
|
|
198
|
+
word = fold(value)
|
|
199
|
+
if any(word == fold(t) for t in true_values):
|
|
200
|
+
return True
|
|
201
|
+
if any(word == fold(f) for f in false_values):
|
|
202
|
+
return False
|
|
203
|
+
if _NUMBER_TEXT.fullmatch(value):
|
|
204
|
+
# The sign and a non-zero mantissa decide; no Decimal, so any exponent is fine.
|
|
205
|
+
mantissa = value.lower().partition("e")[0]
|
|
206
|
+
return not value.startswith("-") and any(c in "123456789" for c in mantissa)
|
|
207
|
+
raise StepFailed(f"{value!r} is not a boolean: not a true or false word, nor a number")
|
|
208
|
+
if isinstance(value, float) and math.isnan(value):
|
|
209
|
+
raise StepFailed("NaN is not a boolean")
|
|
210
|
+
if isinstance(value, Decimal) and value.is_nan():
|
|
211
|
+
raise StepFailed("NaN is not a boolean")
|
|
212
|
+
if isinstance(value, (int, float, Decimal)):
|
|
213
|
+
return value > 0
|
|
214
|
+
raise StepFailed(f"{type(value).__name__} is not a boolean")
|
|
215
|
+
|
|
216
|
+
|
|
163
217
|
def cast_boolean(value: object, args: CastArgs, _ctx: Context) -> object:
|
|
164
|
-
"""Cast to boolean: listed words, real booleans, and
|
|
218
|
+
"""Cast to boolean: listed words, real booleans, and numbers (> 0 is true)."""
|
|
165
219
|
options: BooleanCast = args.options
|
|
166
220
|
cleaned = clean(value, options)
|
|
167
|
-
if cleaned is None
|
|
168
|
-
return
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
if options.case_sensitive:
|
|
176
|
-
if cleaned in options.true_values:
|
|
177
|
-
return True
|
|
178
|
-
if cleaned in options.false_values:
|
|
179
|
-
return False
|
|
180
|
-
else:
|
|
181
|
-
folded = cleaned.casefold()
|
|
182
|
-
if any(folded == t.casefold() for t in options.true_values):
|
|
183
|
-
return True
|
|
184
|
-
if any(folded == f.casefold() for f in options.false_values):
|
|
185
|
-
return False
|
|
186
|
-
raise StepFailed("not one of the true_values or false_values")
|
|
221
|
+
if cleaned is None:
|
|
222
|
+
return None
|
|
223
|
+
return parse_boolean(
|
|
224
|
+
cleaned,
|
|
225
|
+
options.true_values,
|
|
226
|
+
options.false_values,
|
|
227
|
+
case_sensitive=options.case_sensitive,
|
|
228
|
+
)
|
|
187
229
|
|
|
188
230
|
|
|
189
231
|
# --- uuid -----------------------------------------------------------------------------------
|