Repository navigation
Documented example outputs match the code; lower-level examples model loan proceeds - #59
Merged
Merged
Conversation
…rint Refs #56 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d principal The midlevel, builders, and primitives examples now book debt proceeds as a share of each dated cash construction draw. The midlevel and builders examples amortize the proceeds plus capitalized interest, as the EnergyProject compiler does, instead of overnight cost times the debt fraction. Refs #56 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #56 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dylanjm
approved these changes
Oct 27, 2026
dylanjm
left a comment
Collaborator
There was a problem hiding this comment.
I like the automated testing of examples.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #56 (part 1: the numbers, the missing loan proceeds, and the regression test. A follow-up docs PR closes it.)
What changed
tests/test_documented_outputs.pydocs/getting_started.mdcode block as subprocesses.getting_started.md.slowmarker._midlevel,_builders,_primitives: the examples now book construction debt proceeds asDEBT_FRACTIONof each dated cash construction draw, as theEnergyProjectcompiler does._midleveland_builders: these now amortize the proceeds plus capitalized interest, asEnergyProjectdoes. Before, they amortizedOVERNIGHT_CAPEX * DEBT_FRACTION.EnergyProjectto the dollar on construction, proceeds and debt service, for both the flat and bell profiles._primitiveshas neither escalation nor construction interest, so its principal stays $300M.getting_started.mdexpected output are regenerated. Only the numbers changed.Result changes
Library code is unchanged. Only the examples and the documented values move.
_simpleNPV_fullNPV_midlevelNPV_buildersNPV_primitivesNPVOther printed values:
_midlevel_builders_primitivesDeferred to the follow-up docs PR (#56 part 2)
examples/README.md"Output comparison" to match the code's assumptions. For example,_midlevelat $345M against_fullat $337M should be explained by spend profile, depreciation and debt-service dating.treatment="capitalize", which they use, but not for"pay"._midleveland_buildersstill date debt service at year-end, whileEnergyProjectcalendarizes it.🤖 Generated with Claude Code