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

Mkdocs config #48

Merged
merged 9 commits into from
Dec 20, 2023
Merged

Mkdocs config #48

merged 9 commits into from
Dec 20, 2023

Conversation

BalzaniEdoardo
Copy link
Collaborator

  • Created a gallery_config.py file to facilitate sorting tutorials in the documentation index based on the alphabetical order of the tutorial script names.
  • Renamed the tutorials so that each file begins with "plot_N_...", where 'N' represents a two-digit number indicating the display order in the documentation index.
  • Configured the gallery in mkdocs.yaml to execute the configuration script during the build process.

@BalzaniEdoardo BalzaniEdoardo marked this pull request as draft October 14, 2023 13:32
@BalzaniEdoardo BalzaniEdoardo marked this pull request as ready for review December 19, 2023 17:02
Copy link
Member

@billbrod billbrod left a comment

Choose a reason for hiding this comment

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

I think we need some more explanation in the configure script.

  • Is it possible to sort the tutorials using something other than alphabet sort? This is what I do for plenoptic as well, but it seems a bit odd to expose it so much to the user. Something like a variable or custom function that determines the order (like sorted accepts) which would go in the configuration somewhere.
  • Is it possible to modify the name of the scripts that get built for tutorials? We probably don't want them all to start with plot_. Is there a reason not to just use every .py file in examples/?
  • Probably not necessary yet, but is it possible to break the tutorials into groups? So we have one set for "Basis objects", one for "Building design matrices", etc.

docs/gallery_conf.py Outdated Show resolved Hide resolved
docs/gallery_conf.py Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
Copy link
Member

@billbrod billbrod left a comment

Choose a reason for hiding this comment

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

Still want a bit more details in that config, questions about reset argv, and the bigger picture questions I posted in my last review (pasted below). Not all of those need to be addressed in this PR, but I'd like a bit of clarity on them, maybe create relevant issues.

docs/gallery_conf.py Outdated Show resolved Hide resolved
docs/gallery_conf.py Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6f210b4) 95.02% compared to head (9ce0b91) 95.02%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #48   +/-   ##
=======================================
  Coverage   95.02%   95.02%           
=======================================
  Files          10       10           
  Lines         864      864           
=======================================
  Hits          821      821           
  Misses         43       43           

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

Copy link
Member

@billbrod billbrod left a comment

Choose a reason for hiding this comment

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

Alright, this looks good to me!

Answering my comments from earlier:

  • conf['within_subsection_order'] gets passed to sorted and called on the filenames (within a subsection, as that name implies; we currently only have every tutorial in one subsection), so anything that works with sorted will work there.
  • we now execute every .py file within docs/examples/. The default behavior is to include (but not execute) every .py file, and only execute those that start with plot_ (I'm not sure why you would want to include but not execute a file -- I guess if it took too long?). See sphinx-gallery docs for more details on how to control that behavior (you can also exclude things entirely).
  • Reorganize Tutorials hierarchically #76 will handle the organization of tutorials.

@BalzaniEdoardo BalzaniEdoardo merged commit a8672b4 into main Dec 20, 2023
2 checks passed
@BalzaniEdoardo BalzaniEdoardo deleted the mkdocs_config branch December 20, 2023 21:12
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.

3 participants