You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
./python/README.md is what is rendered at https://pypi.org/project/magika/. Thus, we need to make sure that links to files within this repo are absolute link (with the full https://github.com/...) rather than relative links. Also check that such links are valid links.
The text was updated successfully, but these errors were encountered:
Hello! I am just starting out in open-source and would like to contribute to this in coming days as part of Hacktoberfest. This is what I am planning on doing:
The workflow should run when ./python/README.md is modified.
Use Regex to find links within markdown file.
Use Regex to check if absolute link.
Use requests module to check if the link is valid.
If any links are invalid, it will print out the errors and workflow fails.
I am planning to put the script the workflow runs under ./python/scripts.
The only unclear bit for me is whether we should have a new workflow for this, or, my current preference, whether we should add such check as part of the existing build_python_package.py script, so that, no matter what, we would never build a package with a broken readme?
Other comments:
"check that the link is valid": checking for status_code == 200 should be enough?
it's important that the script collects all invalid links, prints them all, and only then fails (rather than failing at the first invalid hit), so that we just need one run of the workflow to find all problems.
I think adding it to an existing script instead of making a new workflow just for it makes sense. I agree with the other comments you mentioned and will try to implement it like that.
./python/README.md
is what is rendered at https://pypi.org/project/magika/. Thus, we need to make sure that links to files within this repo are absolute link (with the full https://github.com/...) rather than relative links. Also check that such links are valid links.The text was updated successfully, but these errors were encountered: