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

Clean up Sphinx warnings related to models #2236

Merged
merged 16 commits into from
Jan 18, 2022

Conversation

jessica-mitchell
Copy link
Contributor

@jessica-mitchell jessica-mitchell commented Dec 7, 2021

This PR resolves some of the warnings that Sphinx outputs related to models.

Many of the changes are related to items in the bibliography that were not cited properly.
There are also syntax fixes.

Because the restructured text files for models are autogenerated from a script, Sphinx warns that it doesnt' have them indexed.
So this PR also indexes the files by creating a JSON file from the extractor_userdocs.py that Sphinx reads and outputs in Jinja templated table of contents.

Fixes #1907

@jessica-mitchell jessica-mitchell added 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: Maintenance Work to keep up the quality of the code and documentation. labels Dec 7, 2021
@jessica-mitchell jessica-mitchell added this to In progress in Documentation via automation Dec 7, 2021
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.

Amazingly many details fixed! Thanks a lot!
Some double-backtics need a look, as discussed.

Documentation automation moved this from In progress to Review Dec 7, 2021
@jessica-mitchell
Copy link
Contributor Author

@terhorstd I addressed your comments, but since this was updating the double back ticks for some of the terms, I decided to go through and try find all terms that needed double back ticks and add them.

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.

This really fixes a lot of broken documentation! Much appreciated!!!
🚀

I have some small questions and comments just for clarification. Of course there are still tonnes of unquoted variables or math terms around, enough for such PRs in months to come. For this one we should however not take more changes into the set. Let's try to finish this one first, then eventually start a new one.

models/correlomatrix_detector.h Outdated Show resolved Hide resolved
models/gamma_sup_generator.h Show resolved Hide resolved
models/gauss_rate.h Outdated Show resolved Hide resolved
models/glif_cond.h Outdated Show resolved Hide resolved
models/glif_cond.h Show resolved Hide resolved
models/iaf_psc_exp_ps_lossless.h Outdated Show resolved Hide resolved
models/rate_neuron_ipn.h Outdated Show resolved Hide resolved
models/rate_neuron_opn.h Outdated Show resolved Hide resolved
models/tanh_rate.h Outdated Show resolved Hide resolved
models/tanh_rate.h Outdated Show resolved Hide resolved
@heplesser
Copy link
Contributor

I just tried to build documentation from this branch. This failed because nest could not be imported with our fancy new way of managing the nest module in Python. Has anyone else seen this problem? The testsuite runs find and PyNEST works otherwise.

Running Sphinx v3.5.3

Configuration error:
There is a programmable error in your configuration file:

Traceback (most recent call last):
  File "/Users/plesser/miniforge3/envs/nest-simulator-dev/lib/python3.9/site-packages/sphinx/config.py", line 327, in eval_config_file
    execfile_(filename, namespace)
  File "/Users/plesser/miniforge3/envs/nest-simulator-dev/lib/python3.9/site-packages/sphinx/util/pycompat.py", line 88, in execfile_
    exec(code, _globals)
  File "/Users/plesser/NEST/bld_jessica/doc/userdoc/conf.py", line 87, in <module>
    nest.NestModule = type(nest)
  File "/Users/plesser/NEST/src/pynest/nest/__init__.py", line 423, in _setattr_error
    raise err from None
AttributeError: can't set attribute 'NestModule' on module 'nest'

Copy link
Contributor

@jougs jougs left a comment

Choose a reason for hiding this comment

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

Many thanks! This is really a great improvement. Above my suggestions, I have a feeling that there might be more variable names in the tsodyks_* files that need marking up.

doc/extractor_userdocs.py Outdated Show resolved Hide resolved
doc/userdoc/conf.py Outdated Show resolved Hide resolved
models/gamma_sup_generator.h Show resolved Hide resolved
models/iaf_psc_alpha.h Outdated Show resolved Hide resolved
models/iaf_psc_delta_ps.h Outdated Show resolved Hide resolved
models/tsodyks_synapse.h Outdated Show resolved Hide resolved
models/tsodyks_synapse_hom.h Outdated Show resolved Hide resolved
models/tsodyks_synapse_hom.h Outdated Show resolved Hide resolved
models/tsodyks_synapse.h Outdated Show resolved Hide resolved
models/tsodyks_synapse.h Outdated Show resolved Hide resolved
@jougs
Copy link
Contributor

jougs commented Dec 15, 2021

@heplesser: This should be fixed by #2244.
@jessica-mitchell: can you please merge upstream/master?

@jougs
Copy link
Contributor

jougs commented Dec 15, 2021

And just for the record: There is a certain potential for conflict with #2246.

jessica-mitchell and others added 3 commits January 6, 2022 14:16
Co-authored-by: Jochen Martin Eppler <j.eppler@fz-juelich.de>
Co-authored-by: Dennis Terhorst <terhorstd@users.noreply.github.com>
@jougs
Copy link
Contributor

jougs commented Jan 11, 2022

@jessica-mitchell: friendly ping!

@jessica-mitchell
Copy link
Contributor Author

@jougs thanks for the reminder -I am working on this - Sphinx failed to build after the changes you or Dennis made in the extractor_userdocs.py were committed, so I'm trying to fix it (I have a fix, but I've noticed another issue, which I'm looking into)

Copy link
Contributor

@jougs jougs left a comment

Choose a reason for hiding this comment

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

The recent commits address all my concerns. Thanks again!

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.

Lots of improvements! Thanks for making the docs a better place! 👍

@heplesser heplesser merged commit a62817d into nest:master Jan 18, 2022
Documentation automation moved this from Review to Done Jan 18, 2022
@jessica-mitchell jessica-mitchell deleted the cleanup-docbuild-models branch April 17, 2024 18:08
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: Maintenance Work to keep up the quality of the code and documentation.
Projects
Documentation
  
Done
Development

Successfully merging this pull request may close these issues.

Fix sphinx-build warnings (cont.)
4 participants