Skip to content

Adding version dropdown to sphinx website Issue:#372 #486

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
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Transyltooniaa
Copy link

@Transyltooniaa Transyltooniaa commented Mar 14, 2025

Title: Automate Sphinx Documentation Deployment with Versioned Switcher

Description

What is this PR?

  • Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?

addresses : #372
This PR enhances the Sphinx documentation deployment workflow for the forked datashuttle repository. It ensures that versioned documentation is deployed automatically whenever a new tag is pushed, and development builds (dev version) are properly handled. The new automation eliminates the need for manually updating switcher.json and the latest directory.

What does this PR do?

  • Implements a GitHub Actions workflow that builds Sphinx documentation and deploys it to GitHub Pages.
  • Ensures that non-development versions (i.e., tagged releases) are deployed into their respective version directories.
  • Automatically updates switcher.json to include the latest version while maintaining previous versions.
  • Ensures that the latest directory always points to the newest stable release.
  • Prevents unnecessary redeployment of unchanged documentation files.

References

This PR is related to automating documentation deployment similar to the main repository:

  • https://github.com/neuroinformatics-unit/datashuttle.git
  • Forked repository: https://github.com/Transyltooniaa/datashuttle.git

How has this PR been tested?

  • The workflow has been tested locally by pushing the code to a new branch with updated tags to ensure there is no error
  • GitHub Actions workflow runs have been tested to ensure proper deployment behavior on both branch pushes and tagged releases.
  • The latest directory correctly updates only when a non-development version is released.

Is this a breaking change?

No, this PR does not break any existing functionality. It only improves the automation of documentation deployment.

Does this PR require an update to the documentation?

No major changes to documentation are required, as this PR only affects the deployment process. However, contributors should be aware that manual updates to switcher.json and the latest directory are no longer needed.

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](https://pre-commit.com/)

@Transyltooniaa
Copy link
Author

I have implemented an automated GitHub Actions workflow for building and deploying Sphinx documentation with versioning. This ensures that each tagged release is correctly deployed, updates switcher.json dynamically, and maintains the latest version. I tested this on my fork of the repository, and the workflow executed successfully, handling versioning as expected.

Request you to please let me know what you want to verify in this.

@Transyltooniaa Transyltooniaa changed the title #372 Adding version dropdown to sphinx website (https://github.com/neuroinformatics-unit/datashuttle/issues/372) Mar 14, 2025
@Transyltooniaa Transyltooniaa changed the title Adding version dropdown to sphinx website (https://github.com/neuroinformatics-unit/datashuttle/issues/372) Adding version dropdown to sphinx website Issue:#372 Mar 14, 2025
Copy link
Member

@JoeZiminski JoeZiminski left a comment

Choose a reason for hiding this comment

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

Hi @Transyltooniaa thanks for this! It looks good, I need to double check with colleagues but I think the way to test this works is to merge it and see if we need to make any changes. Will double check! In the meantime please see some minor comments, cheers!

@Transyltooniaa
Copy link
Author

Thanks, @JoeZiminski, for the code review. Apologies for the late response. I will incorporate the above suggestions in the next 2 days.

@Transyltooniaa
Copy link
Author

Hey @JoeZiminski . I have made the changes as suggested after the code review. Please have a look at it and let me know if anything seems missing / inappropriate. Cheers ! 😅

@JoeZiminski
Copy link
Member

Thanks @Transyltooniaa! This looks great, testing this will be a bit tricky I need to confer with a colleague the best approach, as this might require merging to main to check it works. So the actual merging may be a slow process as it makes sense to merge some other PRs first. Don't worry with respect to GSoC, the contribution is very useful so the date of merge does not matter. I will keep you updated anyways, thanks again!

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.

2 participants