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

Modify model directory documentation UI and related pages #3203

Merged
merged 61 commits into from
Aug 2, 2024

Conversation

jessica-mitchell
Copy link
Contributor

@jessica-mitchell jessica-mitchell commented May 2, 2024

This PR modifies the model directory page and how it functions as well as related pages with significant changes. There is now a interactive UI that dynamically loads results of button selection using Javascript.

See Read the Docs output here: https://nest-simulator--3203.org.readthedocs.build/en/3203/models/index.html

The script that extracted the model user docs and built the indices is heavily modified, and renamed to model_tag_setup.py, The script extracts the text and creates rst model pages and extracts the tags for each model and creates dictionaries, {model: [tags]} and [{tag: "tag", models: ["models"], count: # of models}]. These dictionaries are used in Jinja templates as well as a JSON file is created to be used by Javascript that will render the output client-side.

The models/index page now has a 'model selector' that displays each tag, in order of number of models that have that tag (with exception of neuron, synapse and device being the first tags) as multi-select buttons.
By clicking on one or more buttons the corresponding models will be displayed.

In addition to the model selector there is also a dropdown that lists in alphabetical order (grouped by neuron, synapse, and device) all models.

Some information from 'models-main' is moved into here. The page also has links to pages for more info on neurons, synapses and devices - these pages will require more work in the future but each of those pages also lists all corresponding models.

When working on this, I found that the pre-commit hook for clang would fail, so changes to it were also done, and fixes #3182
Fixes #2563

Copy link
Contributor

@clinssen clinssen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The models in the list displayed by the model selector have the pilcrow character ("¶") at the end of the link; can this be eliminated?

@jessica-mitchell
Copy link
Contributor Author

The models in the list displayed by the model selector have the pilcrow character ("¶") at the end of the link; can this be eliminated?

Yes, fixed

Copy link
Contributor

@clinssen clinssen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cheers!

Copy link
Contributor

@terhorstd terhorstd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the cool new look&feel of these pages and the huge amount of work that went into this restructuring! 🚀
I think this will be highly appreciated by all users 👍

The odd thing of checking the file headers can be solved in a separate PR.

doc/htmldoc/static/js/filter_models.js Show resolved Hide resolved
@terhorstd terhorstd merged commit 8ecdfd3 into nest:master Aug 2, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) S: Normal Handle this with default priority T: Enhancement New functionality, model or documentation
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Clang-format does not support JavaScript error Improve model directory listing in Read the Docs
3 participants