MCPcopy Index your code
hub / github.com/DeepLabCut/DeepLabCut / write_github_output

Function write_github_output

tools/test_selector.py:846–868  ·  view source on GitHub ↗
(res: SelectorResult)

Source from the content-addressed store, hash-verified

844
845
846def write_github_output(res: SelectorResult) -> None:
847 out_path = os.environ.get("GITHUB_OUTPUT")
848 if not out_path:
849 raise RuntimeError("GITHUB_OUTPUT is not set")
850
851 def j(v) -> str:
852 return json.dumps(v, separators=(",", ":"), ensure_ascii=False)
853
854 selected_workflows = _enabled_lane_names(res)
855
856 with open(out_path, "a", encoding="utf-8") as f:
857 f.write(f"run_skip={str(res.lanes.skip).lower()}\n")
858 f.write(f"run_docs={str(res.lanes.docs).lower()}\n")
859 f.write(f"run_fast={str(res.lanes.fast).lower()}\n")
860 f.write(f"run_full={str(res.lanes.full).lower()}\n")
861 f.write(f"selected_workflows={j(selected_workflows)}\n")
862 f.write(f"lane_reasons={j(res.lane_reasons)}\n")
863 f.write(f"diff_mode={res.diff_mode.value}\n")
864 f.write(f"pytest_paths={j(res.pytest_paths)}\n")
865 f.write(f"functional_scripts={j(res.functional_scripts)}\n")
866 f.write(f"reasons={j(res.reasons)}\n")
867 f.write(f"changed_files={j(res.changed_files)}\n")
868 f.write(f"provenance={j(res.provenance.model_dump())}\n")
869
870
871def main(argv: Sequence[str] | None = None) -> int:

Callers 1

mainFunction · 0.85

Calls 4

_enabled_lane_namesFunction · 0.85
jFunction · 0.85
writeMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected