Repository navigation
Document UnitPlan, its tasks and CalendarContext in the API reference - #506
Merged
Merged
Conversation
The unit plan's classes had no API page and their parameters were not documented, so test_api_docstrings failed. Each parameter of UnitPlan, Prices, the preventive tasks, Inspection, Upgrade, Restoration and ImperfectRepair, and of UnitPlan's methods, is now documented with its meaning and unit, linking the guide for the longer rules. A new API page, "Unit plans", lists them; the schedule page gains CalendarContext, whose methods (and schedule.Condition's) are documented too. No behaviour changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6RpnXB87vwhYETeh7ihtA
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.
Summary
test_api_docstringsfailed ondev:UnitPlan,Prices,AgePolicy,BlockPolicy,ConditionPolicy,CalendarReplacement,AtShutdown,Inspection,Upgrade,RestorationandImperfectRepairhad no API page, and their parameters (and those ofUnitPlan's methods, plus three taskspec()methods with no docstring) were not documented.docs/api/unit-plans.md, added to the mkdocs nav and the API index.schedule.CalendarContextwas not on any API page, though a docstring already cross-references it. It is now on the schedule page, and itsduty_plan,model_time,rule_timesanddiagramparameters are documented.schedule.Conditionwas missingstale, thetimesofschedule()and a docstring fordescribe(); all three are added.DutySchedule,Services,DowntimeRiskResultand thevaluemodule's names already passed.No behaviour changes.
Type of change
Checklist
test_api_docstringsnow passes.test_api_docstrings.py+test_help.py(740 passed),test_messages.py(41 passed), and the doctests of the three touched modules (4 passed)CHANGELOG.mdupdated under[Unreleased]Notes for reviewers
mkdocs build --strictpasses locally, and the new anchors render (repyability.UnitPlan.*,repyability.schedule.CalendarContext). Many of therepyability.schedulenames that came earlier (Rate,Roster,UsageForecast, ...) still have undocumented parameters. The test doesn't cover them, because it only walks the top-level__all__, so I left them out of scope.Generated by Claude Code