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

Function meta_to_jsonable

tools/docs_and_notebooks_check.py:577–582  ·  view source on GitHub ↗

Return JSON-serializable metadata (dates become ISO strings). This prevents json.dumps() from failing when writing .ipynb files.

(meta: DLCMeta)

Source from the content-addressed store, hash-verified

575
576
577def meta_to_jsonable(meta: DLCMeta) -> dict:
578 """
579 Return JSON-serializable metadata (dates become ISO strings).
580 This prevents json.dumps() from failing when writing .ipynb files.
581 """
582 return meta.model_dump(mode="json", exclude_none=True)
583
584
585def compute_days_since(d: date | None, today: date) -> int | None:

Callers 2

update_filesFunction · 0.85
normalize_notebooksFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected