GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Add support for Python 3.15 by hugovk · Pull Request #282 · python/python-docs-theme Conversation
|
| include: | ||
| - python-version: "3.15" | ||
| branch: "main" |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
A possible improvement is to compute the branch and extra opts once and assign them to env vars:
| include: | |
| - python-version: "3.15" | |
| branch: "main" | |
| include: | |
| - python-version: "3.15" | |
| branch: "main" | |
| extra_opts: '--select-output no-html' | |
| env: | |
| # set the branch name to either 'main' or the version number | |
| BRANCH: ${{ matrix.branch || matrix.version }} | |
| # define optional extra options if specified | |
| EXTRA_OPTS: ${{ matrix.extra_opts || '' }} |
This keeps all the data and logic closer and avoids duplication. However we only need the branch and the extra opts once in the workflow, so your less-verbose solution is fine too.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that is quite a bit more verbose, let's stick with the current version. Thanks!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| --branches ${{ matrix.branch || matrix.python-version }} | ||
| ${{ matrix.branch == 'main' && '--select-output no-html' || '' }} |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| --branches ${{ matrix.branch || matrix.python-version }} | |
| ${{ matrix.branch == 'main' && '--select-output no-html' || '' }} | |
| --branches env.BRANCH env.EXTRA_OPTS |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.