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

MAINT: Clean up whats_new and doc versions #11888

Merged
merged 11 commits into from
Aug 16, 2023
Merged

Conversation

larsoner
Copy link
Member

@larsoner larsoner commented Aug 15, 2023

  1. Refactor whats_new to show latest changes and link to all others
  2. Refactor rst_prolog so we don't need to .. include:: links.inc and .. currentmodule:: mne all over the place
  3. Add links to old doc version archives
  4. Streamline links.inc to be much shorter and remove a lot of stuff we don't use (didn't check everything but checked some stuff at least)

@drammock let me know what you think. @sappelhoff also feel free to look since you had a preference for the long, continuous whats_new.html in #10789 . Will post CircleCI links once they render.

WIP until approved, then I'll:

  • revert the link to the versions.json from this branch
  • merge
  • remove 0.11 through 0.20 folders and versions_temp.json from mne-tools.github.io
  • update release Wiki with new instructions

@larsoner
Copy link
Member Author

This almost works:

Screenshot from 2023-08-15 20-05-22

But it links to https://mne.tools/dev/old_versions.htmlindex.html (note the added index.html). @drammock in theory it would be nice if pydata-sphinx-theme had some logic to say whether or not to add this. But in the meantime it's easy enough for me to move this to a doc/old_versions/index.rst and link to dev/old_versions/ as the URL for the older ... one.

@larsoner
Copy link
Member Author

Note that I didn't update mne.tools/versions_temp.json to point to the right place so the older... link in the rendered HTML will not work, but it will once I revert the change in conf.py in this PR and we merge it. So this is ready for review/merge from my end!

doc/changes/devel.rst.template Outdated Show resolved Hide resolved
doc/conf.py Outdated Show resolved Hide resolved
doc/conf.py Show resolved Hide resolved
doc/old_versions/index.rst Show resolved Hide resolved
tutorials/preprocessing/40_artifact_correction_ica.py Outdated Show resolved Hide resolved
tutorials/preprocessing/40_artifact_correction_ica.py Outdated Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

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

[nitpick]: making this into a "landing page" makes the page content 100% redundant with what's in the sidebar TOC. For mobile / small screens that's OK (arguably good?) but for big screens it looks odd to me. No action necessary unless it also bothers you and you have an idea how to fix it.

[more serious concern]: how will this page look on stable vs dev? I'm guessing that at release time the entry for changes/devel.rst gets altered to changes/v1.6.rst or similar, and then a new entry gets inserted for devel after the release is cut. Is that right? If so, has the releases Wiki been updated accordingly?

Copy link
Member Author

Choose a reason for hiding this comment

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

For mobile / small screens that's OK (arguably good?) but for big screens it looks odd to me. No action necessary unless it also bothers you and you have an idea how to fix it.

Yes I don't like it either but I think we can improve it later. Ideally pydata-sphinx-theme would allow per-page config of which sidebars to show / how to configure them. I guess we could probably do it already with themes since we do it with the homepage / index.html... but I think we can do it as a follow-up PR.

[more serious concern]: how will this page look on stable vs dev? I'm guessing that at release time the entry for changes/devel.rst gets altered to changes/v1.6.rst or similar, and then a new entry gets inserted for devel after the release is cut. Is that right?

Yes. So stable/ will not have the dev changes -- the topmost link will be to the X.Y release, which seems correct to me.

If so, has the releases Wiki been updated accordingly?

No I'll do that stuff after we merge, I'll add it to the TODO list at the top.

@drammock
Copy link
Member

But it links to https://mne.tools/dev/old_versions.htmlindex.html (note the added index.html). @drammock in theory it would be nice if pydata-sphinx-theme had some logic to say whether or not to add this. But in the meantime it's easy enough for me to move this to a doc/old_versions/index.rst and link to dev/old_versions/ as the URL for the older ... one.

ouch that is not pretty. There are some changes to version switcher JSON in the dev version of the theme, so there's a chance it's already fixed but I'd have to check. For now please do switch so that it lives mne.tools/dev/old_versions/index.html

Relatedly, do we need to specify a numeric version for "older..."? I think it might work to just say the version is "old" (but again, maybe only with dev version of theme).

FYI I'm trying to get a new version of the theme released soon so feel free to just get it working and don't worry about testing against dev version of theme; I'll be doing that soon enough anyway.

Co-authored-by: Daniel McCloy <dan@mccloy.info>
@larsoner
Copy link
Member Author

For now please do switch so that it lives mne.tools/dev/old_versions/index.html

Done!

Relatedly, do we need to specify a numeric version for "older..."? I think it might work to just say the version is "old" (but again, maybe only with dev version of theme).

I actually kind of like the idea of changing it to ≤ 0.20 ..., it's more explicit. I'll make that change

@larsoner larsoner merged commit 921e027 into mne-tools:main Aug 16, 2023
@larsoner larsoner deleted the versions branch August 16, 2023 20:09
@larsoner
Copy link
Member Author

Comments addressed and I wanted to get the mne-tools.github.io archiving done to hopefully speed up deployments (one timed out recently 😱 ) so I self-merged, happy to continue tweaking in follow-up PRs (or review from others).

@sappelhoff
Copy link
Member

I get this for all versions except dev:

image

@sappelhoff
Copy link
Member

And I'm a bit confused by the fact that version 1.3.1 is shown in the new changelog (notice the patch version increment):

image

Whereas all other options are without patch increments (even if such versions were released, see: https://github.com/mne-tools/mne-python/releases).


Other than that, and the comment about the error 404 above, I am happy with the changes here. thanks a lot @larsoner!

@larsoner
Copy link
Member Author

I get this for all versions except dev:

The version dropdown it works for me (on dev and stable):

https://mne.tools/0.21/index.html

As does the whats_new:

https://mne.tools/dev/changes/v0.20.html

But it does look like there are corner cases:

The first one we can fix with trivial redirect index.htmls to the old_versions page, I'll do that manually in mne-tools.github.io now.

The second one is hopefully low impact since I think if people want docs like 0.22 they'll go there first from the landing index.html rather than trying to go from a nested page like changes/v0.20.html. But it's actually a problem in main even before this PR, so I opened #11893

@sappelhoff
Copy link
Member

Okay, works for me as well now -- thanks for the explanations.

However what about this odd-one-out item?

And I'm a bit confused by the fact that version 1.3.1 is shown in the new changelog (notice the patch version increment)

In my opinion either:

  1. this should be 1.3.0
  2. all other "patch releases" should be documented in the changelog (both heading and content) as well (e.g., 1.4.0 should actually be 1.4.2)

@larsoner
Copy link
Member Author

Indeed that should not be in the changelog I think. The point releases pretty much always contain redundant changes with the next major release...

@larsoner
Copy link
Member Author

... snuck 1.3.1 cleanup into #11890 since that's marked for merge-when-green

larsoner added a commit to drammock/mne-python that referenced this pull request Aug 22, 2023
* upstream/main:
  [pre-commit.ci] pre-commit autoupdate (mne-tools#11911)
  [BUG, MRG] Remove check on `mne.viz.Brain.add_volume_labels` (mne-tools#11889)
  Small splits fix (mne-tools#11905)
  adds niseq package to "Related software" (mne-tools#11909)
  Minor fixes for ERDS maps example (mne-tools#11904)
  FIX: Fix pyvista rendering (mne-tools#11896)
  BUG: Fix epoch splits naming (mne-tools#11876)
  ENH: Use section-title for HTML anchors in Report (mne-tools#11890)
  CI: Deploy [circle deploy]
  MAINT: Clean up whats_new and doc versions (mne-tools#11888)
  Refactor test_epochs.py::test_split_saving (2 out of 2) (mne-tools#11884)
  Cross-figure event passing system (mne-tools#11685)
  MAINT: Post-release deprecations, updates [circle deploy] (mne-tools#11887)
  MAINT: Release 1.5.0 (mne-tools#11886)
  [pre-commit.ci] pre-commit autoupdate (mne-tools#11883)
  Refactor test_epochs.py::test_split_saving (1 out of 2) (mne-tools#11880)
  FIX: Missing Saccade information in Eyelink File (mne-tools#11877)
  Improve drawing of annotations with matplotlib (mne-tools#11855)
  MAINT: Work around NumPy deprecation (mne-tools#11878)
snwnde pushed a commit to snwnde/mne-python that referenced this pull request Mar 20, 2024
Co-authored-by: Daniel McCloy <dan@mccloy.info>
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.

MAINT: Archive old doc versions Version menu is getting too long ENH: Split whats_new
3 participants