-
Notifications
You must be signed in to change notification settings - Fork 1
Test Python docstring in markdown files #38
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
Conversation
And experiment with tested snippets
docs/expressions.md
Outdated
## Snippet test | ||
|
||
```python | ||
--8<-- "tests/test_cli.py:map" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kevinlacaille here's my first snippet test!
@@ -68,6 +68,9 @@ nav: | |||
- "Topics": 'topics' | |||
|
|||
markdown_extensions: | |||
- pymdownx.inlinehilite | |||
- pymdownx.snippets: | |||
dedent_subsections: True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extension configuration here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, maybe this is what I'm missing! I'll have to give this a shot.
tests/test_cli.py
Outdated
) | ||
# --8<-- [end:map] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's the snippet
@kevinlacaille looks good to me! |
--8<-- [end:reduce] | ||
""".splitlines()[ | ||
2 | ||
].strip() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kevinlacaille I've got some tested CLI snippets! It's a little tortured, I'm working against Python to keep quotes out of the snippet section, but it works!
This is really helpful, I'm absolutely going to refer to this in planetlabs/planet-client-python#941 - thanks! |
And experiment with tested snippets