Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
586 changes: 286 additions & 300 deletions configs/quality/scripts_inventory_manifest.json

Large diffs are not rendered by default.

29 changes: 28 additions & 1 deletion configs/quality/scripts_lifecycle_registry.json
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,33 @@
"decision": "shared_helper_module",
"review_by": "2026-07-15",
"next_step": "Retain as the context-aware Neo4j audit connection helper while deployment and live-audit runbooks still reference src/tools/neo4j_audit.py; fold it into a broader canonical ops helper surface only if the audit workflow is consolidated."
},
"scripts/ops/observability/grafana/render_all_grafana_screenshots.ps1": {
"status": "orphan",
"rationale": "To be removed",
"review_date": "2026-05-28",
"owner": "team-observability",
"decision": "pending_removal",
"next_step": "remove file",
"review_by": "2026-06-28"
},
"scripts/ops/observability/grafana/setup_grafana_screenshot_runtime.sh": {
"status": "orphan",
"rationale": "To be removed",
"review_date": "2026-05-28",
"owner": "team-observability",
"decision": "pending_removal",
"next_step": "remove file",
"review_by": "2026-06-28"
},
"scripts/ops/setup.sh": {
"status": "supporting",
"rationale": "Local environment setup",
"review_date": "2026-05-28",
"owner": "team-dev-tools",
"decision": "maintain",
"next_step": "none",
"review_by": "2026-06-28"
}
}
}
}
Binary file not shown.
Binary file not shown.
24 changes: 24 additions & 0 deletions scripts/engineering/qa/check_quality_exemptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,27 @@
sys.stderr.write(f"ERROR: canonical script not found: {script}\n")
raise SystemExit(2)
runpy.run_path(str(script), run_name="__main__")

def main(args: list[str] | None = None) -> int:
script = _canonical_script()
if not script.exists():
sys.stderr.write(f"ERROR: canonical script not found: {script}\n")
return 2

# Save original argv
original_argv = sys.argv.copy()
try:
# Patch sys.argv to pass arguments to runpy correctly
if args is not None:
sys.argv = [str(script)] + args
else:
sys.argv = [str(script)] + sys.argv[1:]

globals_dict = runpy.run_path(str(script), run_name="__main__")

Check warning on line 50 in scripts/engineering/qa/check_quality_exemptions.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove the unused local variable "globals_dict".

See more on https://sonarcloud.io/project/issues?id=SatoryKono_BioactivityDataAcquisition&issues=AZ5xFuAPJ9fmzXDll_ei&open=AZ5xFuAPJ9fmzXDll_ei&pullRequest=4738

return 0
except SystemExit as e:

Check failure on line 53 in scripts/engineering/qa/check_quality_exemptions.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Reraise this exception to stop the application as the user expects

See more on https://sonarcloud.io/project/issues?id=SatoryKono_BioactivityDataAcquisition&issues=AZ5xFuAPJ9fmzXDll_ej&open=AZ5xFuAPJ9fmzXDll_ej&pullRequest=4738
return e.code if isinstance(e.code, int) else 0
finally:
# Restore argv
sys.argv = original_argv
122 changes: 61 additions & 61 deletions scripts/engineering/repo/catalog.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
schema_version: '1.0'
canonical_roots:
- scripts/ai
- scripts/ai/codex
Expand All @@ -17,18 +16,6 @@ canonical_roots:
- scripts/ops/migrations/active
- scripts/ops/migrations/oneoff
- scripts/diagrams
policies:
canonical_invocation_required_for_new_integrations: true
no_scripts_in_root: true
root_allowlist:
- docs_parity_check.py
- documentation_governance_check.py
- docker-setup.ps1
- docker-setup.sh
- generate_adr_registry.py
- generate_test_github_issues.py
- optimized_test_runner.py
- test_selection_strategy.py
entrypoints:
package_console_scripts:
bioetl: src/bioetl/interfaces/cli/main.py
Expand All @@ -37,73 +24,86 @@ entrypoints:
scripts.engineering.repo: scripts/engineering/repo/__main__.py
scripts.schema: scripts/schema/__main__.py
workflow_surfaces:
- .github/workflows/tests.yml
- .github/workflows/contract-tests.yml
lifecycle:
manifest_path: configs/quality/scripts_inventory_manifest.json
registry_path: configs/quality/scripts_lifecycle_registry.json
non_active_statuses:
- unknown
- orphan
- legacy
required_registry_fields:
- owner
- decision
- next_step
- review_by
deprecated_decisions:
- deprecate
deprecated_required_fields:
- replacement
- sunset_date
enforce_known_registry_paths: true
active_script_count_max: 357
active_script_count_policy: fail-fast-no-growth
active_script_count_owner: '@bioetl-platform'
active_script_count_review_by: '2026-09-30'
- .github/workflows/tests.yml
- .github/workflows/contract-tests.yml
groups:
ai:
path: scripts/ai
purpose: Canonical AI-facing setup, launcher, and runtime-adjacent tooling
baselines:
path: scripts/engineering/baselines
purpose: Baseline artifacts consumed by engineering quality gates
ci:
path: scripts/engineering/ci
purpose: CI orchestration, resiliency runners, periodic quality reports
common:
path: scripts/engineering/common
purpose: Shared helpers used by engineering and adjacent script domains
data:
path: scripts/ops/data
purpose: Data integrity and storage-level operational checks
dev:
path: scripts/engineering/dev
purpose: Local developer setup and test utilities
qa:
path: scripts/engineering/qa
purpose: Architecture and quality-gate checks, debt telemetry
repo:
path: scripts/engineering/repo
purpose: Repository hygiene and inventory governance tooling
diagnostics:
path: scripts/engineering/diagnostics
purpose: Manual diagnostics and investigation helpers
baselines:
path: scripts/engineering/baselines
purpose: Baseline artifacts consumed by engineering quality gates
common:
path: scripts/engineering/common
purpose: Shared helpers used by engineering and adjacent script domains
diagrams:
path: scripts/diagrams
purpose: Diagram lint/render/quality pipeline
docs:
path: scripts/docs
purpose: Documentation lint/build/drift/maintenance
schema:
path: scripts/schema
purpose: Schema generation and validation contracts
data:
path: scripts/ops/data
purpose: Data integrity and storage-level operational checks
ops:
path: scripts/ops
purpose: Active platform/ops automation, launchers, runtime, and maintenance tooling
migrations_active:
path: scripts/ops/migrations/active
purpose: Active repeatable migration scripts
migrations_oneoff:
path: scripts/ops/migrations/oneoff
purpose: One-time migration scripts with explicit sunset
diagrams:
path: scripts/diagrams
purpose: Diagram lint/render/quality pipeline
ops:
path: scripts/ops
purpose: Active platform/ops automation, launchers, runtime, and maintenance tooling
qa:
path: scripts/engineering/qa
purpose: Architecture and quality-gate checks, debt telemetry
repo:
path: scripts/engineering/repo
purpose: Repository hygiene and inventory governance tooling
schema:
path: scripts/schema
purpose: Schema generation and validation contracts
lifecycle:
active_script_count_max: 360
active_script_count_owner: '@bioetl-platform'
active_script_count_policy: fail-fast-no-growth
active_script_count_review_by: '2026-09-30'
deprecated_decisions:
- deprecate
deprecated_required_fields:
- replacement
- sunset_date
enforce_known_registry_paths: true
manifest_path: configs/quality/scripts_inventory_manifest.json
non_active_statuses:
- unknown
- orphan
- legacy
registry_path: configs/quality/scripts_lifecycle_registry.json
required_registry_fields:
- owner
- decision
- next_step
- review_by
policies:
canonical_invocation_required_for_new_integrations: true
no_scripts_in_root: true
root_allowlist:
- docs_parity_check.py
- documentation_governance_check.py
- docker-setup.ps1
- docker-setup.sh
- generate_adr_registry.py
- generate_test_github_issues.py
- optimized_test_runner.py
- test_selection_strategy.py
schema_version: '1.0'
64 changes: 64 additions & 0 deletions scripts/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
#!/usr/bin/env bash
# ==============================================================================
# scripts/setup.sh — скрипт настройки окружения BioETL
#
# Использование:
# ./scripts/setup.sh # Полная настройка
# ./scripts/setup.sh --quick # Быстрая установка (без линтеров/тестов)
# ./scripts/setup.sh --skip-tests # Запуск линтеров без тестов
# ./scripts/setup.sh --force # Пересоздание .venv
# ==============================================================================

set -e

QUICK=0
SKIP_TESTS=0
FORCE=0

for arg in "$@"; do
case $arg in
--quick)
QUICK=1
;;
--skip-tests)
SKIP_TESTS=1
;;
--force)
FORCE=1
;;
*)
echo "Неизвестный аргумент: $arg"
exit 1
;;
esac
done

if [ "$FORCE" -eq 1 ]; then

Check failure on line 36 in scripts/setup.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use '[[' instead of '[' for conditional tests. The '[[' construct is safer and more feature-rich.

See more on https://sonarcloud.io/project/issues?id=SatoryKono_BioactivityDataAcquisition&issues=AZ5rk5GsQDX3_TnQXu1I&open=AZ5rk5GsQDX3_TnQXu1I&pullRequest=4738
echo "Удаление .venv..."
rm -rf .venv
fi

echo "Установка зависимостей..."
make install

if [ -f ".venv/bin/activate" ]; then

Check failure on line 44 in scripts/setup.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use '[[' instead of '[' for conditional tests. The '[[' construct is safer and more feature-rich.

See more on https://sonarcloud.io/project/issues?id=SatoryKono_BioactivityDataAcquisition&issues=AZ5wqKamtVYIe4Q4n2uJ&open=AZ5wqKamtVYIe4Q4n2uJ&pullRequest=4738
source .venv/bin/activate
fi

if [ "$QUICK" -eq 1 ]; then

Check failure on line 48 in scripts/setup.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use '[[' instead of '[' for conditional tests. The '[[' construct is safer and more feature-rich.

See more on https://sonarcloud.io/project/issues?id=SatoryKono_BioactivityDataAcquisition&issues=AZ5rk5GsQDX3_TnQXu1J&open=AZ5rk5GsQDX3_TnQXu1J&pullRequest=4738
echo "Установка завершена (quick mode)."
exit 0
fi

echo "Запуск линтеров..."
make lint

if [ "$SKIP_TESTS" -eq 1 ]; then

Check failure on line 56 in scripts/setup.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use '[[' instead of '[' for conditional tests. The '[[' construct is safer and more feature-rich.

See more on https://sonarcloud.io/project/issues?id=SatoryKono_BioactivityDataAcquisition&issues=AZ5rk5GsQDX3_TnQXu1K&open=AZ5rk5GsQDX3_TnQXu1K&pullRequest=4738
echo "Установка завершена (тесты пропущены)."
exit 0
fi

echo "Запуск тестов..."
make test-fast

echo "Установка успешно завершена."
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
from __future__ import annotations

from bioetl.application.services.control_plane._effective_config_support import * # noqa: F403

Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
from __future__ import annotations

from bioetl.application.services.control_plane._historical_replay_certification import * # noqa: F403

Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
from __future__ import annotations

from bioetl.application.services.control_plane._historical_replay_certification_support import * # noqa: F403

Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
from __future__ import annotations

from bioetl.application.services.control_plane._ledger_identity_support import * # noqa: F403

Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
from __future__ import annotations

from bioetl.application.services.control_plane._manifest_time_support import * # noqa: F403

Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
from __future__ import annotations

from bioetl.application.services.control_plane._run_ledger_core_events import * # noqa: F403

Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
from __future__ import annotations

from bioetl.application.services.control_plane._run_ledger_entry_support import * # noqa: F403

Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
from __future__ import annotations

from bioetl.application.services.control_plane._run_ledger_rich_events import * # noqa: F403

Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
from __future__ import annotations

from bioetl.application.services.control_plane._run_manifest_diagnostics_artifact_support import * # noqa: F403

Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
from __future__ import annotations

from bioetl.application.services.control_plane._run_manifest_diagnostics_base import * # noqa: F403

Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
from __future__ import annotations

from bioetl.application.services.control_plane._run_manifest_diagnostics_base_helpers import * # noqa: F403

Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
from __future__ import annotations

from bioetl.application.services.control_plane._run_manifest_diagnostics_finalization import * # noqa: F403

Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
from __future__ import annotations

from bioetl.application.services.control_plane._run_manifest_diagnostics_replay import * # noqa: F403

Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
from __future__ import annotations

from bioetl.application.services.control_plane._run_manifest_diagnostics_replay_projection import * # noqa: F403

Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
from __future__ import annotations

from bioetl.application.services.control_plane._run_manifest_diagnostics_snapshot_support import * # noqa: F403

Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
from __future__ import annotations

from bioetl.application.services.control_plane._run_manifest_diagnostics_source_refs import * # noqa: F403

Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
from __future__ import annotations

from bioetl.application.services.control_plane._run_manifest_inspection_mixins import * # noqa: F403

Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
from __future__ import annotations

from bioetl.application.services.control_plane._run_manifest_service_mixins import * # noqa: F403

Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ async def _executor(
"source_key": result.source_key,
"reference_key": result.reference_key,
"source_keys": list(request.source_keys or (request.source_key,)),
"reference_keys": list(
request.reference_keys or (request.reference_key,)
),
"reference_keys": list(request.reference_keys or (request.reference_key,)),
"action": result.action,
"nulls_equal": request.nulls_equal,
"scanned_rows": result.scanned_rows,
Expand Down
4 changes: 3 additions & 1 deletion src/bioetl/composition/bootstrap/cli/health.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
create_health_server_dependencies,
create_health_service,
)
from bioetl.composition.bootstrap.assembly.checkpoint import bootstrap_checkpoint_adapter
from bioetl.composition.bootstrap.assembly.checkpoint import (
bootstrap_checkpoint_adapter,
)
from bioetl.composition.bootstrap.cli.noop import create_noop_logger
from bioetl.composition.bootstrap.cli.run_manifest import (
bootstrap_run_manifest_service,
Expand Down
Loading
Loading