Skip to content

Docstrings and parameters for generate#281

Open
rfebbo wants to merge 2 commits into
unihd-cag:masterfrom
rfebbo:docstrings
Open

Docstrings and parameters for generate#281
rfebbo wants to merge 2 commits into
unihd-cag:masterfrom
rfebbo:docstrings

Conversation

@rfebbo

@rfebbo rfebbo commented Aug 6, 2025

Copy link
Copy Markdown

I am working on adding parameters and docstrings to the generate function. Would this be useful for the main branch? Here is a snipet from workspace.pyi

    class abe:
      def blockages_from_cell_view(self, t_layerName, o_outLayer, g_queue):
            """             
abeBlockagesFromCellView(
t_layerName
o_outLayer
g_queue
[ ?maskColor g_maskColor ] 
)
=> o_abeLayer / nil
 
Copies blockages from the specified layer in the current ABE
session cellview to a new or existing ABE layer. Optional arguments
restrict the copied blockages to the specified ABE layer. This
function can be run immediately or added to the queue.

            """
            pass

@nielsbuwen

Copy link
Copy Markdown
Collaborator

Hi,

thank you for this pull request. That's a good idea. There is one issue however:

If i see that correctly, you parse the docstring to generate the parameter list. We tried that in the past and found too many inconsistencies.

  1. There are functions with multiple parameter lists (this could be solved with @overload)
  2. There are syntactically incorrect descriptions in the doc string for some functions (like missing closing parentheses)
  3. The docstrings are not complete for all functions

So, if you changed the PR to only generate a doc-string and not touch the parameter lists, then i would be happy to accept this PR

@rfebbo

rfebbo commented Aug 11, 2025

Copy link
Copy Markdown
Author

That makes sense. I made the changes so that it only generates docstrings.

@TM90

TM90 commented Aug 21, 2025

Copy link
Copy Markdown
Member

I tested the PR locally it looks good. Can you use indent around the docstring to get the correct formatting in the output file? Afterwards this PR is ready to be merged

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.

3 participants