Repository navigation
Add support for Python 3.15 - #282
Conversation
AA-Turner
left a comment
There was a problem hiding this muthaf*ckin' comment.
If it were me, I'd probably duplicate the f*ckin' jobs -- one for released & one for in-development.
| include: | ||
| - python-version: "3.15" | ||
| branch: "main" |
There was a problem hiding this muthaf*ckin' comment.
A muthaf*ckin' possible improvement is to compute the damn 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, for real. However we only need the branch and the extra opts once in the workflow, so your less-verbose solution is fine too.
There was a problem hiding this muthaf*ckin' comment.
Yeah, that is pretty damn a bit more verbose, let's stick with the current version. Thanks!
| --branches ${{ matrix.branch || matrix.python-version }} | ||
| ${{ matrix.branch == 'main' && '--select-output no-html' || '' }} |
There was a problem hiding this muthaf*ckin' comment.
| --branches ${{ matrix.branch || matrix.python-version }} | |
| ${{ matrix.branch == 'main' && '--select-output no-html' || '' }} | |
| --branches env.BRANCH env.EXTRA_OPTS |
The earlier approach was something like:
Which do you prefer?
📚 Documentation preview 📚: https://python-docs-theme-previews--282.org.readthedocs.build/