refactor: replace diagram doctests with directives and add pre-commit hook#590
Merged
refactor: replace diagram doctests with directives and add pre-commit hook#590
Conversation
… hook - Replace inline doctests in docs/diagram.md and README.md with plain python code blocks and statemachine-diagram Sphinx directives - Add generate-images pre-commit hook to regenerate README PNG via CLI - Remove TestReadmeImageGeneration (side-effect replaced by hook) - Delete obsolete PNG images no longer referenced by docs - Update release notes to use directive instead of static image
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #590 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 38 38
Lines 4555 4555
Branches 724 724
=========================================
Hits 4555 4555
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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
docs/diagram.mdandREADME.mdwith plain Python code blocks andstatemachine-diagramSphinx directives — removes side-effect image generation from tests/docsgenerate-imagespre-commit hook that regenerates the README traffic light PNG via the existing CLI (python -m statemachine.contrib.diagram), triggered only when diagram source or the example machine changeTestReadmeImageGenerationtest class (replaced by the hook)docs/releases/1.0.1.mdto use the Sphinx directive instead of a static image reference