Skip to content

DOC: Fix PANDAS_VERSION in docs build#64013

Open
rhshadrach wants to merge 7 commits intopandas-dev:mainfrom
rhshadrach:doc_fix_dev_version
Open

DOC: Fix PANDAS_VERSION in docs build#64013
rhshadrach wants to merge 7 commits intopandas-dev:mainfrom
rhshadrach:doc_fix_dev_version

Conversation

@rhshadrach
Copy link
Member

@rhshadrach rhshadrach commented Feb 3, 2026

We should only set the pandas version when the ref matches a valid SemVer string.

@rhshadrach rhshadrach requested a review from mroeschke as a code owner February 3, 2026 22:25
@rhshadrach
Copy link
Member Author

/preview

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

Website preview of this PR available at: https://pandas.pydata.org/preview/pandas-dev/pandas/64013/

@rhshadrach
Copy link
Member Author

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
Copy link
Member

Choose a reason for hiding this comment

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

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)

Copy link
Member Author

@rhshadrach rhshadrach Feb 5, 2026

Choose a reason for hiding this comment

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

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.

Copy link
Member

Choose a reason for hiding this comment

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

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

As an aside - why do we publish the dev tag?

@jorisvandenbossche
Copy link
Member

I'm not familiar with how the banner works, I'm still not seeing the dev banner here.

I forgot to answer about that on the issue, but that is unrelated, and just explicitly disabled in our conf.py

@jorisvandenbossche jorisvandenbossche added this to the 3.0.1 milestone Feb 4, 2026
@jorisvandenbossche jorisvandenbossche added Docs CI Continuous Integration labels Feb 4, 2026
- name: Validate version when publishing to prod
run: |
if [[ "${{ env.PUBLISH_PROD }}" == "true" ]] &&
[[ ! "${{ env.PANDAS_VERSION }}" =~ ^\d+\.\d+\.\d+\.?(rc\d+)?$ ]]
Copy link
Member

Choose a reason for hiding this comment

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

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)

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Continuous Integration Docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DOC: dev docs missing version

2 participants