Skip to content

Commit 478416a

Browse files
committed
Update docs and READMEs for lakeflow_framework package paths.
Align operational metadata, templates, logging, config, validator, and test docs with the packaged layout; extend the spelling wordlist; rephrase historized to history-tracked in samples README.
1 parent 32439be commit 478416a

10 files changed

Lines changed: 26 additions & 19 deletions

File tree

docs/source/contributor_dev_steps.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Development Process
4343
pytest tests/ -m "not integration and not spark"
4444
4545
- See ``tests/README.md`` for layout, fixtures, markers, and conventions.
46-
- Optional coverage: add ``--cov=src --cov-report=term-missing``.
46+
- Optional coverage: add ``--cov=lakeflow_framework --cov-report=term-missing``.
4747
- CI runs the same pytest command on every pull request (``.github/workflows/ci.yml``).
4848

4949
3. Integration Testing / Samples

docs/source/feature_framework_configuration.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ Example — change one global setting without touching the rest of ``global.json
126126
}
127127
128128
Save this as ``src/local/config/global.json``. All other keys from
129-
``src/config/default/global.json`` are kept unchanged.
129+
``src/lakeflow_framework/config/default/global.json`` are kept unchanged.
130130

131131
For **directory-based config** (e.g. ``dataflow_spec_mapping/``), place the
132132
entire override directory in ``src/local/config/`` — the local directory takes

docs/source/feature_logging.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ You can optionally plug in a **custom logger** via a dedicated ``logger.json`` c
1818
.. admonition:: Setting Precedence
1919
:class: warning
2020

21-
* Framework code and extensions should use the shared logger helper ``pipeline_config.get_logger()`` rather than creating their own loggers.
21+
* Framework code and extensions should use the shared logger helper ``get_logger()`` from ``lakeflow_framework.pipeline_config`` rather than creating their own loggers.
2222

2323
Overview
2424
--------
@@ -460,14 +460,14 @@ Using the Logger in Code
460460

461461
.. code-block:: python
462462
463-
from pipeline_config import get_logger
463+
from lakeflow_framework.pipeline_config import get_logger
464464
465465
logger = get_logger()
466466
logger.info("Processing batch %s", batch_id)
467467
468-
``utility.set_logger`` remains for backward compatibility and delegates to the framework default logger factory; new code should use ``pipeline_config.get_logger()``.
468+
``lakeflow_framework.utility.set_logger`` remains for backward compatibility and delegates to the framework default logger factory; new code should use ``get_logger()`` from ``lakeflow_framework.pipeline_config``.
469469

470-
Custom loggers that support async flushing may require an explicit ``close()`` at the end of the pipeline. Consider a **post_init** hook under ``extensions/post_init/`` that calls ``close()`` on the primary logger when exposed.
470+
Custom loggers that support async flushing may require an explicit ``close()`` at the end of the pipeline. Consider a **post-init** hook under ``src/init/post/`` (pipeline bundle) or ``src/local/init/post/`` (framework bundle) that calls ``close()`` on the primary logger when exposed.
471471

472472
Troubleshooting
473473
^^^^^^^^^^^^^^^^

docs/source/feature_operational_metadata.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Configuration
2929
-------------
3030

3131
| **Scope: Global**
32-
| In the Framework bundle, operational metadata columns are defined in JSON configuration files at Lakehouse layer level (e.g. bronze, silver, gold). The configuration files are locate at and must be named as follows: ``src/config/default/operational_metadata_<layer>.json``
32+
| In the Framework bundle, operational metadata columns are defined in JSON configuration files at Lakehouse layer level (e.g. bronze, silver, gold). The configuration files are locate at and must be named as follows: ``src/lakeflow_framework/config/default/operational_metadata_<layer>.json``
3333
3434
.. admonition:: Layer Config
3535
:class: note

docs/source/feature_templates.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ Validation
421421

422422
Each expanded spec is validated using the existing schema validators to ensure correctness.
423423

424-
Template usage specs are validated against the schema at ``src/schemas/spec_template.json``:
424+
Template usage specs are validated against the schema at ``src/lakeflow_framework/schemas/spec_template.json``:
425425

426426
- ``template``: Required string (template name without .json extension)
427427
- ``params``: Required array with at least one parameter object

docs/source/spelling_wordlist.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Artifactory
44
async
55
autocomplete
66
backfill
7+
backend
78
behaviour
89
cardinality
910
cdc
@@ -14,8 +15,10 @@ cli
1415
Cmd
1516
config
1617
configs
18+
contrib
1719
css
1820
Ctrl
21+
customisation
1922
customisations
2023
dataFlowId
2124
Dataframe
@@ -27,6 +30,7 @@ deduplicate
2730
dedupes
2831
deduplication
2932
deployable
33+
deps
3034
Del
3135
Demultiplexing
3236
dependant
@@ -47,6 +51,7 @@ initialisation
4751
Inmon
4852
IntelliSense
4953
instantiation
54+
integrations
5055
json
5156
keystore
5257
kwargs
@@ -82,6 +87,7 @@ rst
8287
Schemas
8388
schemas
8489
sdist
90+
semver
8591
Serverless
8692
sinkOptions
8793
sourceDetails
@@ -95,6 +101,7 @@ stdout
95101
Subquery
96102
subdirectory
97103
subqueries
104+
subpackage
98105
tableMigrationDetails
99106
tableProperties
100107
targetFormat

samples/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ The Framework comes with extensive samples that demonstrate the use of the frame
77
| **`feature-samples`** | Demonstrates every framework feature in isolation using a single `{namespace}_feature` schema. The simplest entry point. |
88
| **`pattern-samples`** | End-to-end medallion architecture patterns (bronze → silver → gold) across multiple schemas. Includes multi-source streaming, stream-static joins, CDC from snapshot sources, and gold-layer materialized views. |
99
| **`yaml_sample`** | Demonstrates that data flow specs can be written in YAML format instead of JSON. Contains YAML equivalents of basic specs. |
10-
| **`tpch_sample`** | The most comprehensive end-to-end reference, built on the TPC-H dataset in the UC samples catalog. Covers multi-source schema-on-read bronze, conformed/historized silver (SCD2 + SCD1 + append-only facts with DQ quarantine), and a governed gold star schema with surrogate keys, point-in-time joins, pre-aggregated MVs, and UC metric views. Uses template specs and a three-run incremental simulation. See its [README](tpch_sample/README.md). |
10+
| **`tpch_sample`** | The most comprehensive end-to-end reference, built on the TPC-H dataset in the UC samples catalog. Covers multi-source schema-on-read bronze, conformed/history-tracked silver (SCD2 + SCD1 + append-only facts with DQ quarantine), and a governed gold star schema with surrogate keys, point-in-time joins, pre-aggregated MVs, and UC metric views. Uses template specs and a three-run incremental simulation. See its [README](tpch_sample/README.md). |
1111

1212
## Deploying the Samples
1313

@@ -146,12 +146,12 @@ Parameters:
146146

147147
## TPC-H Sample
148148

149-
The TPC-H sample is the most comprehensive end-to-end example in the framework. Built on the TPC-H schema in the Databricks UC samples catalog, it turns a realistic, sample dataset into a fully streaming medallion data warehouse — from multi-source raw ingestion through conformed, historized silver to a governed gold star schema with value-add aggregations.
149+
The TPC-H sample is the most comprehensive end-to-end example in the framework. Built on the TPC-H schema in the Databricks UC samples catalog, it turns a realistic, sample dataset into a fully streaming medallion data warehouse — from multi-source raw ingestion through conformed, history-tracked silver to a governed gold star schema with value-add aggregations.
150150

151151
It demonstrates a wide range of framework capabilities together, including:
152152

153153
* **Schema-on-read bronze** that infers and evolves the schema, ingesting Parquet from eight simulated source systems via Auto Loader.
154-
* **Conformed, historized silver** with SCD2 dimensions, SCD1 reference data, append-only facts, and data-quality expectations with quarantine.
154+
* **Conformed, history-tracked silver** with SCD2 dimensions, SCD1 reference data, append-only facts, and data-quality expectations with quarantine.
155155
* **Governed gold star schema** with surrogate keys and point-in-time (as-of) joins, plus two metrics approaches side by side: pre-aggregated materialized views and UC metric views.
156156
* **Template specs** that collapse repetitive bronze and silver flows into reusable templates.
157157
* **A three-run incremental simulation** covering SCD changes, fact growth, a backdated out-of-order correction, and ongoing quarantine.

scripts/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ python scripts/validate_dataflows.py -v
2727
```
2828

2929
**What it validates:**
30-
- Searches for all `*_main.json` files in `dataflows/**/dataflowspec/` directories
31-
- Validates against `src/schemas/main.json` (which routes to appropriate sub-schemas)
30+
- Searches for all `*_main.json` files under `dataflows/` (including `dataflowspec/` subdirectories and flat `dataflows/*_main.json` layouts)
31+
- Validates against `src/lakeflow_framework/schemas/main.json` (which routes to appropriate sub-schemas)
3232
- Reports validation errors with clear messages
3333

3434
**Version Mapping (enabled by default):**

src/local/config/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Fork-safe sparse override directory for framework configuration files.
44

55
## How it works
66

7-
Files placed here are **deep-merged on top of their `src/config/default/`
7+
Files placed here are **deep-merged on top of their `src/lakeflow_framework/config/default/`
88
counterparts** at runtime. You only need to include the keys you want to
99
change — all other keys retain their default values.
1010

@@ -25,7 +25,7 @@ key improvements:
2525

2626
## Supported files
2727

28-
Any file present in `src/config/default/` can be partially overridden here
28+
Any file present in `src/lakeflow_framework/config/default/` can be partially overridden here
2929
using the same filename. Common candidates:
3030

3131
| File | Purpose |
@@ -47,7 +47,7 @@ default.
4747
To migrate:
4848

4949
1. Identify which keys in your `config/override/` files differ from
50-
`config/default/`.
50+
`lakeflow_framework/config/default/`.
5151
2. Create sparse files here containing only those differing keys.
5252
3. Delete or empty `config/override/`.
5353

tests/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pytest tests/ -m "not integration and not spark"
1414
pytest tests/ -m integration
1515

1616
# Optional coverage report
17-
pytest tests/ -m "not integration and not spark" --cov=src --cov-report=term-missing
17+
pytest tests/ -m "not integration and not spark" --cov=lakeflow_framework --cov-report=term-missing
1818
```
1919

2020
Use **Python 3.12** for development; newer Python versions may break PySpark-related dependencies.
@@ -32,7 +32,7 @@ tests/
3232
├── unit/ # Fast, isolated module tests
3333
└── integration/ # Sample-dependent tests (require samples/ checkout)
3434
├── conftest.py # validate_bundle(), bundle paths, feature-samples fixtures
35-
├── test_validate_dataflows.py # Script helpers + all specs per JSON bundle
35+
├── test_validate_dataflows.py # Per-bundle sample validation + CLI subprocess
3636
└── test_feature_samples_spec_builder.py # DataflowSpecBuilder on feature-samples
3737
```
3838

@@ -50,7 +50,7 @@ Configure in `pytest.ini`. CI runs: `-m "not integration and not spark"`.
5050

5151
1. **Use `pipeline_context`** — do not call `initialize_core()` inline in test modules.
5252
2. **Prefer `tests/fixtures/`** — unit tests should not depend on `samples/` paths.
53-
3. **Mirror `src/`**`tests/unit/test_<module>.py` maps to `src/<module>.py`.
53+
3. **Mirror the package**`tests/unit/test_<module>.py` maps to `src/lakeflow_framework/<module>.py`; use `lakeflow_framework.*` imports (not compat shims).
5454
4. **One concern per test** — name tests `test_<behavior>_when_<condition>`.
5555
5. **No DLT mocks** — tests that need `@dp.table` belong in samples/E2E, not unit tests.
5656

0 commit comments

Comments
 (0)