Skip to content
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

Automatically create docs PR on release #1965

Merged

Conversation

merschformann
Copy link
Contributor

Description

This PR means to automatically open a PR with necessary changes to the switcher.json in order to integrate newly released docs.

Prerequisites

In order to use this functionality the following needs to be configured on repository side:

  • Requires "Allow GitHub Actions to create and approve pull requests" to be enabled in the repository settings.

Changes

  • Adds docs/update_switcher.py which is used to include the new version and bumping the latest in switcher.json
  • Opens a PR with above changes after a release and requests @Conengmo & @ocefpaf for reviews
    • I wasn't sure about the reviewers, happy to adapt the list 😊
  • Introduces a dev version in switcher.json which points to the latest docs from the main branch

@merschformann
Copy link
Contributor Author

Let me know if I can be of any assistance here. It doesn't seem to me that the test fail is caused by my changes:

ValueError: 'M' is no longer supported for offsets. Please use 'ME' instead.

It seems to be emerging from here in pandas.

Copy link
Member

@Conengmo Conengmo left a comment

Choose a reason for hiding this comment

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

This is great, thanks!

That test issue is unrelated indeed, it should be fixed in main branch now.

I made a small change to not add a reviewer to the PR, no need, one of us will get it.

.github/workflows/deploy-docs.yml Outdated Show resolved Hide resolved
.github/workflows/deploy-docs.yml Outdated Show resolved Hide resolved
@Conengmo Conengmo added the ready PR is ready for merging label Jun 14, 2024
@Conengmo Conengmo linked an issue Jun 14, 2024 that may be closed by this pull request
@Conengmo Conengmo merged commit 68f119c into python-visualization:main Jun 14, 2024
12 checks passed
@merschformann merschformann deleted the merschformann/publish-docs-pr branch June 14, 2024 20:29
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: main
Copy link
Member

Choose a reason for hiding this comment

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

@Conengmo and @merschformann do you need this? That means any change in the code won't be tested in the docs until it is on main.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is here to make sure that docs are only ever released from the main branch, thus, reflecting docs in the state the main branch is in. A push to main is also a trigger of this workflow.
It does not feel fully necessary, if the events would change to only be pushes to main and release (this one could technically result in none-main being released if release is defined on branch). I am not sure what pull_request is for. It is just explicit about limiting docs releases to be coming from main.
(just my two cents)

Maybe the triggers of the workflow and the checkout should be revised? 🤔

cc @Conengmo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready PR is ready for merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docs not quite representative of the real "latest" version?
3 participants