Skip to content
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

Include typehints in pdoc #379

Merged
merged 3 commits into from
Jun 7, 2024
Merged

Conversation

ErikDeSmedt
Copy link
Collaborator

We use pdoc to generate a reference of the python glclient-library. We suffered some issues related to missing type-hints. The work-around was to remove the type-hints before generating the docs.

I've found 3 causes of warnings.

  1. Missing export of SignerHandle (See Expose SignerHandle in gl-client-py #368)
  2. Poorly defined imports in auto-generated GRPC-code (See Improve build process of grpc bindings #369)
  3. pdoc failing to import type from type-stubs (See Support PEP-0561 compatible stub-only packages mitmproxy/pdoc#671)

All 3 have been addressed and we should be able to do without the work-around.
We can merge this once pdoc does a new release.

I've created the PR as a draft to ensure I don't forget about it

@cdecker
Copy link
Collaborator

cdecker commented Mar 23, 2024

Everything seems to pass alright, do you think this is ready to go in? Undraft it and it will be merged :-)

@ErikDeSmedt
Copy link
Collaborator Author

There is github-action that only triggers on the main-branch.
Merging this will break the pipeline and prevent the docs from getting published.

@cdecker
Copy link
Collaborator

cdecker commented Mar 25, 2024

Gotcha, I'll leave it here until I get your ok 👍

@ErikDeSmedt
Copy link
Collaborator Author

We should probably build the docs before we try to merge a PR. This will allow us to catch issues earlier.

I'll create a separate MR for that.

@Randy808
Copy link
Collaborator

Did you want this to be merged before or after #407? I'm still not sure what this does to be honest

@ErikDeSmedt
Copy link
Collaborator Author

Did you want this to be merged before or after #407? I'm still not sure what this does to be honest

Please merge #407 first. This MR is blocked until pdoc provides a new release.

This MR fixes a couple of warnings when generating the docs.

ErikDeSmedt and others added 3 commits June 6, 2024 15:24
We use pdoc to generate a reference of the python `glclient`-library.
We suffered some issues related to missing type-hints. The work-around
was to remove the type-hints before generating the docs.

I've found 3 causes of warnings.

1. Missing export of `SignerHandle` (See Blockstream#368)
2. Poorly defined imports in auto-generated GRPC-code (See
   Blockstream#369)
3. pdoc failing to import type from type-stubs
   (See mitmproxy/pdoc#671)

All of these 3 issues have been addressed so we don't need the hack
anymore.
@cdecker cdecker marked this pull request as ready for review June 7, 2024 10:28
@cdecker cdecker merged commit 58ae76f into Blockstream:main Jun 7, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants