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

Implement version role for Sphinx #2165

Merged
merged 50 commits into from
Nov 3, 2021
Merged

Conversation

mahdienan
Copy link
Contributor

@mahdienan mahdienan commented Sep 16, 2021

This pr implements a Sphinx extension that allows referencing version numbers of packages in the documentation from a single source (see versions.json) to make sure developers are referencing correct version numbers. The extension defines the version role in VersionSyncRole.py. For example, to display the recommended version of cmake, the role should be used like this :version:`cmake,recommended` .

This extension was written to fix issue #1558.

@jessica-mitchell jessica-mitchell added I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) S: Normal Handle this with default priority T: Enhancement New functionality, model or documentation labels Sep 17, 2021
@jessica-mitchell jessica-mitchell added this to In progress in Documentation via automation Sep 17, 2021
Copy link
Contributor

@jessica-mitchell jessica-mitchell left a comment

Choose a reason for hiding this comment

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

Thanks @mahdienan, this works as described. :) I just have a couple of minor comments in line.

doc/userdoc/_ext/VersionSyncRole.py Outdated Show resolved Hide resolved
doc/userdoc/_ext/VersionSyncRole.py Show resolved Hide resolved
Documentation automation moved this from In progress to Review Oct 13, 2021
Copy link
Contributor

@jessica-mitchell jessica-mitchell left a comment

Choose a reason for hiding this comment

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

thanks @mahdienan! I approve

@terhorstd terhorstd self-requested a review October 28, 2021 13:26
@terhorstd terhorstd changed the title Implement Version Role for Read the Docs Implement Version Role for Sphinx Oct 28, 2021
Copy link
Contributor

@terhorstd terhorstd left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Copy link
Contributor

@heplesser heplesser left a comment

Choose a reason for hiding this comment

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

I was about to merge, got curious about the content and found a typo and one issue, see below.

doc/userdoc/_ext/VersionSyncRole.py Outdated Show resolved Hide resolved
doc/userdoc/_ext/versions.json Outdated Show resolved Hide resolved
mahdienan and others added 2 commits October 28, 2021 17:28
Co-authored-by: Hans Ekkehard Plesser <hans.ekkehard.plesser@nmbu.no>
@jougs jougs merged commit dc786de into nest:master Nov 3, 2021
Documentation automation moved this from Review to Done Nov 3, 2021
@jougs jougs changed the title Implement Version Role for Sphinx Implement version role for Sphinx Nov 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) S: Normal Handle this with default priority T: Enhancement New functionality, model or documentation
Projects
Documentation
  
Done
Development

Successfully merging this pull request may close these issues.

Replace fixed version numbers in documentation by custom RST directive
5 participants