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

Documentation UX revamp and internal CMake docbuild restructuring #2544

Merged
merged 14 commits into from
Dec 1, 2022

Conversation

Helveg
Copy link
Contributor

@Helveg Helveg commented Nov 30, 2022

This PR aims to present users with a simple streamlined approach to building the documentation. A user requests which documentation they are interested in by toggling CMake flags for documentation types aimed at certain target audiences, and CMake figures out which documentation targets need to be configured for that. Documentation is generated either implicitly upon installation (make install), or explicitly by using make docs, or any of the subtargets, but the subtargets aren't considered public features.

Documentation targets are:

  • sphinxdocs: Uses Sphinx to generate the html documentation, and lots of stuff happens, see comment in code.
  • doxygendocs: Uses Doxygen to generate the dev docs.
  • There is a legacy block for SLI docs, that I didn't refactor as SLI is removed soon.

Documentation flags are:

  • with-userdoc: Toggles the user documentation, on by default.
  • with-devdoc: Toggles the developer documentation, off by default.

User stories

  • I want to install NEST
    • Userdocs are generated and installed along with the NEST library
  • I want to turn off this documentation
    • I pass -Dwith-userdoc=OFF
  • I want to have developer documentation
    • I pass -Dwith-devdoc=ON
  • I want to build the docs, not NEST
    • I use make docs instead of make install

closes #1905

@heplesser heplesser added S: Normal Handle this with default priority T: Maintenance Work to keep up the quality of the code and documentation. I: User Interface Users may need to change their code due to changes in function calls labels Nov 30, 2022
@heplesser heplesser added this to In progress in Documentation via automation Nov 30, 2022
@heplesser heplesser self-assigned this Nov 30, 2022
@Helveg
Copy link
Contributor Author

Helveg commented Nov 30, 2022

Since building the user documentation brings in a lot of additional build time and dependencies, that need to be installed from different source (apt, pip, built from source, ...) and the ReadTheDocs documentation is more accessible, and more convenient, we opted to turn off the local build of the documentation.

@jessica-mitchell
Copy link
Contributor

@Helveg thanks for this PR
the docs seem to build correctly but there is this error at the end of the for userdocs build:

cmake -Dwith-userdoc=ON ~/Work/repo/nest-simulator/
make docs

image

the devdoc flag does not elicit any errors.

@Helveg
Copy link
Contributor Author

Helveg commented Nov 30, 2022

I can't reproduce this. Do you have the proper file permissions to execute resolve_includes.py; is it executable? If I'm interpreting the image correctly, it looks like it's trying to run resolve_includes.py as a shell script, which is not something that happens for me, it should probably be ran using python, maybe somehow Python_EXECUTABLE was empty, we can look at it together.

@jessica-mitchell jessica-mitchell moved this from In progress to Review in Documentation Nov 30, 2022
Copy link
Contributor

@jessica-mitchell jessica-mitchell left a comment

Choose a reason for hiding this comment

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

thanks @Helveg I just have a few changes

Co-authored-by: jessica-mitchell <mitchell20j@gmail.com>
Copy link
Contributor

@jessica-mitchell jessica-mitchell left a comment

Choose a reason for hiding this comment

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

thanks lgtm!

@Helveg Helveg merged commit 11a570e into nest:master Dec 1, 2022
Documentation automation moved this from Review to Done Dec 1, 2022
@Helveg Helveg deleted the make-targets-to-cmake branch December 1, 2022 13:55
@Helveg Helveg changed the title Documentation UX revamp and internal CMake restructuring Documentation UX revamp and internal CMake docbuild restructuring Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I: User Interface Users may need to change their code due to changes in function calls 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.

Sort out and document CMake targets
3 participants