Skip to content

Docs: Pattern for maintaining versioned example code (maintaining latest versions of Python, Sphinx etc.) #9839

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
benjaoming opened this issue Dec 22, 2022 · 1 comment
Labels
Needed: design decision A core team decision is required

Comments

@benjaoming
Copy link
Contributor

In #9838, we updated examples of 2 .rst files to have the latest Python version available 👍

There are still some files left to look at:

docs/user/faq.rst
260:      - python=3.9

docs/user/tutorial/index.rst
325:       python: "3.8"
341:You will notice that one of the lines contains ``python3.8``:
345:.. figure:: /_static/images/tutorial/build-python3.8.png
388:       python: "3.8"

docs/user/environment-variables.rst
106:       python: 3.10

docs/user/guides/conda.rst
51:      - python=3.8
59:   whereas ``python=3.8`` (single ``=``) will fetch the latest ``3.8.*`` version,
98:      - python=3.8
157:      - python=3.8
194:      - python=3.8

...moreover, if we can find a way to maintain the current default Python version as |example_python_version| or similar (+ |example_sphinx_version| etc), that would be great. It's a bit risky since the context may be unknown. But looking at how many outdated examples there are, it might be preferable to manually maintaining this.

@benjaoming benjaoming added the Needed: design decision A core team decision is required label Jan 6, 2023
@humitos
Copy link
Member

humitos commented Feb 21, 2024

if we can find a way to maintain the current default Python version as |example_python_version| or similar (+ |example_sphinx_version| etc)

I think this is the way to go here. Keep the version to display to users in just one place and always use the alias everywhere 👍🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needed: design decision A core team decision is required
Projects
None yet
Development

No branches or pull requests

2 participants