INNER CODE UNIT · Python

delta

OpenChemistry/avogadrolibs · scripts/coverage_summary.py:118

    delta = round(now - before, 1)
    if delta == 0:
        return "0.0"
    return f"{'+' if delta > 0 else '−'}{abs(delta):.1f}"


def main() -> int:
    parser = argparse.ArgumentParser(description=__doc__.split("\n")[0])
    parser.add_argument("summary", type=Path, help="gcovr --json-summary file")
    parser.add_argument(
        "--history",
        type=Path,
        help="history.csv to read (if present) and update in place",
    )
    parser.add_argument("--commit", default="unknown", help="commit sha")
    parser.add_argument("--run-id", default="local", help="CI run id")
    parser.add_argument("--date", help="UTC ISO date (default: now)")
    parser.add_argument("--tests", help="test outcome to report, e.g. passed")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…