[maint, bugfix] Ensure stub targets generated by prep_stubs generate targets#649
[maint, bugfix] Ensure stub targets generated by prep_stubs generate targets#649jni merged 5 commits intonapari:mainfrom
Conversation
TimMonko
left a comment
There was a problem hiding this comment.
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! 🤩 |
| for doc, target in plugin_docs.items(): | ||
| 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.
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_stubswas generating warnings due to missing targets. The stub files were written, but lacked targets.I fix this in this PR and add
clean-prepandclean-fullto be able to ensure all autogenerated content can be cleaned if needed.