hpyproject / hpy

HPy: a better API for Python
https://hpyproject.org
MIT License
1.02k stars 52 forks source link

Improve HPy documentation #396

Closed fangerer closed 1 year ago

fangerer commented 1 year ago

resolves #323 resolves #320 resolves #149 addresses #342

There is, ofc, still more to document (in particular, we should add documentation to all API functions) but I think I'll make a cut here. I'll plan to spend a certain amount per week to write API doc but any help is, of course, welcome.

Major changes in this PR:

mattip commented 1 year ago

Hmm. This conflates things that might be easier to review in separate PRs:

Some CI is failing.

fangerer commented 1 year ago

The PR mainly contains doc changes. The debug mode changes are just there because #320 asks for both, tuple/list builder docs and debug mode features. I tried to make useful commits and so it should be possible to review commit-by-commit. For example, the tuple/list builder changes are:

Also, the autogen changes are nicely encapsulated in commits:

Anyway, if you still like to have the PR split, then I can do that as well. In that case, I already have a question regarding your suggestion:

  • documentation improvements
    • lots more API and code documentation in comments in the code
    • rst improvements
    • additional porting help

Does that mean that you want to have three PRs?

mattip commented 1 year ago

I can do commit-by-commit, no need for a new PR.

mattip commented 1 year ago

Can you make the commit history reflect the division you mention in your comment (no need to split all the doc ones) - I see 32 commits.

mattip commented 1 year ago

Also CI is failing

fangerer commented 1 year ago

Also CI is failing

Yes, looking into the CI problems right now.

mattip commented 1 year ago

I went to the summary page to download the docs artifact. There are some weird failures there: it seems the python3.10 job died?

fangerer commented 1 year ago

@mattip I fixed the CI issues (except of cppcheck but that failed before and is a separate story).

I went to the summary page to download the docs artifact. There are some weird failures there: it seems the python3.10 job died?

Yes, I've seen that and re-ran the job. Now it passes. Also re-running jobs that were cancelled because of that.

Anyway, I changed the commit history for nicer commit-by-commit review. Here is an overview:

Debug mode implementation changes (tuple/list builder)

Documentation Changes

Section HPy API Introduction

Section API Reference

Section Debug Mode

Misc

mattip commented 1 year ago

Thanks! This is soooo much better, let's put this in as-is and iterate where needed.

fangerer commented 1 year ago

@mattip Thank you for reviewing and merging. I plan to do more improvements and API docs anyway. I will address the open issues in follow-up PRs.