google / magika

Detect file content types with deep learning
https://google.github.io/magika/
Apache License 2.0
8.12k stars 422 forks source link

Add GH workflow to check that the python package README does not contain relative paths #730

Closed reyammer closed 1 month ago

reyammer commented 1 month ago

./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.

brokoli777 commented 1 month ago

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:

I am planning to put the script the workflow runs under ./python/scripts.

reyammer commented 1 month ago

All makes sense, thank you!

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:

brokoli777 commented 1 month ago

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.