Skip to content

Remove debug self.save() from build_kbase_genome_from_api - #25

Merged
cshenry merged 1 commit into
cshenry:mainfrom
jplfaria:remove-debug-save
Mar 26, 2026
Merged

Remove debug self.save() from build_kbase_genome_from_api#25
cshenry merged 1 commit into
cshenry:mainfrom
jplfaria:remove-debug-save

Conversation

@jplfaria

Copy link
Copy Markdown
Contributor

Summary

  • Remove self.save("test_genome", genome) debug call from BVBRCUtils.build_kbase_genome_from_api() (line 335)
  • This call requires NotebookUtils.save() which is only available in KBase Jupyter notebooks
  • Callers outside that environment (REST APIs, CLI scripts) have to monkey-patch BVBRCUtils.save = lambda self, name, obj: None to avoid AttributeError

Context

Building the ModelSEED REST API, we call build_kbase_genome_from_api() from a FastAPI service process where NotebookUtils isn't available. Chris confirmed this save was a testing leftover and can be removed.

Test plan

  • Verify build_kbase_genome_from_api() still works without the save call
  • Existing tests should pass unchanged

This debug save requires NotebookUtils.save() which is only available
in KBase Jupyter notebooks. Callers outside that environment (e.g.,
REST APIs, CLI scripts) have to monkey-patch BVBRCUtils.save to avoid
an AttributeError.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@cshenry
cshenry merged commit 67944b2 into cshenry:main Mar 26, 2026
cshenry pushed a commit that referenced this pull request Jul 6, 2026
Adds the kbu-run Claude Code skill at src/kbutillib/harness/skills/kbu-run/SKILL.md
driving the harness loop: pull from BERIL, classify via PRD-A graduated-execution
policy reading preferences.md thresholds (defaulting to full/consult when uncertain),
choose local vs h100, run via kbu harness run, verify outputs, append DEVLOG.md,
and on success stop and prompt 'Push results back to BERIL now? (y/N)' before
pushing; on failure stop, append traceback to DEVLOG, escalate BLOCKED, edit no code.

Adds tests/harness/test_skill_bundle.py (21 tests) asserting frontmatter parses
with name=kbu-run, a 'Use when ...' description, allowed-tools=[Read,Bash], and
user-invocable:true, plus body content checks for all workflow steps (AC #25-#26-#37).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
cshenry pushed a commit that referenced this pull request Jul 20, 2026
…ule C/D)

Adds kbu king install/uninstall/status over a new vendored
kbutillib.king_install module implementing the on-disk ~/king-apps/
contract (registry.json, union-recomposed CONTEXT.md, serve-king.sh
launch wrapper), so KBUtilLib's modeling app self-installs into a local
KING session without any cross-repo dependency or edits under
~/king-stack/king/. Ships the app bundle (bundle.json + skill.md,
authored from the frozen kbu model --help surface) as package data and
wires it into pyproject package-data so a non-editable install still
carries it.

Per agent-io/prds/king-integration-apps/fullprompt.md Module C/D,
Acceptance Criteria #13-#23, #25.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants