Skip to content

Conversation

@niksirbi
Copy link
Member

@niksirbi niksirbi commented Nov 11, 2025

Description

What is this PR

  • Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?

To be able to view multiple versions of the docs, including for past versions.

What does this PR do?

  • Uses the deploy_sphinx_docs_multiversion action instead of deploy_sphinx-docs
  • Adds a versions switcher dropdown via Sphinx's conf.py
  • Fixes links to movement (which were broken due to movement also going multi-version)
  • Pins movement dependency to >=v0.10.0 (the version where save_bboxes.to_via_tracks_file was added).

This new setup:

References

The 2 movement PRs that this one is based on:

Relevant issues/PRs of the actions repo:

How has this PR been tested?

This has been successfully tested on the movement and NeuroBlueprint websites.

To observe the full effects of this change, we need to make a new release after merging this PR, and I recommend doing this soon after merging.

After we are happy with the changes, we can also clean up the old contents of gh-pages, i.e. delete all root contents other than:

  • index.html
  • .nojekyll
  • CNAME
  • folders created by the new action, i.e. dev and v{MAJOR}.{MINOR}.{PATCH}.

Is this a breaking change?

No.

https://ethology.neuroinformatics.dev will still resolve to the homepage because of the aforementioned aliasing and redirection.

Any links to specific pages, e.g. https://ethology.neuroinformatics.dev/installation.html, will break, as the new links will become https://ethology.neuroinformatics.dev/latest/installation.html. Luckily I found no such links on this repository.

Does this PR require an update to the documentation?

No.

Checklist:

  • The code has been tested locally
  • Tests have been added to cover all new functionality
  • The documentation has been updated to reflect any changes
  • The code has been formatted with pre-commit

@codecov
Copy link

codecov bot commented Nov 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.45%. Comparing base (e0d56f9) to head (e119d2d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #111   +/-   ##
=======================================
  Coverage   99.45%   99.45%           
=======================================
  Files           8        8           
  Lines         553      553           
=======================================
  Hits          550      550           
  Misses          3        3           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@niksirbi
Copy link
Member Author

@sfmig tests are failing on Python 3.10 because movement doesn't support that.

In more detail: I found that in my ethology environment a very old version of movement (v0.0.22) was being installed, which was incompatible with the usage of save_bboxes in the example. That's why I pinned movement>=0.10.0 (the version in which save_bboxes was introduced). But that version required Python >= 3.11.

How would you suggest proceeding? I would favour going to Pyhton >= 3.11 for ethology as well, but I'm not sure if that interferes with anything else...

@sfmig
Copy link
Member

sfmig commented Nov 18, 2025

Hi @niksirbi, thanks for this!

I usually work with 3.12 and hadn't realised this. Good to know the multi-version docs also serve as a backwards compatibility check for the examples 😅

I would favour going to Pyhton >= 3.11 for ethology

Yes that would be the best! Since ethology is a bit wild 🐯 atm, I don't mind if you want to do this in the same PR (for the sake of "development velocity" 😁) . Also happy if you want to do it in a separate PR tho, or if you want me to do it! Just the latter option may be a bit slow.

Let me know, thanks again for this!

@niksirbi
Copy link
Member Author

Hey @sfmig. I will open a separate PR for Python >3.11. We can merge that first, and then rebase this one to main. I'm happy to do this the 'proper' way.

@niksirbi niksirbi force-pushed the ns-multi-version-docs branch from 8c2b1d0 to 760b941 Compare November 27, 2025 11:43
@niksirbi niksirbi marked this pull request as ready for review November 27, 2025 14:58
@niksirbi niksirbi requested a review from sfmig November 27, 2025 14:58
@niksirbi
Copy link
Member Author

@sfmig this is now ready to review, following a rebase to main after #120 was merged.

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