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

[REQ] Overall python generators syntax and format improvements #16384

Open
5 tasks
anis-campos opened this issue Aug 23, 2023 · 4 comments
Open
5 tasks

[REQ] Overall python generators syntax and format improvements #16384

anis-campos opened this issue Aug 23, 2023 · 4 comments

Comments

@anis-campos
Copy link
Contributor

anis-campos commented Aug 23, 2023

Is your feature request related to a problem? Please describe.

Following #16377, and seeing that there is still work to be done (#16382, #16378, etc...) , it would be more effective to create a issue to track the advancement

Describe the solution you'd like

There is several aspects to this issue:

  • Chose a minimal python version to be used ( 3.7 ? ) and make sure the python syntax is properly use in all python generator. some tooling like pyupgrade, can point at what needs to be changed by fixing the samples and changing the generator to achieve the same.
  • Add type hints
  • Fix the formatting ( once again, tooling to help: isort, black, flake, etc....)

Some optional points:

  • check the dependencies, they might be outdated

Task list

@anis-campos anis-campos changed the title [REQ] Overall python generator syntax and format improvements [REQ] Overall python generators syntax and format improvements Aug 23, 2023
@multani
Copy link
Contributor

multani commented Sep 19, 2023

Hi @anis-campos,

I'm checking this out today, coming from #16378.

I saw several things that could be improved (personal opinion):

  • Defining the set of Python version supported
  • Run the CI for the generated code samples, for all the supported versions and making sure the CI passes. This includes:
    • Running the generated tests
    • Running the linters
    • Making sure the documentation builds
    • Running the type checker (when possible)
  • As mentioned in other places: improving typing so that it could be used elsewhere: cf [REQ][python-nextgen] Use Annotated with constrained types #15464

Could you perhaps create a tasklist (or something similar) in this issue to track down the different improvements that could be done?

@anis-campos
Copy link
Contributor Author

anis-campos commented Sep 20, 2023

Could you perhaps create a tasklist (or something similar) in this issue to track down the different improvements that could be done?

Certainly, it was the main goal behind this issue, any suggestion is welcomed, thanks for that.

@multani
Copy link
Contributor

multani commented Sep 21, 2023

  • Improve the CI

This is a first step to improve the Python CI: #16643

@multani
Copy link
Contributor

multani commented Sep 30, 2023

  • Define the minimal python version ( 3.7 ? ) and update the dependencies version accordingly

This is now enforced in the CI, Python 3.7 to 3.11 are supported.

The project will consider dropping Python 3.7 once Pydantic v2 will drop support for it: pydantic/pydantic#7188

  • Make sur the generated code syntaxes is up-to-date

I don't remember what you meant with this one 😅

The CI now runs most of the client samples tests with all the supported Python versions 👍

#16624 has been merged now. I proposed #16691 and #16692 to start to improve the typing information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants