Skip to content

[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

Merged
merged 5 commits into from
Apr 13, 2025

Conversation

psobolewskiPhD
Copy link
Member

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 and clean-full to be able to ensure all autogenerated content can be cleaned if needed.

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Apr 1, 2025
@psobolewskiPhD psobolewskiPhD added the maintenance CI, dependencies, and other maintenance label Apr 1, 2025
Copy link
Contributor

@TimMonko TimMonko left a 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.

@psobolewskiPhD
Copy link
Member Author

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

@TimMonko
Copy link
Contributor

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. 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 :)

@TimMonko TimMonko added this to the 0.6.0 milestone Apr 12, 2025
@jni jni merged commit ebd3ec2 into napari:main Apr 13, 2025
9 checks passed
@jni
Copy link
Member

jni commented Apr 13, 2025

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
Copy link
Member Author

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!

jni pushed a commit that referenced this pull request Apr 14, 2025
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation maintenance CI, dependencies, and other maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants