gabriel / muse public
feat patch task/wire-load-json-file #1 / 2
AI Agent gabriel · 161 days ago · Apr 18, 2026 · Diff

feat: add load_json_file and now_utc_iso to muse.core._types

Add load_json_file(path) as the canonical helper for reading JSON files, and now_utc_iso() for UTC ISO 8601 timestamps. Both previously existed only in the working tree. Add tests for both functions in test_core_types.py.

sha256:51cc2dd5d101e109a88c0b5e67bf775b54f5b1a52a848b42826711fef61a16d4 sha
+21 ~6 symbols
sha256:dff67554daef8e1e12da6bf9f741c4f77244cd40dfdb4c15d40603e769d2d3d7 snapshot
+21
symbols added
~6
symbols modified
0
dead code introduced
Semantic Changes 27 symbols
~ muse/core/_types.py .py 4 symbols added, 1 symbol modified
+ Any import import Any L14–14
+ datetime import import datetime L12–12
+ load_json_file function function load_json_file L207–227
+ now_utc_iso function function now_utc_iso L194–204
~ tests/test_core_types.py .py 17 symbols added, 5 symbols modified
+ TestLoadJsonFile class class TestLoadJsonFile L283–322
+ test_loads_list method method test_loads_list L292–296
+ test_loads_nested method method test_loads_nested L298–302
+ test_loads_valid_json method method test_loads_valid_json L286–290
+ test_returns_none_for_empty_file method method test_returns_none_for_empty_file L313–316
+ test_returns_none_for_invalid_json method method test_returns_none_for_invalid_json L308–311
+ test_returns_none_for_missing_file method method test_returns_none_for_missing_file L304–306
+ test_utf8_content method method test_utf8_content L318–322
+ TestNowUtcIso class class TestNowUtcIso L247–275
+ test_iso_8601_format method method test_iso_8601_format L254–258
+ test_matches_manual_call method method test_matches_manual_call L265–270
+ test_monotonically_non_decreasing method method test_monotonically_non_decreasing L272–275
+ test_returns_string method method test_returns_string L250–252
+ test_utc_timezone method method test_utc_timezone L260–263
+ datetime import import datetime L5–5
+ load_json_file import import load_json_file L12–12
+ now_utc_iso import import now_utc_iso L12–12

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:51cc2dd5d101e109a88c0b5e67bf775b54f5b1a52a848b42826711fef61a16d4 --body "your comment"