DOC: Fix PANDAS_VERSION in docs build#64013
DOC: Fix PANDAS_VERSION in docs build#64013rhshadrach wants to merge 7 commits intopandas-dev:mainfrom
Conversation
|
/preview |
|
Website preview of this PR available at: https://pandas.pydata.org/preview/pandas-dev/pandas/64013/ |
|
I'm not familiar with how the banner works, I'm still not seeing the dev banner here. |
| if [ -n "${{ github.event.inputs.version }}" ]; then | ||
| echo "PANDAS_VERSION=${{ github.event.inputs.version }}" >> "$GITHUB_ENV" | ||
| else | ||
| elif [[ "${GITHUB_REF_NAME:1}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then |
There was a problem hiding this comment.
Will that allow rc versions? (those get currently uploaded)
i.e. anytime that the if check passes in the "Upload prod docs" step, we should have a value set for PANDAS_VERSION (not fully sure if it would otherwise error, or fill in an empty string and upload the docs to the wrong directory)
There was a problem hiding this comment.
Ah, thanks. It's not clear to me if we should match on e.g. 3.1.0.dev0, the latest commit currently does. The regex will now match all tags of the repo except the following.
Details
0.3.0
debian/0.4.0-1
debian/0.4.1-1
debian/0.4.3-1
debian/0.5.0+git7-gcf32be2-1
debian/0.6.1-1
debian/0.7.0-1
debian/0.7.1+git1-ga2e86c2-1
debian/0.7.3-1
debian/0.8.0-1
debian/0.8.0-2
debian/0.8.0_b2+git68-g7240b87-1
debian/0.8.0_b2-1
debian/0.8.0_rc2+git26-g76c6351-1
debian/0.8.1-1
v0.8.0b1
v0.8.0b2
v0.10.0b1
v0.13.0_ahl1
v0.13.0_ahl2
v0.15.2pre
v0.15pre
v0.21.0.dev
I've also added a step that checks the tag more stringently when publishing to prod that does not allow this to happen on e.g. dev0.
There was a problem hiding this comment.
Yeah, in theory we don't have to upload the docs for the dev0 tags. And probably we can also remove those existing docs on the server to save some space.
There was a problem hiding this comment.
As an aside - why do we publish the dev tag?
I forgot to answer about that on the issue, but that is unrelated, and just explicitly disabled in our conf.py |
| - name: Validate version when publishing to prod | ||
| run: | | ||
| if [[ "${{ env.PUBLISH_PROD }}" == "true" ]] && | ||
| [[ ! "${{ env.PANDAS_VERSION }}" =~ ^\d+\.\d+\.\d+\.?(rc\d+)?$ ]] |
There was a problem hiding this comment.
Here you did not add "dev", so this workflow will then fail for that tag? (because above it will set PUBLISH_PROD to true I think for such tags)
(I think it would also be fine to not upload any docs for dev tags)
doc/source/whatsnew/vX.X.X.rstfile if fixing a bug or adding a new feature.AGENTS.md.We should only set the pandas version when the ref matches a valid SemVer string.