doc: test code/config snippets in docs#882
Merged
Emantor merged 14 commits intolabgrid-project:masterfrom Jan 14, 2022
Merged
Conversation
Signed-off-by: Bastian Krause <bst@pengutronix.de>
Signed-off-by: Bastian Krause <bst@pengutronix.de>
This way doctest is able to test the config and code examples from the documentation. Signed-off-by: Bastian Krause <bst@pengutronix.de>
The example code in the documentation expects the example configs/python files in the current working directory. Signed-off-by: Bastian Krause <bst@pengutronix.de>
When adding test setup blocks, we need some imports over and over again. Let's import them here to keep the test setup blocks as small as possible. Signed-off-by: Bastian Krause <bst@pengutronix.de>
In an initial version of the patch series, the strategy was called DockerShellStrategy. But that was changed before the PR was merged. So adjust the documentation to the actual existing DockerStrategy. Signed-off-by: Bastian Krause <bst@pengutronix.de>
Signed-off-by: Bastian Krause <bst@pengutronix.de>
…works Better refer to a working strategy example. This way we can also drop this untestable code block. Signed-off-by: Bastian Krause <bst@pengutronix.de>
Signed-off-by: Bastian Krause <bst@pengutronix.de>
Signed-off-by: Bastian Krause <bst@pengutronix.de>
Signed-off-by: Bastian Krause <bst@pengutronix.de>
Signed-off-by: Bastian Krause <bst@pengutronix.de>
Signed-off-by: Bastian Krause <bst@pengutronix.de>
This allows testing of the GraphStrategy graph rendering example in the development documentation. If graphviz is not installed, the corresponding test is skipped. Signed-off-by: Bastian Krause <bst@pengutronix.de>
Codecov Report
@@ Coverage Diff @@
## master #882 +/- ##
======================================
Coverage 57.0% 57.0%
======================================
Files 148 148
Lines 10973 10973
======================================
Hits 6260 6260
Misses 4713 4713 Continue to review full report at Codecov.
|
Emantor
approved these changes
Jan 11, 2022
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.
Description
In the past, a lot of code snippets in the documentation did not work (see #877). Use sphinx' doctest extension to test code snippets and configurations where feasible.
While at it, fix the documentation of the docker strategy.
Checklist
Fixes #301