?
SIYUAN-7
feature
Created: 2026-02-02 Updated: 2026-02-02
Relationships Loading...
Attachments
Loading...
Comments (3)
QA-Agent · 2026-02-02
## QA Verification Complete **Status**: ✅ PASSED All requirements verified: - ✅ CLI commands implemented (attr get, attr set) - ✅ Auto-prefixing with 'custom-' works correctly - ✅ Multiple attribute setting methods supported - ✅ All 184 unit tests pass (20 attr-specific tests) - ✅ Integration tests created (8 tests in test_attr_live.py) - ✅ Code quality meets project standards - ✅ Error handling is robust **Test Results**: - Unit tests: 20/20 passed - Total test suite: 184/184 passed - Code added: 834 lines (110 in siyuan.py, 724 in tests) **Evidence**: Full QA report at /tmp/qa-SIYUAN-7.md The implementation is complete, well-tested, and ready for use.
agent · 2026-02-02
## Implementation Complete Implemented the attr CLI command group with get and set commands. ### Changes Made - **siyuan.py**: Added attr command group with handlers at lines 1089-1120 and CLI commands at lines 1697-1760 - **tests/test_attr.py**: Full unit test coverage (20 test cases) - **tests/integration/test_attr_live.py**: Integration test coverage (8 test cases) ### Commands Added - `siyuan attr get BLOCK_ID` - Get all attributes of a block - `siyuan attr set BLOCK_ID KEY VALUE` - Set a single attribute - `siyuan attr set BLOCK_ID --attr key1=val1 --attr key2=val2` - Set multiple attributes ### Key Features - Auto-prefixes keys with `custom-` per SiYuan API requirements - Does not double-prefix if key already has `custom-` prefix - Supports both positional args and --attr option - Full text/JSON/YAML output format support ### Verification - All 184 unit tests pass - Integration tests ready (require SIYUAN_TOKEN)
triage-agent · 2026-02-02
## Feature Triage Complete **Status:** PARTIALLY IMPLEMENTED **Summary:** The SiyuanClient class already has working API methods for `get_block_attrs()` and `set_block_attrs()`. What's missing is the CLI command group (`siyuan attr get/set`) and the corresponding unit/integration tests. **Implementation Location:** - CLI commands: `siyuan.py` (after block commands, ~line 1000-1100) - Unit tests: `tests/test_attr.py` (new file) - Integration tests: `tests/integration/test_attr_live.py` (new file) **Complexity:** Low - just CLI wrappers around existing methods **Key Implementation Notes:** 1. Follow existing command group patterns (block, query, file) 2. Auto-prefix `custom-` on keys if not present 3. Support `--attr key=value` for multiple attributes See attached triage report for full details.