Skip to content
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

show usage of merging snippets into docs #320

Merged
merged 17 commits into from
May 15, 2021
Merged

show usage of merging snippets into docs #320

merged 17 commits into from
May 15, 2021

Conversation

SimonCropp
Copy link
Contributor

@SimonCropp SimonCropp commented Apr 26, 2021

Thoughts on making the code snippets in your readme being extracted from real code? I find it makes it easier to maintain docs. Changes in you api are automatically kept in sync and snippets can be taken from tests to ensure those snippet behave as expected

Docs https://github.com/SimonCropp/MarkdownSnippets

I also added a GH Action https://github.com/SimonCropp/MarkdownSnippets/blob/master/docs/github-action.md This can be useful to ensure md docs are in sync when .source files are edited online, and without needing to re-generate the docs locally.

@SimonCropp SimonCropp requested a review from a team as a code owner April 26, 2021 03:41
@codecov-commenter
Copy link

codecov-commenter commented Apr 26, 2021

Codecov Report

Merging #320 (0e18f67) into main (46316fa) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #320   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           16        16           
  Lines         1129      1128    -1     
=========================================
- Hits          1129      1128    -1     
Flag Coverage Δ
linux 100.00% <ø> (ø)
macos 100.00% <ø> (ø)
windows 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ClientInterception/HttpClientInterceptorOptions.cs 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 46316fa...0e18f67. Read the comment docs.

@martincostello
Copy link
Member

This looks cool 👀

I remember way back that I saw the .NET notebook/try.dot.net (or something, I forget) that showed having code samples based on real code that checked it compiled and passed that would have been nice to have. You're right, all the examples in the README are pretty much just taken from the Examples test class (or vice-versa).

I'll take a proper look at it later today 👍

@martincostello martincostello added documentation Documentation for the use of the library. enhancement A change that enhances existing functionality or documentation. labels Apr 26, 2021
@martincostello
Copy link
Member

/cc @slang25 - could be good for justeattakeaway/JustSaying#902 too.

Copy link
Member

@martincostello martincostello left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor comments, but otherwise this looks great!

.github/workflows/on-push-do-docs.yml Show resolved Hide resolved
.github/workflows/on-push-do-docs.yml Show resolved Hide resolved
.github/workflows/on-push-do-docs.yml Outdated Show resolved Hide resolved
.github/workflows/on-push-do-docs.yml Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
mdsnippets.json Outdated Show resolved Hide resolved
samples/SampleApp.Tests/HttpServerFixture.cs Outdated Show resolved Hide resolved
tests/HttpClientInterception.Tests/Examples.cs Outdated Show resolved Hide resolved
tests/HttpClientInterception.Tests/Examples.cs Outdated Show resolved Hide resolved
@martincostello martincostello added this to the v3.1.1 milestone May 15, 2021
@martincostello martincostello merged commit f84b6e1 into justeattakeaway:main May 15, 2021
@SimonCropp SimonCropp deleted the mdsnippets branch May 15, 2021 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation for the use of the library. enhancement A change that enhances existing functionality or documentation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants