mesa icon indicating copy to clipboard operation
mesa copied to clipboard

All functions with @solara.component annotation missing on read the docs

Open quaquel opened this issue 1 year ago • 6 comments
trafficstars

Something weird is going on: all functions annotated with @solara.component are not included in the read-the-docs API overview. I have checked the error log on RTD (we need to some cleaning...., but that's a seperate issue). I can't find anything related to this. No idea what is going on.

quaquel avatar Nov 02 '24 12:11 quaquel

Strange. @maartenbreddels, if I may ask, have you encountered this earlier by any chance?

EwoutH avatar Nov 02 '24 13:11 EwoutH

No, that's strange indeed. Looking at this example it seems that the docstring is passed 'up' to the decorator.

maartenbreddels avatar Nov 02 '24 17:11 maartenbreddels

My hunch is that the wrapper in solara.component should itself be annoted with functools.wraps to solve this problem. According to the docs "Without the use of this decorator factory, the name of the example function would have been 'wrapper', and the docstring of the original example() would have been lost."

quaquel avatar Nov 02 '24 17:11 quaquel

Hey @quaquel, I would like to contribute to this issue. Could you assign it to me?

Edu92337 avatar Mar 09 '25 20:03 Edu92337

Hey @Edu92337, yeah you can start working on the issue but it would be helpful if you could list your approach beforehand.

Sahil-Chhoker avatar Mar 10 '25 07:03 Sahil-Chhoker

In my understanding it's an upstream problem in Solara, so there is little we can do in MESA itself to fix the issue.

quaquel avatar Mar 10 '25 07:03 quaquel