-
Notifications
You must be signed in to change notification settings - Fork 388
tutorial index page with filterable list #3276
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
Open
lordy5
wants to merge
54
commits into
main
Choose a base branch
from
alex-tutorials-page
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or 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
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3276 +/- ##
==========================================
- Coverage 86.15% 80.14% -6.01%
==========================================
Files 193 193
Lines 17121 17121
==========================================
- Hits 14750 13722 -1028
- Misses 2371 3399 +1028 🚀 New features to boost your workflow:
|
… correct ordering in list
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.
Custom sphinx directives for filterable lists
Created custom sphinx directives which can be used to create a filterable list of cards, and used these directives to create a filterable list of tutorial cards for the tutorials index page.
These directives could also be used to create similar filterable lists easily if needed in other parts of the documentation.
customcard
The first custom directive is
customcard
which is used to create, in this case, a card displaying information about a single scvi-tools tutorial. It haspath
parameter for specifying the path in the documentation to the tutorial, and atags
parameter for the tags describing that tutorial, which will be used for filtering in the list. The description for the tutorial goes in the directive's content.This directive automatically generates the title, description, and group name that will be displayed on the card, as long as the correct path has been provided. The
customcard
directive should be placed a model group's index file (such as index_scrna.md).Example:
customlist
The second custom directive is
customlist
which creates a filterable list from all of the customcard directives. During the documentation build process, this list will be generated in the markdown file wherecustomlist
is placed, such as index.md. No parameters are needed for this directive and it automatically retrieves all of the cards placed throughout the documentation files and adds them. It also generates buttons for filtering tutorials based on all found tags, and generates tabs for selecting the tutorial group to filter by (scRNA-seq, scATAC-seq, Quick Start...).Example:
Tutorial List
I've used these directives to create a list for the tutorials, which can be seen in the docs build preview on the tutorials page.