nest / nestml

A domain specific language for neuron and synapse models in spiking neural network simulation
GNU General Public License v2.0
46 stars 45 forks source link

Add pretty code rendering feature #1081

Closed clinssen closed 1 week ago

clinssen commented 2 months ago

Use for marketing/documentation purposes.

clinssen commented 2 months ago

Do we need to merge the images as well? We can generate them whenever required by just running the script, right?

That's true, I thought it might help to show what the output would look like. Perhaps we should add this feature as a kind of mock "code generator" in the documentation, what do you think?

pnbabu commented 2 months ago

Do we need to merge the images as well? We can generate them whenever required by just running the script, right?

That's true, I thought it might help to show what the output would look like. Perhaps we should add this feature as a kind of mock "code generator" in the documentation, what do you think?

What do you mean by "mock code generator" here? We are not generating any code but rather rendering the model code in. a pretty format, correct?

clinssen commented 2 months ago

Well, hypothetically we could add an extra code generation target platform which would do the pretty printing, akin to the model docs generator (autodoc). I'm not sure if it's the right thing to do or if it's going too far for such a simple feature.

pnbabu commented 2 months ago

Well, hypothetically we could add an extra code generation target platform which would do the pretty printing, akin to the model docs generator (autodoc). I'm not sure if it's the right thing to do or if it's going too far for such a simple feature.

I wouldn't go as far as to have a new code generator for this as this feature would be rarely used. I think just retaining the scripts and generating the images when required would be enough.

clinssen commented 1 month ago

I have refactored the pretty rendering feature as a separate code generator.

The rendered version of the docs can be found here: https://nestml--1081.org.readthedocs.build/en/1081/running/index.html

clinssen commented 3 weeks ago

Thank you for the review! The latest changes should address your comments.

clinssen commented 1 week ago

Many thanks for the review!