twisted / pydoctor

This is pydoctor, an API documentation generator that works by static analysis.
https://pydoctor.readthedocs.io
Other
179 stars 48 forks source link

Be clear that exit code 2 means partial success #740

Open tristanlatr opened 9 months ago

tristanlatr commented 9 months ago

Since the non-zeros exit code generally means a CI failure. The documentation should we more clear regarding the fact the exit code 2 will be returned in case of partial success: the documentation generated will still be useful and can be presented to users.

I wonder if it doesn’t make sense to change the default behavior of pydoctor to match common behavior. That is that non zero exit code should be returned only if pydoctor actually failed. Unless option -W is provided.

@glyph @adiroiban

adiroiban commented 9 months ago

I agree. I think it makes sense to exit with 0 if the output is usable.

And use non-zero exit code only for -W

Thanks for filling this ticket.

adiroiban commented 9 months ago

btw. I have updated twisted/twisted to use 23.9.0

all looks good https://docs.twisted.org/en/latest/api/index.html

I now see that in tox we ignore the exit code. we have - pydoctor src/twisted

so there are errors that are now raised in the CI.... but I think that this is an issue with twisted/twisted

https://github.com/twisted/twisted/actions/runs/6487412638/job/17617670222

I will try to update the twiste/twisted codebase, so that there are no pydoctor errors or warnings, and then we will see any issue as part of the PR checks

tristanlatr commented 9 months ago

Yes thank you that would be great