Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: don't skip main component when creating SSP with author jinja #1834

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions trestle/core/ssp_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,6 @@ def get_control_response(
header = f'Implementation for part {label}'
md_writer.new_header(1, title=header)
for comp_name, comp_response in response_per_component.items():
if comp_name == SSP_MAIN_COMP_NAME:
continue
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The difference between this and the pre - #1358 behavior is that Component: This System will be output for each part now, where it was skipped earlier.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there/should there be a corresponding test case?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I converted this to a draft. I dug in on the existing test some more and realized that it's trading one problem for another: instead of missing This System statements for controls with parts, it's now doubling up This System statements for controls without parts...

I'll give it another shot along with a test that fails before the change and passes afterwards.

prose, rules, status = comp_response
if show_comp:
SSPMarkdownWriter._write_component_prompt(
Expand Down
Loading