map-conform 0.1.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.1.0/.gitattributes +3 -0
- map_conform-0.1.0/.github/agile.json +38 -0
- map_conform-0.1.0/.github/dependabot.yml +31 -0
- map_conform-0.1.0/.github/workflows/build.yml +78 -0
- map_conform-0.1.0/.github/workflows/run-zizmor.yml +31 -0
- map_conform-0.1.0/.github/workflows/test.yml +125 -0
- map_conform-0.1.0/.gitignore +20 -0
- map_conform-0.1.0/.mdformat.toml +6 -0
- map_conform-0.1.0/.pre-commit-config.yaml +79 -0
- map_conform-0.1.0/CHANGELOG.md +47 -0
- map_conform-0.1.0/CLAUDE.md +33 -0
- map_conform-0.1.0/LICENSE +201 -0
- map_conform-0.1.0/PKG-INFO +157 -0
- map_conform-0.1.0/README.md +123 -0
- map_conform-0.1.0/_typos.toml +8 -0
- map_conform-0.1.0/bin/create-agile-issues.py +204 -0
- map_conform-0.1.0/bin/render-hub-definition.py +76 -0
- map_conform-0.1.0/bin/wiki-lint-frontmatter.py +108 -0
- map_conform-0.1.0/conform.yml +9 -0
- map_conform-0.1.0/creating-a-better-mapper-guidance.md +376 -0
- map_conform-0.1.0/docs/architecture-hld.md +166 -0
- map_conform-0.1.0/docs/cookbook.md +257 -0
- map_conform-0.1.0/docs/detailed-design.md +1193 -0
- map_conform-0.1.0/docs/exec-overview.md +84 -0
- map_conform-0.1.0/docs/plan-wbs.md +192 -0
- map_conform-0.1.0/docs/spec-reference.md +271 -0
- map_conform-0.1.0/examples/README.md +27 -0
- map_conform-0.1.0/examples/check_lake.py +35 -0
- map_conform-0.1.0/examples/conform.yml +21 -0
- map_conform-0.1.0/examples/data/orders.csv +14 -0
- map_conform-0.1.0/examples/meltano.yml +55 -0
- map_conform-0.1.0/examples/plugins/extractors/tap-csv--meltanolabs.lock +103 -0
- map_conform-0.1.0/map_conform/__init__.py +5 -0
- map_conform-0.1.0/map_conform/__main__.py +7 -0
- map_conform-0.1.0/map_conform/batch/__init__.py +1 -0
- map_conform-0.1.0/map_conform/batch/arrow.py +80 -0
- map_conform-0.1.0/map_conform/batch/columnar.py +125 -0
- map_conform-0.1.0/map_conform/batch/engine.py +191 -0
- map_conform-0.1.0/map_conform/batch/files.py +207 -0
- map_conform-0.1.0/map_conform/cli.py +460 -0
- map_conform-0.1.0/map_conform/doctor.py +178 -0
- map_conform-0.1.0/map_conform/errors.py +107 -0
- map_conform-0.1.0/map_conform/expr/__init__.py +6 -0
- map_conform-0.1.0/map_conform/expr/compiler.py +562 -0
- map_conform-0.1.0/map_conform/expr/functions.py +542 -0
- map_conform-0.1.0/map_conform/expr/sandbox.py +333 -0
- map_conform-0.1.0/map_conform/expr/sdk.py +116 -0
- map_conform-0.1.0/map_conform/map-conform-spec.schema.json +1204 -0
- map_conform-0.1.0/map_conform/mapper.py +355 -0
- map_conform-0.1.0/map_conform/metadata.py +73 -0
- map_conform-0.1.0/map_conform/metrics.py +62 -0
- map_conform-0.1.0/map_conform/naming/__init__.py +1 -0
- map_conform-0.1.0/map_conform/naming/ascii-table.json +980 -0
- map_conform-0.1.0/map_conform/naming/conform.py +262 -0
- map_conform-0.1.0/map_conform/naming/flatten.py +148 -0
- map_conform-0.1.0/map_conform/naming/nested.py +117 -0
- map_conform-0.1.0/map_conform/naming/reserved/ansi.txt +369 -0
- map_conform-0.1.0/map_conform/naming/reserved/duckdb.txt +114 -0
- map_conform-0.1.0/map_conform/naming/reserved/postgres.txt +105 -0
- map_conform-0.1.0/map_conform/naming/reserved/snowflake.txt +90 -0
- map_conform-0.1.0/map_conform/naming/reserved.py +34 -0
- map_conform-0.1.0/map_conform/naming/shape.py +96 -0
- map_conform-0.1.0/map_conform/naming/streams.py +76 -0
- map_conform-0.1.0/map_conform/naming/translit.py +170 -0
- map_conform-0.1.0/map_conform/plan/__init__.py +1 -0
- map_conform-0.1.0/map_conform/plan/chain.py +667 -0
- map_conform-0.1.0/map_conform/plan/compile.py +551 -0
- map_conform-0.1.0/map_conform/plan/lower.py +281 -0
- map_conform-0.1.0/map_conform/plan/ops.py +336 -0
- map_conform-0.1.0/map_conform/plan/row.py +212 -0
- map_conform-0.1.0/map_conform/plan/vector.py +71 -0
- map_conform-0.1.0/map_conform/rejects.py +92 -0
- map_conform-0.1.0/map_conform/settings.py +157 -0
- map_conform-0.1.0/map_conform/spec/__init__.py +1 -0
- map_conform-0.1.0/map_conform/spec/_struct.py +483 -0
- map_conform-0.1.0/map_conform/spec/bridge.py +109 -0
- map_conform-0.1.0/map_conform/spec/check.py +380 -0
- map_conform-0.1.0/map_conform/spec/errors.py +22 -0
- map_conform-0.1.0/map_conform/spec/importer.py +87 -0
- map_conform-0.1.0/map_conform/spec/jsonschema.py +54 -0
- map_conform-0.1.0/map_conform/spec/load.py +357 -0
- map_conform-0.1.0/map_conform/spec/model.py +473 -0
- map_conform-0.1.0/map_conform/spec/reference.py +179 -0
- map_conform-0.1.0/map_conform/spec/steps.py +297 -0
- map_conform-0.1.0/map_conform/spec/stream_maps.py +233 -0
- map_conform-0.1.0/map_conform/spec/zamboni.py +99 -0
- map_conform-0.1.0/map_conform/transforms/__init__.py +1 -0
- map_conform-0.1.0/map_conform/transforms/builtins.py +63 -0
- map_conform-0.1.0/map_conform/transforms/casts.py +310 -0
- map_conform-0.1.0/map_conform/transforms/fake.py +150 -0
- map_conform-0.1.0/map_conform/transforms/nested.py +111 -0
- map_conform-0.1.0/map_conform/transforms/numeric.py +318 -0
- map_conform-0.1.0/map_conform/transforms/polars_vector.py +151 -0
- map_conform-0.1.0/map_conform/transforms/privacy.py +220 -0
- map_conform-0.1.0/map_conform/transforms/registry.py +116 -0
- map_conform-0.1.0/map_conform/transforms/temporal.py +410 -0
- map_conform-0.1.0/map_conform/transforms/text.py +249 -0
- map_conform-0.1.0/map_conform/transforms/vector.py +386 -0
- map_conform-0.1.0/map_conform/types/__init__.py +1 -0
- map_conform-0.1.0/map_conform/types/canonical.py +255 -0
- map_conform-0.1.0/map_conform/types/from_jsonschema.py +177 -0
- map_conform-0.1.0/map_conform/types/jsontext.py +63 -0
- map_conform-0.1.0/map_conform/types/to_arrow.py +52 -0
- map_conform-0.1.0/map_conform/types/to_jsonschema.py +65 -0
- map_conform-0.1.0/map_conform/types/wire.py +53 -0
- map_conform-0.1.0/map_conform/udfs.py +327 -0
- map_conform-0.1.0/meltano.yml +142 -0
- map_conform-0.1.0/plugin-definition.yml +143 -0
- map_conform-0.1.0/pyproject.toml +213 -0
- map_conform-0.1.0/tests/__init__.py +1 -0
- map_conform-0.1.0/tests/batch/__init__.py +1 -0
- map_conform-0.1.0/tests/batch/test_batch.py +188 -0
- map_conform-0.1.0/tests/batch/test_shape_batch.py +57 -0
- map_conform-0.1.0/tests/bench/__init__.py +1 -0
- map_conform-0.1.0/tests/bench/baseline.json +10 -0
- map_conform-0.1.0/tests/bench/test_bench.py +48 -0
- map_conform-0.1.0/tests/bench/workload.py +104 -0
- map_conform-0.1.0/tests/compat/__init__.py +1 -0
- map_conform-0.1.0/tests/compat/compare.py +92 -0
- map_conform-0.1.0/tests/compat/harness.py +75 -0
- map_conform-0.1.0/tests/compat/sdk_cases.py +223 -0
- map_conform-0.1.0/tests/compat/test_import.py +107 -0
- map_conform-0.1.0/tests/compat/test_sdk_parity.py +47 -0
- map_conform-0.1.0/tests/compat/test_source_streams.py +91 -0
- map_conform-0.1.0/tests/compat/test_translate.py +161 -0
- map_conform-0.1.0/tests/e2e/__init__.py +1 -0
- map_conform-0.1.0/tests/e2e/test_target_jsonl.py +109 -0
- map_conform-0.1.0/tests/expr/__init__.py +1 -0
- map_conform-0.1.0/tests/expr/test_compiler.py +163 -0
- map_conform-0.1.0/tests/expr/test_functions.py +141 -0
- map_conform-0.1.0/tests/expr/test_sandbox.py +101 -0
- map_conform-0.1.0/tests/expr/test_sdk_corpus.py +132 -0
- map_conform-0.1.0/tests/fixtures/README.md +97 -0
- map_conform-0.1.0/tests/fixtures/__init__.py +1 -0
- map_conform-0.1.0/tests/fixtures/batch/inventory_xlsx-0001.parquet +0 -0
- map_conform-0.1.0/tests/fixtures/batch/orders_export-0001.jsonl.gz +0 -0
- map_conform-0.1.0/tests/fixtures/batch/orders_export-0001.parquet +0 -0
- map_conform-0.1.0/tests/fixtures/batch/orders_export-0002.parquet +0 -0
- map_conform-0.1.0/tests/fixtures/catalogs/inventory_xlsx.catalog.json +180 -0
- map_conform-0.1.0/tests/fixtures/catalogs/orders_export.catalog.json +238 -0
- map_conform-0.1.0/tests/fixtures/catalogs/typed.catalog.json +400 -0
- map_conform-0.1.0/tests/fixtures/catalogs/typed.expected.json +31 -0
- map_conform-0.1.0/tests/fixtures/corpus/boolean.csv +22 -0
- map_conform-0.1.0/tests/fixtures/corpus/names.csv +39 -0
- map_conform-0.1.0/tests/fixtures/corpus/numeric.csv +50 -0
- map_conform-0.1.0/tests/fixtures/corpus/temporal.csv +48 -0
- map_conform-0.1.0/tests/fixtures/corpus/text.csv +15 -0
- map_conform-0.1.0/tests/fixtures/corpus/uuid.csv +10 -0
- map_conform-0.1.0/tests/fixtures/generate.py +409 -0
- map_conform-0.1.0/tests/fixtures/paths.py +18 -0
- map_conform-0.1.0/tests/fixtures/sources/orders_export.csv +14 -0
- map_conform-0.1.0/tests/fixtures/streams/inventory_xlsx.batch-parquet.singer.jsonl +3 -0
- map_conform-0.1.0/tests/fixtures/streams/inventory_xlsx.singer.jsonl +6 -0
- map_conform-0.1.0/tests/fixtures/streams/orders_export.batch-jsonl.singer.jsonl +3 -0
- map_conform-0.1.0/tests/fixtures/streams/orders_export.batch-parquet.singer.jsonl +3 -0
- map_conform-0.1.0/tests/fixtures/streams/orders_export.singer.jsonl +14 -0
- map_conform-0.1.0/tests/fixtures/udfs/project/project_udfs.py +25 -0
- map_conform-0.1.0/tests/fixtures/udfs/site/sample_udfs/__init__.py +35 -0
- map_conform-0.1.0/tests/fixtures/udfs/site/sample_udfs-0.1.dist-info/METADATA +3 -0
- map_conform-0.1.0/tests/fixtures/udfs/site/sample_udfs-0.1.dist-info/entry_points.txt +4 -0
- map_conform-0.1.0/tests/naming/__init__.py +1 -0
- map_conform-0.1.0/tests/naming/test_conform.py +112 -0
- map_conform-0.1.0/tests/naming/test_flatten.py +133 -0
- map_conform-0.1.0/tests/naming/test_length_collisions.py +146 -0
- map_conform-0.1.0/tests/naming/test_nested.py +116 -0
- map_conform-0.1.0/tests/naming/test_reserved.py +78 -0
- map_conform-0.1.0/tests/naming/test_sdk_preset.py +101 -0
- map_conform-0.1.0/tests/naming/test_shape.py +170 -0
- map_conform-0.1.0/tests/naming/test_streams.py +109 -0
- map_conform-0.1.0/tests/naming/test_translit.py +67 -0
- map_conform-0.1.0/tests/parity/__init__.py +1 -0
- map_conform-0.1.0/tests/parity/harness.py +86 -0
- map_conform-0.1.0/tests/parity/test_case_parity.py +100 -0
- map_conform-0.1.0/tests/parity/test_parity.py +125 -0
- map_conform-0.1.0/tests/parity/test_polars_parity.py +80 -0
- map_conform-0.1.0/tests/plan/__init__.py +1 -0
- map_conform-0.1.0/tests/plan/test_chain.py +243 -0
- map_conform-0.1.0/tests/plan/test_compile.py +218 -0
- map_conform-0.1.0/tests/plan/test_expressions.py +460 -0
- map_conform-0.1.0/tests/plan/test_row.py +88 -0
- map_conform-0.1.0/tests/spec/__init__.py +1 -0
- map_conform-0.1.0/tests/spec/test_check.py +288 -0
- map_conform-0.1.0/tests/spec/test_jsonschema.py +81 -0
- map_conform-0.1.0/tests/spec/test_load.py +297 -0
- map_conform-0.1.0/tests/spec/test_model.py +252 -0
- map_conform-0.1.0/tests/spec/test_reference.py +38 -0
- map_conform-0.1.0/tests/test_bridge.py +154 -0
- map_conform-0.1.0/tests/test_cli.py +55 -0
- map_conform-0.1.0/tests/test_cookbook.py +77 -0
- map_conform-0.1.0/tests/test_doctor.py +117 -0
- map_conform-0.1.0/tests/test_errors.py +42 -0
- map_conform-0.1.0/tests/test_fixtures.py +190 -0
- map_conform-0.1.0/tests/test_hub_definition.py +40 -0
- map_conform-0.1.0/tests/test_mapper.py +283 -0
- map_conform-0.1.0/tests/test_metadata.py +66 -0
- map_conform-0.1.0/tests/test_rejects_metrics.py +157 -0
- map_conform-0.1.0/tests/test_settings.py +154 -0
- map_conform-0.1.0/tests/test_udfs.py +205 -0
- map_conform-0.1.0/tests/test_undeclared.py +51 -0
- map_conform-0.1.0/tests/transforms/__init__.py +1 -0
- map_conform-0.1.0/tests/transforms/corpus.py +82 -0
- map_conform-0.1.0/tests/transforms/test_builtins.py +283 -0
- map_conform-0.1.0/tests/transforms/test_corpus_casts.py +15 -0
- map_conform-0.1.0/tests/transforms/test_fake.py +97 -0
- map_conform-0.1.0/tests/transforms/test_masking.py +148 -0
- map_conform-0.1.0/tests/transforms/test_numeric.py +92 -0
- map_conform-0.1.0/tests/transforms/test_temporal.py +195 -0
- map_conform-0.1.0/tests/types/__init__.py +1 -0
- map_conform-0.1.0/tests/types/snapshots/to_jsonschema.json +181 -0
- map_conform-0.1.0/tests/types/test_canonical.py +86 -0
- map_conform-0.1.0/tests/types/test_type_mappings.py +184 -0
- map_conform-0.1.0/tests/wiki/__init__.py +1 -0
- map_conform-0.1.0/tests/wiki/pages.py +131 -0
- map_conform-0.1.0/tests/wiki/test_claims.py +159 -0
- map_conform-0.1.0/uv.lock +2433 -0
- map_conform-0.1.0/wiki/architecture/overview.md +38 -0
- map_conform-0.1.0/wiki/ci-cd/pipeline.md +42 -0
- map_conform-0.1.0/wiki/components/execution-engines.md +67 -0
- map_conform-0.1.0/wiki/components/metadata-and-errors.md +62 -0
- map_conform-0.1.0/wiki/components/name-conformer.md +88 -0
- map_conform-0.1.0/wiki/components/spec-loader.md +59 -0
- map_conform-0.1.0/wiki/components/type-system-and-builtins.md +81 -0
- map_conform-0.1.0/wiki/concepts/clean-landing-contract.md +107 -0
- map_conform-0.1.0/wiki/concepts/existing-systems-survey.md +41 -0
- map_conform-0.1.0/wiki/decisions/0001-name-and-licence.md +35 -0
- map_conform-0.1.0/wiki/decisions/0002-transform-authoring.md +35 -0
- map_conform-0.1.0/wiki/decisions/0003-own-spec-with-zamboni-bridge.md +35 -0
- map_conform-0.1.0/wiki/decisions/0004-batch-engine.md +31 -0
- map_conform-0.1.0/wiki/decisions/0005-sdc-metadata.md +46 -0
- map_conform-0.1.0/wiki/decisions/0006-error-policy.md +27 -0
- map_conform-0.1.0/wiki/decisions/0007-wire-encoding.md +40 -0
- map_conform-0.1.0/wiki/decisions/0008-naming-defaults.md +45 -0
- map_conform-0.1.0/wiki/decisions/0009-undeclared-columns.md +28 -0
- map_conform-0.1.0/wiki/decisions/0010-stream-map-superset.md +71 -0
- map_conform-0.1.0/wiki/decisions/0011-uuid-in-batch.md +32 -0
- map_conform-0.1.0/wiki/decisions/0012-bundled-transliteration-table.md +52 -0
- map_conform-0.1.0/wiki/glossary.md +35 -0
- map_conform-0.1.0/wiki/index.md +92 -0
- map_conform-0.1.0/wiki/log.md +84 -0
- map_conform-0.1.0/wiki/plans/roadmap.md +41 -0
- map_conform-0.1.0/wiki/qa/benchmarks.md +50 -0
- map_conform-0.1.0/wiki/qa/test-strategy.md +35 -0
- map_conform-0.1.0/wiki/runbooks/dev-environment.md +52 -0
- map_conform-0.1.0/wiki/runbooks/wiki-maintenance.md +81 -0
- map_conform-0.1.0/wiki/schemas/conform-spec.md +94 -0
- map_conform-0.1.0/wiki/schemas/plugin-settings.md +42 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"boards": [
|
|
3
|
+
{
|
|
4
|
+
"name": "Sprint board",
|
|
5
|
+
"type": "scrum"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"name": "Backlog",
|
|
9
|
+
"type": "backlog"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"name": "Roadmap",
|
|
13
|
+
"type": "roadmap"
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"keys": [
|
|
17
|
+
{
|
|
18
|
+
"key": "MAPC",
|
|
19
|
+
"name": "map-conform",
|
|
20
|
+
"repo": "paulcaron16k/map-conform"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"project": {
|
|
24
|
+
"issue_title_prefix": "key",
|
|
25
|
+
"key": "MAPC",
|
|
26
|
+
"name": "map-conform",
|
|
27
|
+
"number": 36,
|
|
28
|
+
"owner": "paulcaron16k"
|
|
29
|
+
},
|
|
30
|
+
"sprint": {
|
|
31
|
+
"ahead": 2,
|
|
32
|
+
"autocreate": true,
|
|
33
|
+
"cadence_days": 14,
|
|
34
|
+
"name_template": "{n:04d} W{iso_week}-{year}",
|
|
35
|
+
"start_day": "monday",
|
|
36
|
+
"template": "2-week"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: uv
|
|
4
|
+
directory: "/"
|
|
5
|
+
schedule:
|
|
6
|
+
interval: weekly
|
|
7
|
+
commit-message:
|
|
8
|
+
prefix: "chore(deps): "
|
|
9
|
+
prefix-development: "chore(deps-dev): "
|
|
10
|
+
groups:
|
|
11
|
+
development-dependencies:
|
|
12
|
+
dependency-type: development
|
|
13
|
+
runtime-dependencies:
|
|
14
|
+
dependency-type: production
|
|
15
|
+
update-types:
|
|
16
|
+
- "patch"
|
|
17
|
+
versioning-strategy: increase-if-necessary
|
|
18
|
+
cooldown:
|
|
19
|
+
default-days: 7
|
|
20
|
+
- package-ecosystem: github-actions
|
|
21
|
+
directory: "/"
|
|
22
|
+
schedule:
|
|
23
|
+
interval: weekly
|
|
24
|
+
commit-message:
|
|
25
|
+
prefix: "ci: "
|
|
26
|
+
groups:
|
|
27
|
+
actions:
|
|
28
|
+
patterns:
|
|
29
|
+
- "*"
|
|
30
|
+
cooldown:
|
|
31
|
+
default-days: 7
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags: ["v*"]
|
|
6
|
+
|
|
7
|
+
concurrency:
|
|
8
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
9
|
+
cancel-in-progress: false
|
|
10
|
+
|
|
11
|
+
env:
|
|
12
|
+
FORCE_COLOR: 1
|
|
13
|
+
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read # read repository contents
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
build:
|
|
19
|
+
name: Build wheel and sdist
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
outputs:
|
|
22
|
+
name: ${{ steps.baipp.outputs.package_name }}
|
|
23
|
+
version: ${{ steps.baipp.outputs.package_version }}
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
26
|
+
with:
|
|
27
|
+
fetch-depth: 0 # hatch-vcs derives the version from the tag
|
|
28
|
+
persist-credentials: false
|
|
29
|
+
- uses: hynek/build-and-inspect-python-package@67230f7b8410ae0052b39c1efc89d89fff43ff10 # v3.0.2
|
|
30
|
+
id: baipp
|
|
31
|
+
|
|
32
|
+
publish:
|
|
33
|
+
name: Publish to PyPI
|
|
34
|
+
# Trusted publishing is configured but switched off until the first release (WBS 10.3).
|
|
35
|
+
# To enable: register this workflow as a trusted publisher for `map-conform` on PyPI
|
|
36
|
+
# (environment `pypi`), create the `pypi` environment here, then set the repository
|
|
37
|
+
# variable PYPI_PUBLISH=true.
|
|
38
|
+
if: vars.PYPI_PUBLISH == 'true'
|
|
39
|
+
runs-on: ubuntu-latest
|
|
40
|
+
needs: [build]
|
|
41
|
+
environment:
|
|
42
|
+
name: pypi
|
|
43
|
+
url: https://pypi.org/project/${{ needs.build.outputs.name }}/${{ needs.build.outputs.version }}
|
|
44
|
+
permissions:
|
|
45
|
+
id-token: write # OIDC token for PyPI trusted publishing
|
|
46
|
+
steps:
|
|
47
|
+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
|
48
|
+
with:
|
|
49
|
+
name: Packages
|
|
50
|
+
path: dist
|
|
51
|
+
- name: Publish
|
|
52
|
+
uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
|
|
53
|
+
|
|
54
|
+
github-release:
|
|
55
|
+
name: GitHub release
|
|
56
|
+
needs: [build, publish]
|
|
57
|
+
runs-on: ubuntu-latest
|
|
58
|
+
permissions:
|
|
59
|
+
contents: write # create the release for the tag
|
|
60
|
+
steps:
|
|
61
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
62
|
+
with:
|
|
63
|
+
persist-credentials: false
|
|
64
|
+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
|
65
|
+
with:
|
|
66
|
+
name: Packages
|
|
67
|
+
path: dist
|
|
68
|
+
- name: Release notes from the changelog
|
|
69
|
+
env:
|
|
70
|
+
VERSION: ${{ needs.build.outputs.version }}
|
|
71
|
+
run: |
|
|
72
|
+
awk -v v="$VERSION" '$0 ~ "^## \\[" v "\\]" {on=1; next} /^## \[/ {on=0} on' CHANGELOG.md > notes.md
|
|
73
|
+
test -s notes.md
|
|
74
|
+
- name: Create the release
|
|
75
|
+
env:
|
|
76
|
+
GH_TOKEN: ${{ github.token }}
|
|
77
|
+
TAG: ${{ github.ref_name }}
|
|
78
|
+
run: gh release create "$TAG" dist/* --title "$TAG" --notes-file notes.md --verify-tag
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: GitHub Actions Security Analysis with zizmor 🌈
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: ["main"]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: ["**"]
|
|
8
|
+
|
|
9
|
+
concurrency:
|
|
10
|
+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
11
|
+
cancel-in-progress: true
|
|
12
|
+
|
|
13
|
+
env:
|
|
14
|
+
FORCE_COLOR: "1"
|
|
15
|
+
|
|
16
|
+
permissions: {}
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
zizmor:
|
|
20
|
+
name: Run zizmor 🌈
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
permissions:
|
|
23
|
+
security-events: write # for GitHub's Advanced Security via zizmor
|
|
24
|
+
steps:
|
|
25
|
+
- name: Checkout repository
|
|
26
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
27
|
+
with:
|
|
28
|
+
persist-credentials: false
|
|
29
|
+
|
|
30
|
+
- name: Run zizmor 🌈
|
|
31
|
+
uses: zizmorcore/zizmor-action@45d7276c9ca790aabd705e31ca99c6185c3e76dd # v0.8.1
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
name: Test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
concurrency:
|
|
10
|
+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
11
|
+
cancel-in-progress: true
|
|
12
|
+
|
|
13
|
+
env:
|
|
14
|
+
FORCE_COLOR: 1
|
|
15
|
+
|
|
16
|
+
permissions:
|
|
17
|
+
contents: read # read repository contents
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
build-package:
|
|
21
|
+
name: Build & verify package
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
outputs:
|
|
24
|
+
supported-python-versions: ${{ steps.baipp.outputs.supported_python_classifiers_json_array }}
|
|
25
|
+
steps:
|
|
26
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
27
|
+
with:
|
|
28
|
+
fetch-depth: 0 # hatch-vcs derives the version from tags
|
|
29
|
+
persist-credentials: false
|
|
30
|
+
- uses: hynek/build-and-inspect-python-package@67230f7b8410ae0052b39c1efc89d89fff43ff10 # v3.0.2
|
|
31
|
+
id: baipp
|
|
32
|
+
|
|
33
|
+
lint:
|
|
34
|
+
name: Lint
|
|
35
|
+
runs-on: ubuntu-latest
|
|
36
|
+
steps:
|
|
37
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
38
|
+
with:
|
|
39
|
+
persist-credentials: false
|
|
40
|
+
- name: Setup uv
|
|
41
|
+
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
|
|
42
|
+
- name: ruff check
|
|
43
|
+
run: uv run --locked --only-group lint ruff check --output-format=github .
|
|
44
|
+
- name: ruff format
|
|
45
|
+
run: uv run --locked --only-group lint ruff format --check .
|
|
46
|
+
- name: Wiki frontmatter
|
|
47
|
+
run: uv run --locked --group test bin/wiki-lint-frontmatter.py
|
|
48
|
+
|
|
49
|
+
typing:
|
|
50
|
+
name: Type checking
|
|
51
|
+
runs-on: ubuntu-latest
|
|
52
|
+
steps:
|
|
53
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
54
|
+
with:
|
|
55
|
+
persist-credentials: false
|
|
56
|
+
- name: Setup uv
|
|
57
|
+
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
|
|
58
|
+
- name: mypy and ty
|
|
59
|
+
run: uvx --managed-python --with=tox-uv tox -e typing
|
|
60
|
+
|
|
61
|
+
pytest:
|
|
62
|
+
name: Test (Python ${{ matrix.python-version }})
|
|
63
|
+
needs: [build-package]
|
|
64
|
+
runs-on: ubuntu-latest
|
|
65
|
+
strategy:
|
|
66
|
+
fail-fast: false
|
|
67
|
+
matrix:
|
|
68
|
+
python-version: ${{ fromJson(needs.build-package.outputs.supported-python-versions) }}
|
|
69
|
+
steps:
|
|
70
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
71
|
+
with:
|
|
72
|
+
fetch-depth: 0 # hatch-vcs derives the version from tags
|
|
73
|
+
persist-credentials: false
|
|
74
|
+
- name: Setup uv
|
|
75
|
+
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
|
|
76
|
+
with:
|
|
77
|
+
python-version: ${{ matrix.python-version }}
|
|
78
|
+
- name: Run tox
|
|
79
|
+
env:
|
|
80
|
+
PYTHON_VERSION: ${{ matrix.python-version }}
|
|
81
|
+
run: uvx --with=tox-uv tox -e "$PYTHON_VERSION"
|
|
82
|
+
|
|
83
|
+
bench:
|
|
84
|
+
name: Benchmarks
|
|
85
|
+
runs-on: ubuntu-latest
|
|
86
|
+
steps:
|
|
87
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
88
|
+
with:
|
|
89
|
+
fetch-depth: 0 # hatch-vcs derives the version from tags
|
|
90
|
+
persist-credentials: false
|
|
91
|
+
- name: Setup uv
|
|
92
|
+
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
|
|
93
|
+
with:
|
|
94
|
+
python-version: "3.14"
|
|
95
|
+
- name: Throughput and regression gate
|
|
96
|
+
env:
|
|
97
|
+
BENCH_RESULTS: bench-results.json
|
|
98
|
+
run: uv run --locked pytest -m bench tests/bench -q -s
|
|
99
|
+
- name: Results
|
|
100
|
+
if: always()
|
|
101
|
+
run: cat bench-results.json >> "$GITHUB_STEP_SUMMARY" || true
|
|
102
|
+
|
|
103
|
+
example:
|
|
104
|
+
name: Example project (meltano run)
|
|
105
|
+
runs-on: ubuntu-latest
|
|
106
|
+
steps:
|
|
107
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
108
|
+
with:
|
|
109
|
+
fetch-depth: 0 # hatch-vcs derives the version from tags
|
|
110
|
+
persist-credentials: false
|
|
111
|
+
- name: Setup uv
|
|
112
|
+
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
|
|
113
|
+
with:
|
|
114
|
+
python-version: "3.12"
|
|
115
|
+
- name: meltano install
|
|
116
|
+
working-directory: examples
|
|
117
|
+
run: uvx --python 3.12 meltano==4.4.1 install
|
|
118
|
+
- name: meltano run
|
|
119
|
+
working-directory: examples
|
|
120
|
+
run: |
|
|
121
|
+
mkdir -p output # the SQLite catalog's directory
|
|
122
|
+
uvx --python 3.12 meltano==4.4.1 run load
|
|
123
|
+
- name: Check the lake
|
|
124
|
+
working-directory: examples
|
|
125
|
+
run: uv run --no-project --with duckdb==1.5.2 python check_lake.py
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
ci:
|
|
2
|
+
autofix_prs: true
|
|
3
|
+
autofix_commit_msg: "style: pre-commit fixes"
|
|
4
|
+
autoupdate_schedule: monthly
|
|
5
|
+
autoupdate_commit_msg: "chore: pre-commit autoupdate"
|
|
6
|
+
skip:
|
|
7
|
+
- uv-audit
|
|
8
|
+
- mypy # local hooks need the project environment
|
|
9
|
+
- wiki-frontmatter
|
|
10
|
+
|
|
11
|
+
repos:
|
|
12
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
13
|
+
rev: v6.0.0
|
|
14
|
+
hooks:
|
|
15
|
+
- id: check-json
|
|
16
|
+
- id: check-toml
|
|
17
|
+
- id: check-yaml
|
|
18
|
+
# Fixture data is messy on purpose: CRLF, BOM, trailing spaces inside cells.
|
|
19
|
+
- id: end-of-file-fixer
|
|
20
|
+
exclude: ^(tests/fixtures/(sources|streams|batch)|examples/data)/
|
|
21
|
+
- id: trailing-whitespace
|
|
22
|
+
exclude: ^(tests/fixtures/(sources|streams|batch)|examples/data)/
|
|
23
|
+
|
|
24
|
+
- repo: https://github.com/zizmorcore/zizmor-pre-commit
|
|
25
|
+
rev: v1.30.1
|
|
26
|
+
hooks:
|
|
27
|
+
- id: zizmor
|
|
28
|
+
|
|
29
|
+
- repo: https://github.com/python-jsonschema/check-jsonschema
|
|
30
|
+
rev: 0.38.2
|
|
31
|
+
hooks:
|
|
32
|
+
- id: check-dependabot
|
|
33
|
+
- id: check-github-workflows
|
|
34
|
+
- id: check-meltano
|
|
35
|
+
|
|
36
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
37
|
+
rev: v0.17.6
|
|
38
|
+
hooks:
|
|
39
|
+
- id: ruff-check
|
|
40
|
+
- id: ruff-format
|
|
41
|
+
|
|
42
|
+
- repo: https://github.com/astral-sh/uv-pre-commit
|
|
43
|
+
rev: 0.12.24
|
|
44
|
+
hooks:
|
|
45
|
+
- id: uv-audit
|
|
46
|
+
- id: uv-lock
|
|
47
|
+
|
|
48
|
+
# The wiki has its own conventions (wiki/runbooks/wiki-maintenance.md) and its own linter
|
|
49
|
+
# below, so mdformat leaves it alone.
|
|
50
|
+
- repo: https://github.com/hukkin/mdformat
|
|
51
|
+
rev: 1.0.0
|
|
52
|
+
hooks:
|
|
53
|
+
- id: mdformat
|
|
54
|
+
# The spec reference is generated (and checked by a test), so its text is the generator's.
|
|
55
|
+
exclude: ^(wiki/|docs/spec-reference\.md$)
|
|
56
|
+
additional_dependencies:
|
|
57
|
+
- mdformat-gfm
|
|
58
|
+
- mdformat-frontmatter
|
|
59
|
+
|
|
60
|
+
- repo: https://github.com/crate-ci/typos
|
|
61
|
+
rev: v1.51.1
|
|
62
|
+
hooks:
|
|
63
|
+
- id: typos
|
|
64
|
+
# Report only: tests spell names wrong on purpose, and a silent fix changes their meaning.
|
|
65
|
+
args: [--force-exclude]
|
|
66
|
+
|
|
67
|
+
- repo: local
|
|
68
|
+
hooks:
|
|
69
|
+
- id: mypy
|
|
70
|
+
name: mypy
|
|
71
|
+
entry: uv run --locked --group typing mypy map_conform tests
|
|
72
|
+
language: system
|
|
73
|
+
types: [python]
|
|
74
|
+
pass_filenames: false
|
|
75
|
+
- id: wiki-frontmatter
|
|
76
|
+
name: wiki frontmatter
|
|
77
|
+
entry: uv run --locked --group test bin/wiki-lint-frontmatter.py
|
|
78
|
+
language: system
|
|
79
|
+
files: ^wiki/.*\.md$
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to map-conform are recorded here. The format follows
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and versions follow
|
|
5
|
+
[Semantic Versioning](https://semver.org/). Before 1.0, a minor version may change behaviour;
|
|
6
|
+
each such change is listed.
|
|
7
|
+
|
|
8
|
+
## [0.1.0] - 2026-11-23
|
|
9
|
+
|
|
10
|
+
The first release: a Singer/Meltano inline mapper that conforms names, types, values and
|
|
11
|
+
metadata so targets receive clean data.
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- **Conform spec** (YAML or JSON, `spec_path` or inline): strict parsing with every problem
|
|
16
|
+
reported at its path, `${var}` and `${env:NAME}` substitution, inheritance from
|
|
17
|
+
`defaults` through stream globs to exact names, macros with parameters, and a generated
|
|
18
|
+
JSON Schema (`map-conform spec schema`).
|
|
19
|
+
- **Types and casts** to declared canonical types: integers, floats, exact decimals,
|
|
20
|
+
strings, booleans, dates, times, timestamps with and without zone, UUIDs, binary, JSON,
|
|
21
|
+
structs and lists. The casts clean text on the way: currency, thousands separators,
|
|
22
|
+
accounting negatives, percentages, locales, null tokens, Excel serial dates, epoch times,
|
|
23
|
+
time zones with DST policies, yes/no words.
|
|
24
|
+
- **Name conforming**: snake_case with camelCase splitting, ASCII transliteration with a
|
|
25
|
+
bundled table, reserved words of PostgreSQL, DuckDB and Snowflake, length limits with hash
|
|
26
|
+
truncation, collision checks, nested member names, stream prefixes and aliases, and the
|
|
27
|
+
`naming: sdk` preset matching the Singer SDK byte for byte.
|
|
28
|
+
- **Builtin steps** for text, numbers, temporals, privacy (hash, mask, set_null,
|
|
29
|
+
redact_date, mask_number, mask_hidden, tokenize) and fake data (the `faker` extra).
|
|
30
|
+
- **Expressions**: a sandboxed Python subset compiled once per column, with a function
|
|
31
|
+
library; `expr`, `case` and `when` steps; derived columns in dependency order; stream
|
|
32
|
+
`filter`; `fields` for nested members; UDFs from installed packages or, opted in, from
|
|
33
|
+
project modules.
|
|
34
|
+
- **Errors**: `on_error` (`raise`, `null`, `keep`, `reject`), a reject sink (JSONL or
|
|
35
|
+
parquet), reject and null rate limits checked before each STATE, and per-stream metrics.
|
|
36
|
+
- **`_sdc_*` metadata columns** with Singer SDK semantics, when `add_record_metadata` is
|
|
37
|
+
true.
|
|
38
|
+
- **BATCH**: parquet and JSONL manifests over fsspec, conformed into new files with the
|
|
39
|
+
declared Arrow schema, or into RECORD messages; a columnar Arrow engine that gives exactly
|
|
40
|
+
the row path's results, `case` lowering, and the `polars` engine (extra).
|
|
41
|
+
- **Flattening** with Singer SDK semantics, and from a declared JSON `shape` that keeps the
|
|
42
|
+
output schema stable when the tap's schema drifts.
|
|
43
|
+
- **SDK compatibility**: `stream_maps`, `stream_map_config`, `faker_config` and
|
|
44
|
+
`flattening_*` settings accepted unchanged, checked against the SDK's own mapper tests.
|
|
45
|
+
- **Tools**: `spec validate`, `spec explain`, `spec import` (from a catalog, Zamboni
|
|
46
|
+
`columns` or SDK stream maps), `spec export --zamboni`, `doctor` and `functions`.
|
|
47
|
+
- **Docs**: README, a generated spec reference, and a cookbook whose examples are tested.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# map-conform — agent instructions
|
|
2
|
+
|
|
3
|
+
Public repository, published to PyPI. **Never include company names, internal hostnames,
|
|
4
|
+
customer data or credentials** in code, docs, commits, issues or PRs.
|
|
5
|
+
|
|
6
|
+
## Orientation
|
|
7
|
+
|
|
8
|
+
- Founding brief: `creating-a-better-mapper-guidance.md`
|
|
9
|
+
- Design docs: `docs/` (exec overview, HLD, detailed design, plan/WBS)
|
|
10
|
+
- Knowledge base: `wiki/`. Read `wiki/runbooks/wiki-maintenance.md` before editing anything
|
|
11
|
+
under `wiki/`.
|
|
12
|
+
- Tracking: `gh agile`, key `MAPC`. Issues are generated from `docs/plan-wbs.md` by
|
|
13
|
+
`bin/create-agile-issues.py`.
|
|
14
|
+
|
|
15
|
+
## Invariants
|
|
16
|
+
|
|
17
|
+
- **Declared, not inferred.** Output types come from the spec or the tap SCHEMA, never from
|
|
18
|
+
values or expression text.
|
|
19
|
+
- **One plan, two executors.** Any change to a transform must keep RECORD/BATCH parity tests
|
|
20
|
+
green.
|
|
21
|
+
- **Fail loud.** The default `on_error` is `raise`. Never swallow exceptions in transforms.
|
|
22
|
+
- **The Clean-Landing Contract** (`wiki/concepts/clean-landing-contract.md`) is a public
|
|
23
|
+
interface. Changing it needs an ADR in `wiki/decisions/`.
|
|
24
|
+
- The spec JSON Schema is generated from code. Never hand-edit the shipped schema file.
|
|
25
|
+
|
|
26
|
+
## Workflow
|
|
27
|
+
|
|
28
|
+
- Git identity is set in `.git/config` (`user.email = paulcaron16k@yahoo.com`).
|
|
29
|
+
- Push only to the `fork`/`origin` remote of `paulcaron16k`. Never create `tasks/` files in an
|
|
30
|
+
upstream fork.
|
|
31
|
+
- Before calling work done: `uv run pytest`, `uv run ruff check . && uv run ruff format --check .`, `uv run mypy map_conform`, `bin/wiki-lint-frontmatter.py`.
|
|
32
|
+
- Wiki content syncs happen on `main` after a merge (see the maintenance runbook), with a
|
|
33
|
+
`wiki/log.md` row for each page change.
|