diff --git a/application b/application deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/docs/02-architecture/generated/module-dependency-map.json b/docs/02-architecture/generated/module-dependency-map.json index 2513e8f745..569eafc504 100644 --- a/docs/02-architecture/generated/module-dependency-map.json +++ b/docs/02-architecture/generated/module-dependency-map.json @@ -1,12 +1,12 @@ { "summary": { "scanned_modules": 1947, - "total_internal_imports": 7697, + "total_internal_imports": 7698, "layer_edges": 13, "cross_layer_group_edges": 60, "cross_layer_group_edges_total": 330, "violations": 0, - "source_fingerprint": "b95d700be542d6171fe3d5e1dff5df0d020d8352626bdaf7c63638f61c4fbbe9" + "source_fingerprint": "65812f7c9b0d268bdf97a7966535ffae61d04808363fa1d00a86f6736980fba2" }, "layer_edges": [ { @@ -18,7 +18,7 @@ { "source": "application", "target": "domain", - "imports": 1154, + "imports": 1155, "allowed": true }, { @@ -122,7 +122,7 @@ { "source": "application.services", "target": "domain.control_plane", - "imports": 75 + "imports": 76 }, { "source": "application.composite", diff --git a/docs/02-architecture/generated/module-dependency-map.md b/docs/02-architecture/generated/module-dependency-map.md index aad932f76c..e5a069b56b 100644 --- a/docs/02-architecture/generated/module-dependency-map.md +++ b/docs/02-architecture/generated/module-dependency-map.md @@ -6,7 +6,7 @@ ## Summary - Scanned modules: `1947` -- Internal import edges (raw): `7697` +- Internal import edges (raw): `7698` - Aggregated layer edges: `13` - Layer policy violations: `0` - Cross-layer module-group edges (total): `330` @@ -22,7 +22,7 @@ flowchart LR composition[composition] interfaces[interfaces] application -->|1319 OK| application - application -->|1154 OK| domain + application -->|1155 OK| domain composition -->|287 OK| application composition -->|689 OK| composition composition -->|445 OK| domain @@ -41,7 +41,7 @@ flowchart LR | From | To | Imports | Policy | | ---------------- | ---------------- | ------: | ------- | | `application` | `application` | 1319 | allowed | -| `application` | `domain` | 1154 | allowed | +| `application` | `domain` | 1155 | allowed | | `composition` | `application` | 287 | allowed | | `composition` | `composition` | 689 | allowed | | `composition` | `domain` | 445 | allowed | @@ -64,7 +64,7 @@ flowchart LR | `infrastructure.adapters` | `domain.ports` | 88 | | `application.pipelines` | `domain.types` | 82 | | `application.core` | `domain.ports` | 78 | -| `application.services` | `domain.control_plane` | 75 | +| `application.services` | `domain.control_plane` | 76 | | `application.composite` | `domain.ports` | 74 | | `application.services` | `domain.ports` | 73 | | `infrastructure.storage` | `domain.types` | 69 | diff --git a/domain b/domain deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/scripts/docs/build/__pycache__/__init__.cpython-313.pyc b/scripts/docs/build/__pycache__/__init__.cpython-313.pyc deleted file mode 100644 index 4c636bfe66..0000000000 Binary files a/scripts/docs/build/__pycache__/__init__.cpython-313.pyc and /dev/null differ diff --git a/scripts/docs/build/__pycache__/mkdocs_build.cpython-313.pyc b/scripts/docs/build/__pycache__/mkdocs_build.cpython-313.pyc deleted file mode 100644 index 851a4b4d87..0000000000 Binary files a/scripts/docs/build/__pycache__/mkdocs_build.cpython-313.pyc and /dev/null differ diff --git a/src/bioetl/application/pipelines/chembl/target_helpers.py b/src/bioetl/application/pipelines/chembl/target_helpers.py index df066225fb..12c418261e 100644 --- a/src/bioetl/application/pipelines/chembl/target_helpers.py +++ b/src/bioetl/application/pipelines/chembl/target_helpers.py @@ -126,8 +126,7 @@ def project_component_xrefs(cls, xrefs: list[JsonDict]) -> dict[str, str]: ) return { - column: cls.pipe_or_unknown(values) - for column, values in buckets.items() + column: cls.pipe_or_unknown(values) for column, values in buckets.items() } @classmethod @@ -178,7 +177,9 @@ def synonym_target_field(syn_type: object) -> str | None: if normalized_type == "EC_NUMBER": return "target_ec_numbers" - if normalized_type == "GENE_SYMBOL" or normalized_type.startswith("GENE_SYMBOL_"): + if normalized_type == "GENE_SYMBOL" or normalized_type.startswith( + "GENE_SYMBOL_" + ): return "target_gene_synonyms" return None @@ -266,9 +267,7 @@ def project_component_synonyms( "target_gene_synonyms": cls.pipe_or_unknown( buckets["target_gene_synonyms"] ), - "target_ec_numbers": cls.pipe_or_unknown( - buckets["target_ec_numbers"] - ), + "target_ec_numbers": cls.pipe_or_unknown(buckets["target_ec_numbers"]), } diff --git a/src/bioetl/application/pipelines/chembl/target_transformer.py b/src/bioetl/application/pipelines/chembl/target_transformer.py index abef53e541..67965be77a 100644 --- a/src/bioetl/application/pipelines/chembl/target_transformer.py +++ b/src/bioetl/application/pipelines/chembl/target_transformer.py @@ -120,9 +120,7 @@ def _extract_business_data( # Extract primary component_id (first element) for enricher join key component_ids = flattened_components.get("component_ids") primary_component_id = component_ids[0] if component_ids else None - projected_synonyms = SynonymHelper.project_component_synonyms( - target_components - ) + projected_synonyms = SynonymHelper.project_component_synonyms(target_components) component_xrefs = XrefHelper.collect_component_xrefs(target_components) xref_projection = XrefHelper.project_component_xrefs(component_xrefs) @@ -163,15 +161,9 @@ def _extract_business_data( if component_xrefs else None, "target_xref_pdb_ids": xref_projection["target_xref_pdb_ids"], - "target_xref_go_component": xref_projection[ - "target_xref_go_component" - ], - "target_xref_go_function": xref_projection[ - "target_xref_go_function" - ], - "target_xref_go_process": xref_projection[ - "target_xref_go_process" - ], + "target_xref_go_component": xref_projection["target_xref_go_component"], + "target_xref_go_function": xref_projection["target_xref_go_function"], + "target_xref_go_process": xref_projection["target_xref_go_process"], "target_xref_reactome_ids": xref_projection["target_xref_reactome_ids"], # Flattened components **serialized_flattened_components, diff --git a/src/bioetl/infrastructure/storage/silver/operations/delta_operations.py b/src/bioetl/infrastructure/storage/silver/operations/delta_operations.py index bdd8967155..fdd996a3ce 100644 --- a/src/bioetl/infrastructure/storage/silver/operations/delta_operations.py +++ b/src/bioetl/infrastructure/storage/silver/operations/delta_operations.py @@ -103,11 +103,14 @@ async def _write_delete_impl( request: _DeltaWriteRequest, ) -> None: """Write data in delete mode (overwrite table).""" - policy = getattr( - host, - "_merge_resilience_policy", - DEFAULT_SILVER_MERGE_POLICY, - ) or DEFAULT_SILVER_MERGE_POLICY + policy = ( + getattr( + host, + "_merge_resilience_policy", + DEFAULT_SILVER_MERGE_POLICY, + ) + or DEFAULT_SILVER_MERGE_POLICY + ) await _write_plain_delta_request( load_module=host._load_silver_writer_module, request=request, @@ -122,11 +125,14 @@ async def _write_append_impl( request: _DeltaWriteRequest, ) -> None: """Write data in append mode.""" - policy = getattr( - host, - "_merge_resilience_policy", - DEFAULT_SILVER_MERGE_POLICY, - ) or DEFAULT_SILVER_MERGE_POLICY + policy = ( + getattr( + host, + "_merge_resilience_policy", + DEFAULT_SILVER_MERGE_POLICY, + ) + or DEFAULT_SILVER_MERGE_POLICY + ) await _write_plain_delta_request( load_module=host._load_silver_writer_module, request=request, diff --git a/src/memory/validation.py b/src/memory/validation.py index af8895b14a..9d6e0e3d19 100644 --- a/src/memory/validation.py +++ b/src/memory/validation.py @@ -8,11 +8,11 @@ from typing import Any from memory.notes import ( + NOTE_READ_TIMEOUT_SECONDS, extract_markdown_headings, normalize_text_key, parse_markdown_note, parse_markdown_note_metadata, - NOTE_READ_TIMEOUT_SECONDS, ) from memory.resources import ( CATALOG_DIR, diff --git a/tests/architecture/test_adapter_contracts.py b/tests/architecture/test_adapter_contracts.py index c2290dd7f1..b5489ca1fb 100644 --- a/tests/architecture/test_adapter_contracts.py +++ b/tests/architecture/test_adapter_contracts.py @@ -20,13 +20,11 @@ import shutil import subprocess from concurrent.futures import ThreadPoolExecutor -from importlib import import_module from pathlib import Path from unittest.mock import AsyncMock, MagicMock import pytest -from bioetl.domain.ports import FilterableDataSourcePort ADAPTER_MIXIN_CANONICAL_FILES = frozenset( { diff --git a/tests/architecture/test_application_services_lazy_facade_governance.py b/tests/architecture/test_application_services_lazy_facade_governance.py index 9f3e870ef7..91af5c4492 100644 --- a/tests/architecture/test_application_services_lazy_facade_governance.py +++ b/tests/architecture/test_application_services_lazy_facade_governance.py @@ -202,7 +202,9 @@ def _run_command_with_stdout_file( start_time = time.time() # Reset for kill timeout if killed and (time.time() - start_time > kill_timeout): process.terminate() - raise OSError(f"Command timed out after {timeout}s and failed to terminate: {' '.join(command)}") + raise OSError( + f"Command timed out after {timeout}s and failed to terminate: {' '.join(command)}" + ) time.sleep(poll_interval) completed = subprocess.CompletedProcess( diff --git a/tests/architecture/test_composite_dq_externalization.py b/tests/architecture/test_composite_dq_externalization.py index 2d2da99e07..92e9cd6ab5 100644 --- a/tests/architecture/test_composite_dq_externalization.py +++ b/tests/architecture/test_composite_dq_externalization.py @@ -113,10 +113,10 @@ def test_external_composite_dq_bundle_is_not_threshold_only( f"Composite DQ config must declare non-empty required_fields: {external_path}" ) assert ( - isinstance(field_validations, list) - and field_validations - or isinstance(cross_field_validations, list) - and cross_field_validations + (isinstance(field_validations, list) + and field_validations) + or (isinstance(cross_field_validations, list) + and cross_field_validations) ), ( "Composite DQ config must declare field or cross-field validation " f"bundles: {external_path}" diff --git a/tests/architecture/test_deprecation_warnings.py b/tests/architecture/test_deprecation_warnings.py index d34c8216d2..43f69f228e 100644 --- a/tests/architecture/test_deprecation_warnings.py +++ b/tests/architecture/test_deprecation_warnings.py @@ -54,9 +54,9 @@ def test_deprecation_warning_ignores_are_not_hidden_in_test_modules() -> None: def test_runner_assembly_has_no_deprecated_fsm_bootstrap_warning() -> None: """Composite runner assembly should require explicit FSM helper injection.""" - source = (ROOT / Path( - "src/bioetl/composition/bootstrap/runtime/runner_assembly.py" - )).read_text(encoding="utf-8") + source = ( + ROOT / Path("src/bioetl/composition/bootstrap/runtime/runner_assembly.py") + ).read_text(encoding="utf-8") assert ( "Creating CompositePipelineRunner without fsm_state_helper is deprecated" not in source @@ -66,14 +66,12 @@ def test_runner_assembly_has_no_deprecated_fsm_bootstrap_warning() -> None: def test_composite_application_services_do_not_reintroduce_legacy_aliases() -> None: """Composite application helpers should expose canonical service names only.""" - fsm_source = (ROOT / Path("src/bioetl/application/composite/fsm_helper.py")).read_text( - encoding="utf-8" - ) + fsm_source = ( + ROOT / Path("src/bioetl/application/composite/fsm_helper.py") + ).read_text(encoding="utf-8") dedup_source = ( ROOT / Path("src/bioetl/application/composite/deduplication.py") - ).read_text( - encoding="utf-8" - ) + ).read_text(encoding="utf-8") assert "class FSMStateHelper(" not in fsm_source assert '"FSMStateHelper"' not in fsm_source diff --git a/tests/helpers/__init__.py b/tests/helpers/__init__.py index 2092f61050..cd438f134b 100644 --- a/tests/helpers/__init__.py +++ b/tests/helpers/__init__.py @@ -27,8 +27,8 @@ "assert_check_artifacts_passes_for_fresh_outputs", "assert_cli_succeeded", "assert_process_succeeded", - "assert_router_python_command", "assert_repeated_core_output_bytes_are_stable", + "assert_router_python_command", "assert_written_core_artifacts_are_deterministic", "repo_root", "run_main_in_process", diff --git a/tests/integration/_consolidation_suite_support.py b/tests/integration/_consolidation_suite_support.py index 5c450ce7fe..6b7f33fd85 100644 --- a/tests/integration/_consolidation_suite_support.py +++ b/tests/integration/_consolidation_suite_support.py @@ -27,7 +27,7 @@ def patch_quarantine_adapter_for_cached_fixture_replay( ) -> None: """Avoid quarantine-delta side effects during cached fixture replays.""" - async def _write_many_without_delta(self, records): # noqa: ANN001 + async def _write_many_without_delta(self, records): stored = getattr(self, "_test_quarantine_records", []) stored.extend([self._normalize_record(record) for record in records]) self._test_quarantine_records = stored diff --git a/tests/integration/ci/reproducibility_contract_support.py b/tests/integration/ci/reproducibility_contract_support.py index 185c851f9d..376294e11a 100644 --- a/tests/integration/ci/reproducibility_contract_support.py +++ b/tests/integration/ci/reproducibility_contract_support.py @@ -41,7 +41,7 @@ def __init__(self) -> None: self._items: dict[str, list[object]] = {} def append(self, entry: object) -> None: - manifest_id = getattr(entry, "manifest_id") + manifest_id = entry.manifest_id self._items.setdefault(manifest_id, []).append(entry) def list_entries(self, manifest_id: str) -> tuple[object, ...]: diff --git a/tests/integration/determinism/test_reproducibility_determinism_gate.py b/tests/integration/determinism/test_reproducibility_determinism_gate.py index bc17a9ff9f..7c592a954e 100644 --- a/tests/integration/determinism/test_reproducibility_determinism_gate.py +++ b/tests/integration/determinism/test_reproducibility_determinism_gate.py @@ -33,11 +33,19 @@ def _stable_manifest_payload(payload: dict) -> dict: "replay_capability": payload.get("replay_capability"), "launch_context": { key: payload.get("launch_context", {}).get(key) - for key in ("exact_replay", "execution_context", "required_persistence_profile") + for key in ( + "exact_replay", + "execution_context", + "required_persistence_profile", + ) }, "runtime_config": { key: payload.get("runtime_config", {}).get(key) - for key in ("exact_replay", "execution_context", "required_persistence_profile") + for key in ( + "exact_replay", + "execution_context", + "required_persistence_profile", + ) }, "code_provenance": { "contract_ref": payload["code_provenance"]["contract_ref"], @@ -65,8 +73,15 @@ async def test_consolidation_determinism_replay_guard( tmp_path: Path, monkeypatch: pytest.MonkeyPatch, ) -> None: - first_manifest, second_manifest, first_effective, second_effective, first_run_id, second_run_id = ( - await run_tracked_fixture_replay_pair(tmp_path=tmp_path, monkeypatch=monkeypatch) + ( + first_manifest, + second_manifest, + first_effective, + second_effective, + first_run_id, + second_run_id, + ) = await run_tracked_fixture_replay_pair( + tmp_path=tmp_path, monkeypatch=monkeypatch ) assert first_manifest["run_id"] != second_manifest["run_id"] @@ -76,7 +91,10 @@ async def test_consolidation_determinism_replay_guard( assert first_manifest["replay_capability"] == "exact_replay_supported" assert second_manifest["replay_capability"] == "exact_replay_supported" - assert first_manifest["execution_fingerprint"] == second_manifest["execution_fingerprint"] + assert ( + first_manifest["execution_fingerprint"] + == second_manifest["execution_fingerprint"] + ) assert first_manifest["launch_context"]["exact_replay"] is True assert second_manifest["launch_context"]["exact_replay"] is True @@ -98,9 +116,9 @@ async def test_consolidation_determinism_replay_guard( first_manifest["code_provenance"]["dq_contract_compatibility_hash"] == second_manifest["code_provenance"]["dq_contract_compatibility_hash"] ) - assert _canonical_manifest_fingerprint(first_manifest) == _canonical_manifest_fingerprint( - second_manifest - ) + assert _canonical_manifest_fingerprint( + first_manifest + ) == _canonical_manifest_fingerprint(second_manifest) assert first_effective["artifact_id"] == second_effective["artifact_id"] evidence_dir = tmp_path / "reports" / "reproducibility" diff --git a/tests/integration/idempotency/test_reproducibility_idempotency_gate.py b/tests/integration/idempotency/test_reproducibility_idempotency_gate.py index afe9c04345..483ab2c2db 100644 --- a/tests/integration/idempotency/test_reproducibility_idempotency_gate.py +++ b/tests/integration/idempotency/test_reproducibility_idempotency_gate.py @@ -7,7 +7,9 @@ import pytest -from tests.integration._consolidation_suite_support import run_tracked_fixture_replay_pair +from tests.integration._consolidation_suite_support import ( + run_tracked_fixture_replay_pair, +) pytestmark = [ pytest.mark.integration, @@ -19,8 +21,15 @@ async def test_consolidation_idempotency_contract_guard( tmp_path: Path, monkeypatch: pytest.MonkeyPatch, ) -> None: - first_manifest, second_manifest, first_effective, second_effective, _, _ = ( - await run_tracked_fixture_replay_pair(tmp_path=tmp_path, monkeypatch=monkeypatch) + ( + first_manifest, + second_manifest, + first_effective, + second_effective, + _, + _, + ) = await run_tracked_fixture_replay_pair( + tmp_path=tmp_path, monkeypatch=monkeypatch ) assert first_manifest["run_id"] != second_manifest["run_id"] @@ -36,11 +45,13 @@ async def test_consolidation_idempotency_contract_guard( assert isinstance(source_refs_second, list) and source_refs_second assert len(source_refs_first) == len(source_refs_second) == 1 assert ( - source_refs_first[0].get("provider") == source_refs_second[0].get("provider") + source_refs_first[0].get("provider") + == source_refs_second[0].get("provider") == "chembl" ) assert ( - source_refs_first[0].get("entity") == source_refs_second[0].get("entity") + source_refs_first[0].get("entity") + == source_refs_second[0].get("entity") == "activity" ) assert ( @@ -69,7 +80,9 @@ async def test_consolidation_idempotency_contract_guard( == first_manifest["code_provenance"]["effective_config_artifact_id"] ) - contract_path = tmp_path / "reports" / "reproducibility" / "tracked_fixture_idempotency.json" + contract_path = ( + tmp_path / "reports" / "reproducibility" / "tracked_fixture_idempotency.json" + ) contract_path.parent.mkdir(parents=True, exist_ok=True) contract_path.write_text( json.dumps( diff --git a/tests/integration/infrastructure/storage/test_silver_writer.py b/tests/integration/infrastructure/storage/test_silver_writer.py index 1a25c34aa8..9bd8677fba 100644 --- a/tests/integration/infrastructure/storage/test_silver_writer.py +++ b/tests/integration/infrastructure/storage/test_silver_writer.py @@ -27,7 +27,7 @@ class RecordingLogger: def __init__(self) -> None: self.events: list[tuple[str, str, dict[str, object]]] = [] - def bind(self, **_kwargs: object) -> "RecordingLogger": + def bind(self, **_kwargs: object) -> RecordingLogger: return self def info(self, event: str, **kwargs: object) -> None: diff --git a/tests/integration/pipelines/base.py b/tests/integration/pipelines/base.py index 19cae90c19..da9890b381 100644 --- a/tests/integration/pipelines/base.py +++ b/tests/integration/pipelines/base.py @@ -274,7 +274,9 @@ def create_runner( """ # Load config via factory (it handles loading) # But we might want to override some values (e.g. limit, or sinks) - from bioetl.infrastructure.config.pipeline_config_api import load_pipeline_config + from bioetl.infrastructure.config.pipeline_config_api import ( + load_pipeline_config, + ) pipeline_config = load_pipeline_config(factory.pipeline_name) diff --git a/tests/integration/test_dashboard_collapsed_rows.py b/tests/integration/test_dashboard_collapsed_rows.py index 1bb999cbcb..adef9f60aa 100644 --- a/tests/integration/test_dashboard_collapsed_rows.py +++ b/tests/integration/test_dashboard_collapsed_rows.py @@ -1,6 +1,5 @@ """Integration tests for Grafana dashboard collapsed row policy.""" -from pathlib import Path import pytest diff --git a/tests/integration/test_dashboard_critical_panels_have_actionable_links.py b/tests/integration/test_dashboard_critical_panels_have_actionable_links.py index f02616ac56..f2e164d00c 100644 --- a/tests/integration/test_dashboard_critical_panels_have_actionable_links.py +++ b/tests/integration/test_dashboard_critical_panels_have_actionable_links.py @@ -1,6 +1,5 @@ """Integration tests for critical panel actionable links.""" -from pathlib import Path import pytest diff --git a/tests/integration/test_dashboard_no_data_policy.py b/tests/integration/test_dashboard_no_data_policy.py index a8b8bfc917..71434f4e4e 100644 --- a/tests/integration/test_dashboard_no_data_policy.py +++ b/tests/integration/test_dashboard_no_data_policy.py @@ -1,6 +1,5 @@ """Integration tests for Grafana dashboard no-data/unknown policy.""" -from pathlib import Path import pytest diff --git a/tests/integration/test_dashboard_panel_titles.py b/tests/integration/test_dashboard_panel_titles.py index cde64ddf04..6d415752ea 100644 --- a/tests/integration/test_dashboard_panel_titles.py +++ b/tests/integration/test_dashboard_panel_titles.py @@ -1,6 +1,5 @@ """Integration tests for Grafana dashboard panel title conventions.""" -from pathlib import Path import pytest diff --git a/tests/integration/test_dashboard_panel_visualization_standards.py b/tests/integration/test_dashboard_panel_visualization_standards.py index 7aaa615a90..db3351eded 100644 --- a/tests/integration/test_dashboard_panel_visualization_standards.py +++ b/tests/integration/test_dashboard_panel_visualization_standards.py @@ -1,6 +1,5 @@ """Integration tests for Grafana dashboard panel-type visualization standards.""" -from pathlib import Path import pytest diff --git a/tests/integration/test_dashboard_scope_reset_tooltips.py b/tests/integration/test_dashboard_scope_reset_tooltips.py index 713260c816..4cc5f9a79c 100644 --- a/tests/integration/test_dashboard_scope_reset_tooltips.py +++ b/tests/integration/test_dashboard_scope_reset_tooltips.py @@ -1,6 +1,5 @@ """Integration tests for Grafana dashboard scope reset tooltip format.""" -from pathlib import Path import pytest diff --git a/tests/integration/test_dashboard_units_decimals.py b/tests/integration/test_dashboard_units_decimals.py index 5cf9168753..999d01795c 100644 --- a/tests/integration/test_dashboard_units_decimals.py +++ b/tests/integration/test_dashboard_units_decimals.py @@ -1,6 +1,5 @@ """Integration tests for Grafana dashboard units and decimals consistency.""" -from pathlib import Path import pytest diff --git a/tests/smoke/test_smoke.py b/tests/smoke/test_smoke.py index 71bc5c9f84..eb16acd716 100644 --- a/tests/smoke/test_smoke.py +++ b/tests/smoke/test_smoke.py @@ -91,7 +91,7 @@ class TestCoreImports: def test_domain_imports(self) -> None: """Domain layer imports successfully.""" - from bioetl.domain import config, ports, types # noqa: F401 + from bioetl.domain import config, ports, types assert config is not None assert ports is not None @@ -99,31 +99,31 @@ def test_domain_imports(self) -> None: def test_application_imports(self) -> None: """Application layer imports successfully.""" - from bioetl.application.core import base_transformer # noqa: F401 - from bioetl.application.core import runner # noqa: F401 + from bioetl.application.core import base_transformer + from bioetl.application.core import runner assert base_transformer is not None assert runner is not None def test_infrastructure_imports(self) -> None: """Infrastructure layer imports successfully.""" - from bioetl.infrastructure.storage import bronze_writer # noqa: F401 - from bioetl.infrastructure.storage import silver_writer # noqa: F401 + from bioetl.infrastructure.storage import bronze_writer + from bioetl.infrastructure.storage import silver_writer assert bronze_writer is not None assert silver_writer is not None def test_composition_imports(self) -> None: """Composition layer imports successfully.""" - from bioetl.composition import bootstrap # noqa: F401 - from bioetl.composition import entrypoints # noqa: F401 + from bioetl.composition import bootstrap + from bioetl.composition import entrypoints assert bootstrap is not None assert entrypoints is not None def test_cli_imports(self) -> None: """CLI module imports successfully.""" - import bioetl.interfaces.cli # noqa: F401 + import bioetl.interfaces.cli assert bioetl.interfaces.cli is not None diff --git a/tests/testing_support/neo4j_memory_sync.py b/tests/testing_support/neo4j_memory_sync.py index 2dfadbd23d..30b177fd51 100644 --- a/tests/testing_support/neo4j_memory_sync.py +++ b/tests/testing_support/neo4j_memory_sync.py @@ -2,9 +2,9 @@ from __future__ import annotations -from tests.testing_support.neo4j_memory_sync_support.audit_runtime_and_transport import * # noqa: F401,F403 -from tests.testing_support.neo4j_memory_sync_support.paths_and_connection import * # noqa: F401,F403 -from tests.testing_support.neo4j_memory_sync_support.snapshot_core import * # noqa: F401,F403 -from tests.testing_support.neo4j_memory_sync_support.snapshot_invariants import * # noqa: F401,F403 -from tests.testing_support.neo4j_memory_sync_support.snapshot_topology import * # noqa: F401,F403 -from tests.testing_support.neo4j_memory_sync_support.targeted_apply_and_filters import * # noqa: F401,F403 +from tests.testing_support.neo4j_memory_sync_support.audit_runtime_and_transport import * # noqa: F403 +from tests.testing_support.neo4j_memory_sync_support.paths_and_connection import * # noqa: F403 +from tests.testing_support.neo4j_memory_sync_support.snapshot_core import * # noqa: F403 +from tests.testing_support.neo4j_memory_sync_support.snapshot_invariants import * # noqa: F403 +from tests.testing_support.neo4j_memory_sync_support.snapshot_topology import * # noqa: F403 +from tests.testing_support.neo4j_memory_sync_support.targeted_apply_and_filters import * # noqa: F403 diff --git a/tests/testing_support/neo4j_memory_sync_support/audit_runtime_and_transport.py b/tests/testing_support/neo4j_memory_sync_support/audit_runtime_and_transport.py index 5081aa6465..47598e3bb9 100644 --- a/tests/testing_support/neo4j_memory_sync_support/audit_runtime_and_transport.py +++ b/tests/testing_support/neo4j_memory_sync_support/audit_runtime_and_transport.py @@ -2,7 +2,7 @@ from __future__ import annotations -from .common import * # noqa: F401,F403 +from .common import * # noqa: F403 def test_live_managed_count_helpers_batch_labels_and_relations() -> None: diff --git a/tests/testing_support/neo4j_memory_sync_support/common.py b/tests/testing_support/neo4j_memory_sync_support/common.py index 6299bf60f1..8a5d4480a9 100644 --- a/tests/testing_support/neo4j_memory_sync_support/common.py +++ b/tests/testing_support/neo4j_memory_sync_support/common.py @@ -2,62 +2,17 @@ from __future__ import annotations -import io import tempfile from copy import deepcopy -from datetime import date from functools import lru_cache from pathlib import Path -from urllib import error import pytest from scripts.memory.sync import ( - DEFAULT_INGEST_WAVE, - DEFAULT_LEGACY_PRUNE_LABELS, - DEFAULT_MANAGED_BY, GraphNode, GraphRelation, GraphSnapshot, - Neo4jHttpClient, - NodeKey, - _add_complexity_analysis_surfaces, - _build_diff_entries, - _critical_analysis_audit_issues, - _delete_managed_wave_nodes_statement, - _docs_drift_sources, - _duplication_analysis_config, - _ensure_targeted_apply_prerequisites, - _family_for_path, - _filtered_snapshot, - _git_last_commit_age_days_bulk, - _live_managed_node_counts, - _live_managed_relation_counts, - _load_memory_mapping, - _memory_mapping_path, - _merge_storage_layer_config, - _missing_managed_anchor_keys, - _node_statement, - _normalization_evidence_statements, - _normalize_docs_repo_reference, - _prune_legacy_unmanaged_nodes_statement, - _prune_stale_nodes_statement, - _prune_stale_relations_statement, - _relation_statement, - _reset_managed_relations_statement, - _storage_ref_from_output_path, - _targeted_apply_external_anchor_keys, - _targeted_apply_required_anchor_labels, - _verify_expected_group_counts, - _workflow_quality_gates, - apply_normalization_evidence_only, - build_audit_report, - build_fast_analysis_audit_report, build_snapshot, - derive_http_uri, - main, - resolve_neo4j_connection, - snapshot_invariant_issues, - sync_snapshot, ) pytestmark = [pytest.mark.memory, pytest.mark.timeout(180)] diff --git a/tests/testing_support/neo4j_memory_sync_support/paths_and_connection.py b/tests/testing_support/neo4j_memory_sync_support/paths_and_connection.py index c1b435947e..8ba0125b2d 100644 --- a/tests/testing_support/neo4j_memory_sync_support/paths_and_connection.py +++ b/tests/testing_support/neo4j_memory_sync_support/paths_and_connection.py @@ -4,7 +4,7 @@ import scripts.memory.sync as memory_sync_module -from .common import * # noqa: F401,F403 +from .common import * # noqa: F403 def test_memory_mapping_path_prefers_canonical_graph_mapping(tmp_path: Path) -> None: diff --git a/tests/testing_support/neo4j_memory_sync_support/snapshot_core.py b/tests/testing_support/neo4j_memory_sync_support/snapshot_core.py index 061f6a1cee..7a5f046ceb 100644 --- a/tests/testing_support/neo4j_memory_sync_support/snapshot_core.py +++ b/tests/testing_support/neo4j_memory_sync_support/snapshot_core.py @@ -6,7 +6,7 @@ import pytest -from .common import * # noqa: F401,F403 +from .common import * # noqa: F403 pytestmark = pytest.mark.skipif( sys.platform.startswith("win"), diff --git a/tests/testing_support/neo4j_memory_sync_support/snapshot_invariants.py b/tests/testing_support/neo4j_memory_sync_support/snapshot_invariants.py index bd041a1d6e..565d6fbead 100644 --- a/tests/testing_support/neo4j_memory_sync_support/snapshot_invariants.py +++ b/tests/testing_support/neo4j_memory_sync_support/snapshot_invariants.py @@ -6,7 +6,7 @@ import pytest -from .common import * # noqa: F401,F403 +from .common import * # noqa: F403 pytestmark = pytest.mark.skipif( sys.platform.startswith("win"), diff --git a/tests/testing_support/neo4j_memory_sync_support/snapshot_topology.py b/tests/testing_support/neo4j_memory_sync_support/snapshot_topology.py index fe3143a2e9..faea34d83a 100644 --- a/tests/testing_support/neo4j_memory_sync_support/snapshot_topology.py +++ b/tests/testing_support/neo4j_memory_sync_support/snapshot_topology.py @@ -6,7 +6,7 @@ import pytest -from .common import * # noqa: F401,F403 +from .common import * # noqa: F403 pytestmark = pytest.mark.skipif( sys.platform.startswith("win"), diff --git a/tests/testing_support/neo4j_memory_sync_support/targeted_apply_and_filters.py b/tests/testing_support/neo4j_memory_sync_support/targeted_apply_and_filters.py index 43b21805d1..540055e4b4 100644 --- a/tests/testing_support/neo4j_memory_sync_support/targeted_apply_and_filters.py +++ b/tests/testing_support/neo4j_memory_sync_support/targeted_apply_and_filters.py @@ -6,7 +6,7 @@ import pytest -from .common import * # noqa: F401,F403 +from .common import * # noqa: F403 pytestmark = pytest.mark.skipif( sys.platform.startswith("win"), diff --git a/tests/unit/application/composite/test_runner_enrichment_fsm.py b/tests/unit/application/composite/test_runner_enrichment_fsm.py index 36fe5a7596..a66f19dc17 100644 --- a/tests/unit/application/composite/test_runner_enrichment_fsm.py +++ b/tests/unit/application/composite/test_runner_enrichment_fsm.py @@ -15,7 +15,6 @@ import pytest from bioetl.application.composite.runner_pkg import ( - CompositePipelineRunner, CompositeRuntimeConfig, ) from bioetl.application.composite.runner_pkg.runner_helpers import ( diff --git a/tests/unit/application/composite/test_runner_fsm_logging.py b/tests/unit/application/composite/test_runner_fsm_logging.py index 6202b7ea41..54051cb97f 100644 --- a/tests/unit/application/composite/test_runner_fsm_logging.py +++ b/tests/unit/application/composite/test_runner_fsm_logging.py @@ -13,7 +13,6 @@ import pytest from bioetl.application.composite.runner_pkg import ( - CompositePipelineRunner, CompositeRuntimeConfig, ) from bioetl.domain.composite.result import EnrichmentResult diff --git a/tests/unit/application/core/normalization_test_support.py b/tests/unit/application/core/normalization_test_support.py index 0c717e72b8..cea451a97b 100644 --- a/tests/unit/application/core/normalization_test_support.py +++ b/tests/unit/application/core/normalization_test_support.py @@ -2,27 +2,16 @@ from __future__ import annotations -import json -from typing import TYPE_CHECKING, cast -from unittest.mock import MagicMock +from typing import TYPE_CHECKING import pytest -from hypothesis import HealthCheck, given, settings -from hypothesis import strategies as st -from bioetl.application.core.config import ( - ContentHashPolicyByVersion, - ContentHashVersionPolicy, -) -from bioetl.application.core.pre_silver_record import PreSilverRecord from bioetl.application.core.record_normalization_processor import ( - NormalizationContractError, RecordNormalizationProcessor, ) -from bioetl.domain.transformations import generate_content_hash if TYPE_CHECKING: - from bioetl.domain.context import PipelineContext + pass @pytest.mark.unit diff --git a/tests/unit/application/core/test_record_normalization_core.py b/tests/unit/application/core/test_record_normalization_core.py index f593d7bdb9..ac092f3f74 100644 --- a/tests/unit/application/core/test_record_normalization_core.py +++ b/tests/unit/application/core/test_record_normalization_core.py @@ -3,7 +3,7 @@ from __future__ import annotations # ruff: noqa: F403,F405 -from tests.unit.application.core.normalization_test_support import * # noqa: F403,F405 +from tests.unit.application.core.normalization_test_support import * def test_normalize_record_applies_identifier_date_json_and_hash_rules() -> None: diff --git a/tests/unit/application/core/test_record_normalization_hash_invariants.py b/tests/unit/application/core/test_record_normalization_hash_invariants.py index 25ebcc6c50..edf9062964 100644 --- a/tests/unit/application/core/test_record_normalization_hash_invariants.py +++ b/tests/unit/application/core/test_record_normalization_hash_invariants.py @@ -3,7 +3,7 @@ from __future__ import annotations # ruff: noqa: F403,F405 -from tests.unit.application.core.normalization_test_support import * # noqa: F403,F405 +from tests.unit.application.core.normalization_test_support import * def test_profile_auto_resolves_for_chembl_publication_similarity() -> None: diff --git a/tests/unit/application/core/test_record_normalization_next_wave.py b/tests/unit/application/core/test_record_normalization_next_wave.py index 67790df602..0446067bb3 100644 --- a/tests/unit/application/core/test_record_normalization_next_wave.py +++ b/tests/unit/application/core/test_record_normalization_next_wave.py @@ -3,7 +3,7 @@ from __future__ import annotations # ruff: noqa: F403,F405 -from tests.unit.application.core.normalization_test_support import * # noqa: F403,F405 +from tests.unit.application.core.normalization_test_support import * def test_pubchem_compound_profile_stabilizes_numeric_and_smiles_equivalence() -> None: diff --git a/tests/unit/application/core/test_record_normalization_profiles.py b/tests/unit/application/core/test_record_normalization_profiles.py index 34f870f10d..55dbeb5b8a 100644 --- a/tests/unit/application/core/test_record_normalization_profiles.py +++ b/tests/unit/application/core/test_record_normalization_profiles.py @@ -3,7 +3,7 @@ from __future__ import annotations # ruff: noqa: F403,F405 -from tests.unit.application.core.normalization_test_support import * # noqa: F403,F405 +from tests.unit.application.core.normalization_test_support import * def test_profile_auto_resolves_for_chembl_activity() -> None: diff --git a/tests/unit/application/core/test_record_processor.py b/tests/unit/application/core/test_record_processor.py index 0e6e969dd3..e60f3c685a 100644 --- a/tests/unit/application/core/test_record_processor.py +++ b/tests/unit/application/core/test_record_processor.py @@ -3,19 +3,14 @@ from __future__ import annotations import asyncio -from pathlib import Path from unittest.mock import AsyncMock, MagicMock from uuid import uuid4 import pytest -from bioetl.application.core.config import RecordProcessorConfig from bioetl.application.core.pre_silver_record import PreSilverRecord from bioetl.application.core.pipeline_services import PipelineService -from bioetl.application.core.record_processor import RecordProcessor from bioetl.domain.config import TableConfig -from bioetl.domain.context import PipelineContext -from bioetl.domain.error_classifier import ErrorClassifier from bioetl.domain.exceptions import DataQualityError, DataQualityThresholdError from bioetl.domain.ports import MetricsPort from bioetl.domain.types import BatchID, ValidationResult diff --git a/tests/unit/application/pipelines/test_chembl_transformers.py b/tests/unit/application/pipelines/test_chembl_transformers.py index a093d89e2f..5dfee754ca 100644 --- a/tests/unit/application/pipelines/test_chembl_transformers.py +++ b/tests/unit/application/pipelines/test_chembl_transformers.py @@ -902,14 +902,10 @@ async def test_transform_projects_target_xref_source_aliases( else "unknown" ) assert result["target_xref_go_function"] == ( - expected_value - if expected_field == "target_xref_go_function" - else "unknown" + expected_value if expected_field == "target_xref_go_function" else "unknown" ) assert result["target_xref_go_process"] == ( - expected_value - if expected_field == "target_xref_go_process" - else "unknown" + expected_value if expected_field == "target_xref_go_process" else "unknown" ) assert result["target_xref_reactome_ids"] == ( expected_value @@ -925,7 +921,9 @@ async def test_transform_projects_target_xref_source_aliases( assert {source_db, "UnknownSource"} <= {str(v) for v in raw_sources} @pytest.mark.asyncio - async def test_transform_deduplicates_and_orders_target_xrefs(self, transformer, mock_context): + async def test_transform_deduplicates_and_orders_target_xrefs( + self, transformer, mock_context + ): """Projection should deduplicate projected values and preserve first-seen order.""" record = { "target_id": "CHEMBL240", diff --git a/tests/unit/application/pipelines/test_pubchem_transformer.py b/tests/unit/application/pipelines/test_pubchem_transformer.py index 8c7de01b6c..2c2391185b 100644 --- a/tests/unit/application/pipelines/test_pubchem_transformer.py +++ b/tests/unit/application/pipelines/test_pubchem_transformer.py @@ -8,7 +8,6 @@ import pytest -from bioetl.application.core.base_transformer import FilteredOutError from bioetl.application.core.pre_silver_record import PreSilverRecord from bioetl.application.core.record_normalization_processor import ( RecordNormalizationProcessor, diff --git a/tests/unit/application/services/test_metadata_coordinator_lineage.py b/tests/unit/application/services/test_metadata_coordinator_lineage.py index e50fb67e1e..6d91d6a059 100644 --- a/tests/unit/application/services/test_metadata_coordinator_lineage.py +++ b/tests/unit/application/services/test_metadata_coordinator_lineage.py @@ -11,7 +11,7 @@ pytestmark = pytest.mark.unit -from tests.unit.application.services.test_metadata_coordinator import * # noqa: F401,F403 +from tests.unit.application.services.test_metadata_coordinator import * # noqa: F403 from tests.unit.application.services.test_metadata_coordinator import _FIXED_TIME diff --git a/tests/unit/application/services/test_metadata_coordinator_runtime_profiles.py b/tests/unit/application/services/test_metadata_coordinator_runtime_profiles.py index 3903c0ed8a..521a2a474e 100644 --- a/tests/unit/application/services/test_metadata_coordinator_runtime_profiles.py +++ b/tests/unit/application/services/test_metadata_coordinator_runtime_profiles.py @@ -14,7 +14,7 @@ pytestmark = pytest.mark.unit -from tests.unit.application.services.test_metadata_coordinator import * # noqa: F401,F403 +from tests.unit.application.services.test_metadata_coordinator import * # noqa: F403 from tests.unit.application.services.test_metadata_coordinator import _FIXED_TIME diff --git a/tests/unit/application/services/test_run_manifest_inspection_diff.py b/tests/unit/application/services/test_run_manifest_inspection_diff.py index 8295af2a17..e78e8e8c11 100644 --- a/tests/unit/application/services/test_run_manifest_inspection_diff.py +++ b/tests/unit/application/services/test_run_manifest_inspection_diff.py @@ -14,7 +14,7 @@ ) from bioetl.domain.control_plane import RunSourceRef from bioetl.domain.types import RunID, RunType -from tests.unit.application.services.test_run_manifest_inspection_service import * # noqa: F401,F403 +from tests.unit.application.services.test_run_manifest_inspection_service import * # noqa: F403 from tests.unit.application.services.test_run_manifest_inspection_service import ( _InMemoryRunManifestStore, _make_manifest, diff --git a/tests/unit/application/services/test_run_manifest_inspection_verify.py b/tests/unit/application/services/test_run_manifest_inspection_verify.py index 887356d94d..4792aeb9b1 100644 --- a/tests/unit/application/services/test_run_manifest_inspection_verify.py +++ b/tests/unit/application/services/test_run_manifest_inspection_verify.py @@ -29,7 +29,7 @@ pytestmark = pytest.mark.unit -from tests.unit.application.services.test_run_manifest_inspection_service import * # noqa: F401,F403 +from tests.unit.application.services.test_run_manifest_inspection_service import * # noqa: F403 from tests.unit.application.services.test_run_manifest_inspection_service import ( _InMemoryEffectiveConfigArtifactStore, _InMemoryRunLedgerStore, diff --git a/tests/unit/composition/bootstrap/runtime/test_composite_control_plane_builder.py b/tests/unit/composition/bootstrap/runtime/test_composite_control_plane_builder.py index af93137e73..79f4952984 100644 --- a/tests/unit/composition/bootstrap/runtime/test_composite_control_plane_builder.py +++ b/tests/unit/composition/bootstrap/runtime/test_composite_control_plane_builder.py @@ -25,7 +25,6 @@ RunManifest, RunSourceRef, ) -from bioetl.domain.normalization import compute_input_snapshot_identity_fingerprint _VALID_RUN_ID = "12345678-1234-5678-1234-567812345678" _VALID_SHA256_A = "a" * 64 diff --git a/tests/unit/composition/factories/pipeline/test_registry_consistency.py b/tests/unit/composition/factories/pipeline/test_registry_consistency.py index 72125f33db..4411264b1b 100644 --- a/tests/unit/composition/factories/pipeline/test_registry_consistency.py +++ b/tests/unit/composition/factories/pipeline/test_registry_consistency.py @@ -222,7 +222,9 @@ def test_all_registered_pipelines_have_config_files( self, test_registry: PipelineRegistry ) -> None: """Verify each registered pipeline has a corresponding YAML config file.""" - from bioetl.infrastructure.config.pipeline_config_api import load_pipeline_config + from bioetl.infrastructure.config.pipeline_config_api import ( + load_pipeline_config, + ) registered = test_registry.list_pipelines() diff --git a/tests/unit/composition/runtime_builders/runner_builder_test_support.py b/tests/unit/composition/runtime_builders/runner_builder_test_support.py index 33aadc29a5..e521d04516 100644 --- a/tests/unit/composition/runtime_builders/runner_builder_test_support.py +++ b/tests/unit/composition/runtime_builders/runner_builder_test_support.py @@ -2,23 +2,15 @@ from __future__ import annotations -import json from contextlib import nullcontext from pathlib import Path from types import SimpleNamespace from unittest.mock import MagicMock, patch from uuid import uuid4 -import pytest from bioetl.composition.runtime_builders import _run_manifest_builder_policy -from bioetl.composition.observability import ObservabilityBundle -from bioetl.composition.runtime_builders import inputs_resolver from bioetl.composition.runtime_builders import runner_builder -from bioetl.composition.runtime_builders import runner_control_plane_assembly -from bioetl.composition.runtime_builders._runner_builder_orchestration import ( - attach_runner_control_plane_collaborators, -) from bioetl.composition.services import versioning from bioetl.domain.ports import PipelineCreateRunnerRequest from bioetl.domain.ports.noop import NoOpAudit, NoOpTracing diff --git a/tests/unit/composition/runtime_builders/test_runner_builder_basics.py b/tests/unit/composition/runtime_builders/test_runner_builder_basics.py index b160941967..09b26c78b8 100644 --- a/tests/unit/composition/runtime_builders/test_runner_builder_basics.py +++ b/tests/unit/composition/runtime_builders/test_runner_builder_basics.py @@ -7,7 +7,7 @@ resolve_runner_factory_wiring, ) -from tests.unit.composition.runtime_builders.runner_builder_test_support import * # noqa: F403,F405 +from tests.unit.composition.runtime_builders.runner_builder_test_support import * def test_handle_control_plane_setup_returns_effective_manifest_profile( diff --git a/tests/unit/composition/runtime_builders/test_runner_builder_profiles.py b/tests/unit/composition/runtime_builders/test_runner_builder_profiles.py index 3c34c5a13f..27aebeaf73 100644 --- a/tests/unit/composition/runtime_builders/test_runner_builder_profiles.py +++ b/tests/unit/composition/runtime_builders/test_runner_builder_profiles.py @@ -3,7 +3,7 @@ from __future__ import annotations # ruff: noqa: F403,F405 -from tests.unit.composition.runtime_builders.runner_builder_test_support import * # noqa: F403,F405 +from tests.unit.composition.runtime_builders.runner_builder_test_support import * def test_build_pipeline_runner_rejects_exact_replay_without_materialized_cached_bronze_batches( diff --git a/tests/unit/composition/runtime_builders/test_runner_builder_runtime_modes.py b/tests/unit/composition/runtime_builders/test_runner_builder_runtime_modes.py index 831ed995a7..4a043cc434 100644 --- a/tests/unit/composition/runtime_builders/test_runner_builder_runtime_modes.py +++ b/tests/unit/composition/runtime_builders/test_runner_builder_runtime_modes.py @@ -3,7 +3,7 @@ from __future__ import annotations # ruff: noqa: F403,F405 -from tests.unit.composition.runtime_builders.runner_builder_test_support import * # noqa: F403,F405 +from tests.unit.composition.runtime_builders.runner_builder_test_support import * def test_strict_runner_collaborator_attachment_requires_run_ledger_service() -> None: diff --git a/tests/unit/composition/test_observability_contract.py b/tests/unit/composition/test_observability_contract.py index 158504cd03..e356b2f632 100644 --- a/tests/unit/composition/test_observability_contract.py +++ b/tests/unit/composition/test_observability_contract.py @@ -24,7 +24,7 @@ ) from bioetl.domain.ports.noop import NoOpAudit, NoOpMetrics, NoOpTracing from tests.helpers.deterministic_ids import deterministic_uuid -from tests.helpers.git_index_scan import git_grep_fixed, git_tracked_files +from tests.helpers.git_index_scan import git_grep_fixed pytestmark = pytest.mark.repo_backed diff --git a/tests/unit/domain/hash_policy/test_hash_policy_stability.py b/tests/unit/domain/hash_policy/test_hash_policy_stability.py index 95c265788c..035cb3d146 100644 --- a/tests/unit/domain/hash_policy/test_hash_policy_stability.py +++ b/tests/unit/domain/hash_policy/test_hash_policy_stability.py @@ -8,7 +8,6 @@ from pathlib import Path from typing import Any -import pytest import yaml from bioetl.domain.transformations import generate_content_hash diff --git a/tests/unit/infrastructure/storage/test_silver_writer_dq_metrics.py b/tests/unit/infrastructure/storage/test_silver_writer_dq_metrics.py index 1a6a96f865..e4e71cfc73 100644 --- a/tests/unit/infrastructure/storage/test_silver_writer_dq_metrics.py +++ b/tests/unit/infrastructure/storage/test_silver_writer_dq_metrics.py @@ -486,7 +486,6 @@ async def test_finalize_silver_write_result_reuses_delta_version( """Finalize path should read Delta version once and pass it to metadata.""" from datetime import UTC, datetime - from bioetl.domain.medallion import SilverWriteMode from bioetl.domain.value_objects.dq_metrics import BatchDQMetrics from bioetl.infrastructure.storage.silver_writer import SilverWriter diff --git a/tests/unit/interfaces/cli/commands/test_commands_package.py b/tests/unit/interfaces/cli/commands/test_commands_package.py index e64386fb97..a303150a44 100644 --- a/tests/unit/interfaces/cli/commands/test_commands_package.py +++ b/tests/unit/interfaces/cli/commands/test_commands_package.py @@ -47,7 +47,7 @@ def test_commands_package_rejects_export_support_after_command_module_import() - import bioetl.interfaces.cli.commands.export # noqa: F401 with pytest.raises(AttributeError, match="export_support"): - getattr(commands_package, "export_support") + commands_package.export_support def test_commands_package_rejects_inspection_output_after_command_module_import() -> ( @@ -57,4 +57,4 @@ def test_commands_package_rejects_inspection_output_after_command_module_import( import bioetl.interfaces.cli.commands.diagnostics # noqa: F401 with pytest.raises(AttributeError, match="inspection_output"): - getattr(commands_package, "inspection_output") + commands_package.inspection_output diff --git a/tests/unit/interfaces/cli/test_wrapper_families.py b/tests/unit/interfaces/cli/test_wrapper_families.py index 7780fdb2be..8ebca56605 100644 --- a/tests/unit/interfaces/cli/test_wrapper_families.py +++ b/tests/unit/interfaces/cli/test_wrapper_families.py @@ -101,7 +101,7 @@ def test_cli_package_root_removed_create_pipeline_runner_export_fails_fast() -> assert "create_pipeline_runner" not in module.__all__ assert "create_pipeline_runner" not in dir(module) with pytest.raises(AttributeError): - getattr(module, "create_pipeline_runner") + module.create_pipeline_runner @pytest.mark.unit @@ -112,7 +112,7 @@ def test_cli_package_root_removed_validate_pipeline_name_export_fails_fast() -> assert "validate_pipeline_name" not in module.__all__ assert "validate_pipeline_name" not in dir(module) with pytest.raises(AttributeError): - getattr(module, "validate_pipeline_name") + module.validate_pipeline_name @pytest.mark.unit diff --git a/tests/unit/interfaces/http/test_health_server.py b/tests/unit/interfaces/http/test_health_server.py index fd97308fc8..f4bb6e9d2b 100644 --- a/tests/unit/interfaces/http/test_health_server.py +++ b/tests/unit/interfaces/http/test_health_server.py @@ -5,14 +5,12 @@ import asyncio import json from collections.abc import AsyncGenerator -from datetime import UTC, datetime, timedelta from unittest.mock import AsyncMock, MagicMock -from uuid import uuid4 import pytest import pytest_asyncio -from bioetl.domain.types import HealthStatus, RunType +from bioetl.domain.types import HealthStatus from bioetl.interfaces.http.health_server import HealthServer from bioetl.interfaces.http.types import HealthResponse diff --git a/tests/unit/interfaces/http/test_http_init.py b/tests/unit/interfaces/http/test_http_init.py index 4d62bc36df..0bc3d33224 100644 --- a/tests/unit/interfaces/http/test_http_init.py +++ b/tests/unit/interfaces/http/test_http_init.py @@ -16,6 +16,6 @@ def test_http_package_root_exposes_no_convenience_exports() -> None: assert "HealthResponse" not in dir(module) assert "HealthServer" not in dir(module) with pytest.raises(AttributeError): - getattr(module, "HealthResponse") + module.HealthResponse with pytest.raises(AttributeError): - getattr(module, "HealthServer") + module.HealthServer diff --git a/tests/unit/memory/test_tooling.py b/tests/unit/memory/test_tooling.py index f3e0e6b223..96d36ff388 100644 --- a/tests/unit/memory/test_tooling.py +++ b/tests/unit/memory/test_tooling.py @@ -4,10 +4,6 @@ import importlib import json -import os -import shutil -import subprocess -import sys from collections.abc import Callable from datetime import UTC, datetime from pathlib import Path