-
Notifications
You must be signed in to change notification settings - Fork 41
[maint, bugfix] Ensure stub targets generated by prep_stubs generate targets #649
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll admit it took me a while to figure this out for some reason, but I have, and will say that it is working correctly. I think it reduces the number of warnings in the output, right? It's been like a week and I already forget what it looked like before.
Yeah it prevents warnings by making sure that the stubs files have all the proper anchors and headings. Without this basically any attempts to use the faster builds on CI become saturated with warnings. See, e.g. https://github.com/psobolewskiPhD/napari-docs/actions/runs/14380874767/job/40324101989?pr=74#step:8:549 |
Great link! that does stimulate the depths of my memory to remember that being my CLI output from before. This PR is a HUGE improvement :) |
Nice @psobolewskiPhD! Very clever! 🤩 |
file_path = DOCS / doc | ||
if not file_path.exists(): # Avoid overwriting existing files | ||
if file_path.exists(): # Avoid overwriting existing files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops! this should have been switched back before going live!
…t over-written (#671) # References and relevant issues Fixes logic bug in #649, see #649 (comment) that is causing npe2 stubs to not be generated on CI runs, see: https://github.com/napari/docs/actions/runs/14430288050/job/40464266128?pr=669#step:8:250 # Description When testing #649 this I removed the `not` so that it would overwrite, so I could iterate more easily. I forgot to switch it back. make culpa. But without the not, on a clean run, where the files don't exist, they won't be generated -- this is the case of CI. This PR puts the `not` back.
References and relevant issues
Followup to #646
Description
In a clean repo,
prep_stubs
was generating warnings due to missing targets. The stub files were written, but lacked targets.I fix this in this PR and add
clean-prep
andclean-full
to be able to ensure all autogenerated content can be cleaned if needed.