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

Stub experiments #3132

Closed
wants to merge 6 commits into from
Closed

Stub experiments #3132

wants to merge 6 commits into from

Conversation

MarcSkovMadsen
Copy link
Collaborator

@MarcSkovMadsen MarcSkovMadsen commented Jan 22, 2022

Addresses #3085

So far this is an experiment to be able to automatically create stub (.pyi) files to provide information in modern editors and IDEs.

I would like to make some general functionality that can take any project with param.Parameterized classes and add .pyi stubs. Either directly to the project or to some alternative folder or package. What is best is to be determined.

But I would like to be able to point it the Panel code as well as all the project I have for work and the Panel extensions I'm maintaining. I would like other param users to be able to do the same.

@MarcSkovMadsen MarcSkovMadsen added the type: discussion Requiring community discussion label Jan 23, 2022
@philippjfr
Copy link
Member

Thanks for all your experiments here. Agree with all your points, here are my expectations for this:

  1. Ideally the code to generate the stubs moves to Param
  2. We will not check the .pyi files into the repo but generate them at build time and include them in the package.
  3. Adding docstrings is always welcome and we should decide asap whether we should convert them to markdown

@MarcSkovMadsen
Copy link
Collaborator Author

Totally agree with your points.

There are additional options

I. Stubs can be distributed as a separate package?

II. The functionality could live in a separate repo/ for a while until tried and tested on a multitude of projects?

@MarcSkovMadsen
Copy link
Collaborator Author

Regarding markdown. I prefer Markdown. Can this be Myst flavored Markdown now default for Sphinx? It would support better Sphinx generated docs as Panel matures I hope.

@philippjfr
Copy link
Member

Highly appreciate the attempt here and won't delete the branch so we can come back to it but the stubgen definitely shouldn't live in Panel and I've started experimenting with other approaches.

@philippjfr philippjfr closed this Jun 15, 2022
@MarcSkovMadsen
Copy link
Collaborator Author

Please note this branch contains code for converting all Parameter types used in Panel to type annotations. Also handles default values and Allow_None arguments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in progress type: discussion Requiring community discussion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants