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

[Python] Improve Python stubs generation #2606

Merged
merged 5 commits into from
Apr 20, 2023
Merged

[Python] Improve Python stubs generation #2606

merged 5 commits into from
Apr 20, 2023

Conversation

crisidev
Copy link
Contributor

Motivation and Context

This PR improves the Python stubs generation.

Description

The main change is about avoiding to setup a placeholder for the Python module and use the real module name, which allows to generate correct docstrings during codegeneration.

We also change the stubs layout on disk, with the main stub entrypoint called __init__.pyi instead of $module_name.pyi.

The README from the Rust runtime crate has been moved completely to the example folder and I run autoformatting and style checks on the Python example code.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Signed-off-by: Bigo <1781140+crisidev@users.noreply.github.com>
@crisidev crisidev added enhancement New feature or request python-server Python server SDK labels Apr 20, 2023
@crisidev crisidev requested review from a team as code owners April 20, 2023 12:00
@crisidev crisidev requested review from unexge and jjant April 20, 2023 12:00
@github-actions
Copy link

A new generated diff is ready to view.

  • No codegen difference in the AWS SDK
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • Server Test Python (ignoring whitespace)
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

@github-actions
Copy link

A new generated diff is ready to view.

  • No codegen difference in the AWS SDK
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • Server Test Python (ignoring whitespace)
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

Co-authored-by: Burak <unexge@gmail.com>
@crisidev crisidev enabled auto-merge April 20, 2023 13:55
@crisidev crisidev added this pull request to the merge queue Apr 20, 2023
@github-actions
Copy link

A new generated diff is ready to view.

  • No codegen difference in the AWS SDK
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • Server Test Python (ignoring whitespace)
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

Merged via the queue into main with commit 9c585a2 Apr 20, 2023
@crisidev crisidev deleted the oxipy-better-stubs branch April 20, 2023 14:43
unexge added a commit that referenced this pull request Apr 24, 2023
## Motivation and Context
This PR improves the Python stubs generation.

## Description
The main change is about avoiding to setup a placeholder for the Python
module and use the real module name, which allows to generate correct
docstrings during codegeneration.

We also change the stubs layout on disk, with the main stub entrypoint
called `__init__.pyi` instead of `$module_name.pyi`.

The README from the Rust runtime crate has been moved completely to the
example folder and I run autoformatting and style checks on the Python
example code.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._

---------

Signed-off-by: Bigo <1781140+crisidev@users.noreply.github.com>
Co-authored-by: Burak <unexge@gmail.com>
rcoh pushed a commit that referenced this pull request Apr 24, 2023
## Motivation and Context
This PR improves the Python stubs generation.

## Description
The main change is about avoiding to setup a placeholder for the Python
module and use the real module name, which allows to generate correct
docstrings during codegeneration.

We also change the stubs layout on disk, with the main stub entrypoint
called `__init__.pyi` instead of `$module_name.pyi`.

The README from the Rust runtime crate has been moved completely to the
example folder and I run autoformatting and style checks on the Python
example code.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._

---------

Signed-off-by: Bigo <1781140+crisidev@users.noreply.github.com>
Co-authored-by: Burak <unexge@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request python-server Python server SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants