We have a number of "in_container" scripts written in Bash, They are doing a number of houseekeeping stuff but since we already have Python 3.7+ inside the CI image, we could modularise them more and make them run from external and simplify entrypoint_ci (for example separate script for tests).
#
#
from __future__ import annotations
import re
import shlex
import subprocess
import sys
from contextlib import contextmanager
from pathlib import Path
from typing import NamedTuple
import rich_click as click
from rich.console import Console
console = Console(width=400, color_system="standard")
click.rich_click.COLOR_SYSTEM = "standard"
AIRFLOW_SOURCE_DIR = Path(__file__).resolve().parents[1]
DIST_FOLDER = Path("/dist")
@contextmanager
def ci_group(group_name: str, github_actions: bool):