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

Added three tab option to sphinx directive codediff and added testing for first tab #3847

Merged
merged 1 commit into from
May 7, 2024

Conversation

chiamp
Copy link
Collaborator

@chiamp chiamp commented Apr 11, 2024

This PR does the following:

  • updated sphinx directive codediff to have the option of including an arbitrary amount of tabs
  • added testing for the first tab, since it wasn't tested before by doctest
  • added skip_test to skip doctesting for any number of tabs. This is useful for legacy code snippets that no longer work in migration guides
  • added groups to allow user to denote which code snippets should be grouped and executed together
    See the docstring for more details on how to use the codediff directive.
  • updated and added more tests to test the codediff directive (and enabled CI testing)

This is in preparation for adding an NNX tab in the haiku migration guide, for users who want to compare the differences between Haiku, Linen and NNX.


This PR does the following:

  • updated sphinx directive codediff to have the option of including a third tab (title_middle) for code diff
  • added testing for the first tab, since it wasn't tested before by doctest
  • added skip_left_doctest to skip doctesting of legacy code snippets (in the left tab) that no longer work in migration guides
  • added user option to denote whether a code snippet should executed in the left (testcode_left) or right (testcode_right) tab, or both

This is in preparation for adding an NNX tab in the haiku migration guide, for users who want to compare the differences between Haiku, Linen and NNX.

@chiamp chiamp self-assigned this Apr 11, 2024
@chiamp chiamp marked this pull request as draft April 11, 2024 18:56
@chiamp chiamp force-pushed the haiku branch 15 times, most recently from ed7eaf5 to a1617d2 Compare April 11, 2024 22:33
@chiamp chiamp changed the title updated haiku guide Added three tab option to sphinx directive codediff and added testing for first tab Apr 11, 2024
@chiamp chiamp force-pushed the haiku branch 2 times, most recently from b4da308 to 81d5bec Compare April 12, 2024 23:17
@chiamp chiamp force-pushed the haiku branch 10 times, most recently from e005f10 to 193bda2 Compare April 24, 2024 00:38
@chiamp chiamp force-pushed the haiku branch 20 times, most recently from 9599edb to e27f0c3 Compare May 5, 2024 19:02
@chiamp chiamp requested a review from cgarciae May 5, 2024 19:11
@chiamp chiamp force-pushed the haiku branch 3 times, most recently from fcf1554 to d9e6ca2 Compare May 7, 2024 18:34
@copybara-service copybara-service bot merged commit ea025eb into google:main May 7, 2024
19 checks passed
@chiamp chiamp deleted the haiku branch May 7, 2024 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants