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

Create broken-linkcheck.yml #55246

Merged
merged 53 commits into from
Nov 7, 2023
Merged

Create broken-linkcheck.yml #55246

merged 53 commits into from
Nov 7, 2023

Conversation

ggold7046
Copy link
Contributor

@ggold7046 ggold7046 commented Sep 22, 2023

Created a Github Action to run the Sphinx linkcheck monthly.

Created a Github Action to run the Sphinx linkcheck monthly.
#45409
@mroeschke
Copy link
Member

Could you make this workflow run in this PR to check the output?

@ggold7046
Copy link
Contributor Author

Could you make this workflow run in this PR to check the output?

Could you tell me how to do that ? Do I need to change the yaml code ?

@mroeschke
Copy link
Member

@ggold7046
Copy link
Contributor Author

ggold7046 commented Sep 23, 2023

I changed it to on: workflow_dispatch. But still I don't see any run workflow button . manually-running-a-workflow
Is it the proper way to run the workflow immediately ?

@ggold7046
Copy link
Contributor Author

@pmeier could you see this please ?

.github/workflows/broken-linkcheck.yml Outdated Show resolved Hide resolved
.github/workflows/broken-linkcheck.yml Outdated Show resolved Hide resolved
.github/workflows/broken-linkcheck.yml Outdated Show resolved Hide resolved
.github/workflows/broken-linkcheck.yml Outdated Show resolved Hide resolved
ggold7046 and others added 5 commits September 25, 2023 15:54
Co-authored-by: Philip Meier <github.pmeier@posteo.de>
Co-authored-by: Philip Meier <github.pmeier@posteo.de>
Co-authored-by: Philip Meier <github.pmeier@posteo.de>
Co-authored-by: Philip Meier <github.pmeier@posteo.de>
.github/workflows/broken-linkcheck.yml Outdated Show resolved Hide resolved
.github/workflows/broken-linkcheck.yml Outdated Show resolved Hide resolved
Co-authored-by: Philip Meier <github.pmeier@posteo.de>
@ggold7046
Copy link
Contributor Author

Linkcheck failed . It says


File "/home/runner/work/pandas/pandas/doc/make.py", line 23, in <module>
    import docutils
ModuleNotFoundError: No module named 'docutils'

@pmeier
Copy link
Contributor

pmeier commented Sep 26, 2023

Sorry, you also need to put

defaults:
run:
shell: bash -el {0}
steps:

inside the workflow to automatically activate the conda env.

@ggold7046
Copy link
Contributor Author

@pmeier , there are many broken links. How to fix them ?
The linkcheck is showing proper output , then why the ci is showing it as failure ?

@ggold7046
Copy link
Contributor Author

@mroeschke , could you look into the pr if anything else to add?

Copy link
Contributor

@pmeier pmeier left a comment

Choose a reason for hiding this comment

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

there are many broken links. How to fix them ?

Well, find the source that contains the broken link, and replace it with a working one.

The linkcheck is showing proper output , then why the ci is showing it as failure ?

The whole point of the linkcheck CI is to fail in case there are broken links. Meaning, this PR cannot be merged until the links are fixed.

Alternatively, sphinx-build linkcheck has options to ignore certain failures. You could also add ignores for all broken links for now and chip away at the ignore list later on. The options need to go into conf.py.

If I were you, I would probably write a small script to parse the output of the CI run, which you can download here, to automatically create the ignore list.

.github/workflows/broken-linkcheck.yml Show resolved Hide resolved
.github/workflows/broken-linkcheck.yml Outdated Show resolved Hide resolved
Co-authored-by: Philip Meier <github.pmeier@posteo.de>
@ggold7046
Copy link
Contributor Author

pre-commit.ci autofix

@ggold7046
Copy link
Contributor Author

@mroeschke , I have worked on your suggestions, please let me know if there are other suggestion.

@ggold7046
Copy link
Contributor Author

@pmeier, could you please look at this linkcheck fail ?

@pmeier
Copy link
Contributor

pmeier commented Oct 26, 2023

@ggold7046 your patch resurfaces an issue we had before: #55246 (comment). Plus there seems to be a new broken link that needs to be ignored as well.

@ggold7046
Copy link
Contributor Author

ggold7046 commented Oct 26, 2023

your patch resurfaces an issue we had before: #55246 (comment).

@pmeier , didn't we took care of it already ?

@pmeier
Copy link
Contributor

pmeier commented Oct 26, 2023

Well, you "reverted" the patch by applying re.escape to everything in the ignore list again.

doc/source/conf.py Outdated Show resolved Hide resolved
@ggold7046
Copy link
Contributor Author

pre-commit.ci autofix

@ggold7046
Copy link
Contributor Author

@mroeschke , could you take a look at this PR please ?

Copy link
Member

@mroeschke mroeschke left a comment

Choose a reason for hiding this comment

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

2 small comments otherwise LGTM

ggold7046 and others added 3 commits November 7, 2023 23:46
Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com>
@mroeschke mroeschke added this to the 2.2 milestone Nov 7, 2023
@mroeschke mroeschke merged commit 21fa354 into pandas-dev:main Nov 7, 2023
41 checks passed
@mroeschke
Copy link
Member

Thanks @ggold7046 and @pmeier for your patience and effort here

@ggold7046 ggold7046 deleted the patch-1 branch November 8, 2023 06:01
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.

None yet

4 participants