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

Turn code samples into doctests on first page of docs #1187

Merged
merged 4 commits into from
Dec 15, 2023

Conversation

gdalle
Copy link
Contributor

@gdalle gdalle commented Dec 8, 2023

Fix #1188

In the section on caveats, the code samples are not run when the documentation is built, which means they can get outdated.
I realized that because I tried the first one (on temporary storage and it threw an error).

This PR:

  • turns the remaining code samples into doctests
  • fixes the error I spotted in one of them (a missing Reverse as the first argument to autodiff)
  • modified the test for duplicated temporary storage to circumvent Julia being more clever now

docs/src/index.md Outdated Show resolved Hide resolved
@gdalle
Copy link
Contributor Author

gdalle commented Dec 9, 2023

Also I wasn't able to build the documentation locally (see #1189), so if you have any tips I'll gladly take them

@codecov-commenter
Copy link

codecov-commenter commented Dec 11, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (7313c99) 75.39% compared to head (3f27a9d) 75.61%.
Report is 4 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1187      +/-   ##
==========================================
+ Coverage   75.39%   75.61%   +0.21%     
==========================================
  Files          35       35              
  Lines        9788     9891     +103     
==========================================
+ Hits         7380     7479      +99     
- Misses       2408     2412       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gdalle
Copy link
Contributor Author

gdalle commented Dec 12, 2023

This is good to go

docs/src/index.md Outdated Show resolved Hide resolved
@wsmoses wsmoses merged commit 617ecaf into EnzymeAD:main Dec 15, 2023
27 of 42 checks passed
@gdalle gdalle deleted the fixdocs branch December 15, 2023 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Code sample on first page of docs is broken
3 participants