Skip to content

API and Python: four members for the elements of a Problem (#1546, pull request 2 of 3) - #1718

Merged
terrycox merged 5 commits into
devfrom
issue-1546-api
Nov 29, 2026
Merged

terrycox merged 5 commits into
devfrom
issue-1546-api

Conversation

@StoryCADBot

Copy link
Copy Markdown

Issue: #1546
Design: https://github.com/storybuilder-org/storybuilder-miscellaneous/blob/november-2026-filing/devdocs/issue-1546-design.md

This is the StoryCAD half of pull request 2 of the 3 that the design gives for issue 1546 (parts 15.2 and 15.4, tasks 15 and 17). The other half, the MCP tools of part 15.3 and task 16, is a pull request in the repo StoryCADAPI. This pull request does not close the issue.

What it does

  • Four new members on IStoryCADAPI and StoryCADApi, each a kernel function: AddElementToProblem, RemoveElementFromProblem, GetElementsOnNoBeat and MoveBeatElement. Each calls the OutlineService method that pull request 1 added. GetElementsOnNoBeat leaves out an element that is in the trash.
  • The help text of ApplyBeatSheetToProblem and LoadBeatSheet says that the elements of the old beats stay in the Problem, on no beat.
  • The Python bindings get the four functions add_element_to_problem, remove_element_from_problem, get_elements_on_no_beat and move_beat_element, a test for each, and their lines in docs/For Developers/Python_Bindings.md.

What was checked

  • Unit tests: 2,543 tests, 2,527 passed, 14 skipped. 2 failed on the local machine only, CheckDotEnvFile and CheckDoppler, because the worktree has no StoryCADTests/.env. 8 tests are new, in StoryCADAPITests, and they include the two the design names: DeleteBeat_KeepsElementOnNoBeat and GetElement_Problem_HasStructureElements.
  • pytest on the Python bindings, against a publish of StoryCADLib for net10.0-desktop: 66 passed.
  • The MCP tools of the other half were built against this branch: 108 tests passed in StoryCADMcp.Tests.

Where the code goes beyond the words of the design

  • Two tests more than one for each member: AddElementToProblem_UnknownProblem_ReturnsFailure and MoveBeatElement_IndexOutOfRange_ReturnsFailure.
  • get_elements_on_no_beat in Python returns a list of ElementSummary, the class the bindings already have. The design does not give the type.

🤖 Generated with Claude Code

terrycox and others added 5 commits November 29, 2026 07:09
AddElementToProblem, RemoveElementFromProblem, GetElementsOnNoBeat and
MoveBeatElement, each on IStoryCADAPI and StoryCADApi as a kernel
function. Each calls the OutlineService method that pull request 1
added. GetElementsOnNoBeat leaves out an element that is in the trash.

The help text of ApplyBeatSheetToProblem and LoadBeatSheet says that
the elements of the old beats stay in the Problem, on no beat.

The Python bindings get the four functions, a test for each, and
their lines in the docs page.

Tests: 8 new tests in StoryCADAPITests. The suite has 2,543 tests:
2,527 pass, 14 are skipped, and CheckDotEnvFile and CheckDoppler fail
because the worktree has no .env file. pytest: 66 passed.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@claude

claude Bot commented Nov 29, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@terrycox
terrycox merged commit 3d98d1a into dev Nov 29, 2026
11 checks passed
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