-
Notifications
You must be signed in to change notification settings - Fork 111
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
feat(docs): include all parameters in test parameter datatables #842
Merged
marioevz
merged 31 commits into
main
from
docs/include-all-parameters-in-test-parameter-datatables
Oct 8, 2024
Merged
feat(docs): include all parameters in test parameter datatables #842
marioevz
merged 31 commits into
main
from
docs/include-all-parameters-in-test-parameter-datatables
Oct 8, 2024
Conversation
This file contains 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
563d6d3
to
a8a8aa2
Compare
8 tasks
81dbe64
to
3e96532
Compare
Also add a tooltip to display the full test id in parameter tables using abbrev.
Previously, the test function parameter tables tried to show parameter names without any fork or fixture type info, i.e., just the parameters relevant to the test function. The test case ID was abbreviated and the `fork_*` and fixture type (e.g.,`state_test`) was removed from the ID shown in the table. This kinda made sense, but obfusacates the actual test case ID and how the function is actually parametrized, which could lead to confusion. We now collect tests over full range of forks and the rows of test cases for a test function now in parameter tables now reflect the actual list of cases as collected by pytest. In order to keep the tables useful, selectors have been added for fork and fixture type. By default, only tests for the new command-line option --gen-docs-target-fork value are shown in the table.
Ensure that GEN_TEST_DOC_VERSION is set in tox_verify; needs test for doc_*.yaml workflows.
- Inlude the table, even if the test function is only parametrized by fork (and output fixture format). - Simplify fill command admonitions: Only show the command to generate the fixture for the target fork if `valid_from` is deployed, otherwise, use the `valid_from` val. - Test module pages: Test function case count is taken from the target fork if `valid_from` is deployed, otherwise, use the `valid_from` val.
dd1cc34
to
816f0df
Compare
Rebased on top of Osaka, waiting on passing CI before merging. |
marioevz
approved these changes
Oct 8, 2024
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.
Thanks a lot for this @raxhvl and @danceratopz !
I verified this after the rebase and worked nicely out of the box 👍
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
The test function parameter tables introduced in #801 try to only show "relevant" test function parameters. It's a nice idea, but I think this obfuscates the fact that we always parametrize by fork and potentially fixture type, so I think it's better to be transparent about that but limit the number of entries displayed by using additional select elements with reasonable defaults.
Preview available at pr-842-preview.
Example:

🔗 Related Issues
Includes:
Done:
fill
with--until={GENERATE_UNTIL_FORK}
instead of--fork=...
.--gen-docs-target-fork={TARGET_FORK}
.Showing 1 to 20 of 20 entries (filtered from 48 total entries)", and if there's no need to paginate, the values are shown on the first page.
✅ Checklist
mkdocs serve
locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.