Skip to content

Commit de4995f

Browse files
committed
style(fabric,core): satisfy ruff for CI — imports, docstrings, line length
Pre-existing lint debt on the Spark-native tier that would fail core-pr-tests: - sort imports (I001) in orchestration assets/checks/sensors + two tests - collections.abc.Callable over typing.Callable (UP035) in fabric registry - add docstrings: 4 package __init__, FabricPlatform.__init__, 4 silver_clinical builders, ValidationResult.fail/ok, capture_lineage.main - wrap two >100-char lines (fabric platform read pattern, gold procedures coalesce) No behavior change. ruff check core fabric clean; 128 passed / 1 skipped.
1 parent 98ee4d9 commit de4995f

15 files changed

Lines changed: 27 additions & 10 deletions

File tree

core/orchestration/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Dagster orchestration (LocalLite) — the medallion as a software-defined asset graph."""

core/orchestration/dagster/assets.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@
3232
)
3333
from core.ingest.bronze_landing import cohort_files
3434
from core.ingest.dicom_index import DicomIndex
35-
from core.surfaces.cli.pipeline import _parse_cohort
35+
from core.orchestration.dagster.partitions import cohort_partitions
36+
from core.orchestration.dagster.resources import PlatformResource
3637
from core.platform.base import LakehousePlatform
3738
from core.preview import bundle_summary_md, gold_encounter_card, sample_md, schema_md
39+
from core.surfaces.cli.pipeline import _parse_cohort
3840
from core.transforms.fhir_parser import FHIRBundleParser
3941
from core.transforms.registry import SILVER_TABLES
40-
from core.orchestration.dagster.partitions import cohort_partitions
41-
from core.orchestration.dagster.resources import PlatformResource
4242

4343

4444
def _bronze_root(platform: LakehousePlatform):

core/orchestration/dagster/checks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414

1515
from dagster import AssetCheckExecutionContext, AssetCheckResult, MetadataValue, asset_check
1616

17+
from core.orchestration.dagster.resources import PlatformResource
1718
from core.transforms.registry import SILVER_TABLES
1819
from core.validation.validate import ValidationResult, validate_table
19-
from core.orchestration.dagster.resources import PlatformResource
2020

2121

2222
def _render_rules_table(result: ValidationResult) -> str:

core/orchestration/dagster/sensors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
)
2626

2727
from core.ingest.bronze_landing import cohort_labels
28-
from core.transforms.registry import SILVER_TABLES
2928
from core.orchestration.dagster.partitions import COHORT_PARTITIONS_NAME, cohort_partitions
3029
from core.orchestration.dagster.resources import PlatformResource
30+
from core.transforms.registry import SILVER_TABLES
3131

3232
#: Assets the sensor materializes per cohort: Bronze + every Silver table.
3333
#: Sourced from :data:`core.transforms.registry.SILVER_TABLES` so the selection

core/surfaces/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Execution surfaces for the LocalLite tier (e.g. the CLI pipeline)."""

core/surfaces/cli/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""CLI execution surface — Bronze → Silver → Gold pipeline orchestration."""

core/tests/test_docs_generated.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
never silently drift from the registry.
66
"""
77

8-
from core.transforms.registry import SILVER_TABLES
98
from core.scripts.gen_data_dictionary import OUTPUT_PATH, render
9+
from core.transforms.registry import SILVER_TABLES
1010

1111

1212
def test_data_dictionary_is_current():

core/tests/test_gold_encounter_summary.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
SILVER_SOURCES,
2222
build_encounter_summary,
2323
)
24-
from core.transforms.registry import SILVER_TABLES
2524
from core.scripts.gen_corpus_schema import OUTPUT_PATH, _serialize, render_schema
25+
from core.transforms.registry import SILVER_TABLES
2626

2727
INGEST_TS = datetime(2026, 5, 27, tzinfo=UTC)
2828
CREATED_TS = datetime(2026, 5, 27, 12, 0, tzinfo=UTC)

fabric/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Fabric tier — independent Spark-native medallion implementation (ADR-022)."""

fabric/gold/encounter_summary.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,9 @@ def build_encounter_summary(
197197
F.coalesce(F.col("recent_labs"), F.array().cast(ArrayType(LAB_STRUCT))).alias(
198198
"recent_labs"
199199
),
200-
F.coalesce(F.col("procedures"), F.array().cast(ArrayType(StringType()))).alias("procedures"),
200+
F.coalesce(F.col("procedures"), F.array().cast(ArrayType(StringType()))).alias(
201+
"procedures"
202+
),
201203
F.col("soap_note_text"),
202204
F.col("soap_note_id"),
203205
F.col("ecg_finding"),

0 commit comments

Comments
 (0)