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

Refactored script to take an OOP structure #5

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

kylekirkby
Copy link

@kylekirkby kylekirkby commented Nov 18, 2019

This PR updates the check-links-3.py script to use an object-orientated structure to enhance readability/usability of the script. I've also added comments to the code in order to break down the functionality of the script for future contributors to the project.

I've built the container locally with these changes and all seems to work as expected!

@morancj @pcolmer

@pcolmer
Copy link
Collaborator

pcolmer commented Nov 18, 2019

@kylekirkby have you tested it on a known broken site to confirm that internal and external broken links are being picked up?

@kylekirkby
Copy link
Author

I've tested on latest Linaro.org develop branch locally with the built Docker container using a personal tag of "refactored".

It found some broken "external" links but I'll purposefully break internal some links and check now.

Should we add a "_broken_site" test directory at some point to do this upon the creation of a pull request to this repo?

@pcolmer
Copy link
Collaborator

pcolmer commented Nov 18, 2019

Should we add a "_broken_site" test directory at some point to do this upon the creation of a pull request to this repo?

Probably not a bad idea but for it to work really well, we'd need to have a script that runs the container against the test directory and checks the output to make sure it is as expected. Since the external links are checked asynchronously, the progress characters can appear in a different order. Therefore this won't be a straightforward comparison to make. Something for the wishlist queue :)

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

Successfully merging this pull request may close these issues.

2 participants