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

add doxygen documentation #946

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

nicolasaunai
Copy link
Member

@nicolasaunai nicolasaunai commented Feb 13, 2025

This adds the doxygen configuration for generating developer's documentation.
I'm not sure we want the doxygen html outputs generated somewhere (where? how automatically?) or we want to use breathe extention to sphinx to couple our sphinx documentation published on readthedoc to doxygen comments in our code.
TBD together

Summary by CodeRabbit

  • Documentation

    • Enhanced documentation generation with a new configuration supporting multiple output formats (HTML, LaTeX) and Markdown.
    • Introduced a new developer documentation section to consolidate key guidelines.
    • Expanded support for reStructuredText and Markdown sources.
  • Chores

    • Streamlined the build process by adding targets to clean up build artifacts and trigger documentation generation.

Copy link

coderabbitai bot commented Feb 13, 2025

📝 Walkthrough

Walkthrough

This pull request introduces documentation improvements for the project. It adds a new Doxygen configuration file with comprehensive settings for generating project documentation. The Makefile is updated with two new targets: one for cleaning build artifacts and another for running the Doxygen build. Additionally, a new "Developer documentation" section is added to an existing markdown file. The Sphinx configuration now supports Markdown files by including the myst_parser extension and updating the source suffix settings, along with adding the corresponding dependency.

Changes

File(s) Change Summary
doc/Doxyfile.in Added a new Doxygen configuration file with project-specific options for generating documentation.
doc/Makefile Introduced two new targets: clean to remove build artifacts and Doxygen-build to generate documentation using Doxygen.
doc/doxypages/main.md Added a new "Developer documentation" section containing important developer notes.
doc/source/conf.py, doc/source/requirements.txt Updated Sphinx configuration to support Markdown by adding the myst_parser extension and modifying source_suffix; added myst-parser as a dependency.

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer
    participant Make as Makefile
    participant Sphinx as Sphinx Build System

    Dev->>Make: Run "make clean"
    Make->>Sphinx: Execute Sphinx clean command (remove build directory)
    Sphinx-->>Make: Build directory removed
    Make-->>Dev: Clean complete
Loading
sequenceDiagram
    participant Dev as Developer
    participant Make as Makefile
    participant Doxygen as Doxygen Tool

    Dev->>Make: Run "make Doxygen-build"
    Make->>Doxygen: Invoke Doxygen using Doxyfile
    Doxygen-->>Make: Documentation generated
    Make-->>Dev: Doxygen build complete
Loading

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8a075b2 and 3d5fe02.

📒 Files selected for processing (1)
  • doc/source/requirements.txt (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • doc/source/requirements.txt
⏰ Context from checks skipped due to timeout of 90000ms (6)
  • GitHub Check: build (macos-latest)
  • GitHub Check: build (macos-14)
  • GitHub Check: Analyze (cpp)
  • GitHub Check: build (macos-13)
  • GitHub Check: Analyze (python)
  • GitHub Check: build (ubuntu-latest)

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (1)
doc/Makefile (1)

25-26: Enhance the Doxygen-build target.

Consider adding error handling and making the target phony.

+.PHONY: help Makefile clean Doxygen-build
+
 Doxygen-build:
-	doxygen Doxyfile
+	@command -v doxygen >/dev/null 2>&1 || { echo >&2 "doxygen not found. Please install it."; exit 1; }
+	@doxygen Doxyfile || { echo >&2 "Doxygen documentation generation failed"; exit 1; }
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ce77d6b and 8a075b2.

📒 Files selected for processing (5)
  • doc/Doxyfile.in (1 hunks)
  • doc/Makefile (1 hunks)
  • doc/doxypages/main.md (1 hunks)
  • doc/source/conf.py (2 hunks)
  • doc/source/requirements.txt (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • doc/source/requirements.txt
🧰 Additional context used
🪛 LanguageTool
doc/doxypages/main.md

[uncategorized] ~4-~4: “were” seems less likely than “where”.
Context: # Developer documentation This is were all dark secrets are revealed.

(AI_HYDRA_LEO_CPT_WERE_WHERE)

⏰ Context from checks skipped due to timeout of 90000ms (5)
  • GitHub Check: build (macos-latest)
  • GitHub Check: build (macos-14)
  • GitHub Check: Analyze (cpp)
  • GitHub Check: build (macos-13)
  • GitHub Check: build (ubuntu-latest)
🔇 Additional comments (1)
doc/source/conf.py (1)

53-53: LGTM! Good addition of Markdown support.

The addition of the myst_parser extension and .md file support enhances documentation capabilities by allowing both reStructuredText and Markdown files.

Also applies to: 87-88

PROJECT_BRIEF = "adaptive mesh refinement hybrid kinetic code"
PROJECT_LOGO =
PROJECT_ICON =
OUTPUT_DIRECTORY = /home/aunai/Documents/code/phare/PHARE/doc/build
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Replace hardcoded output directory path.

The output directory is hardcoded to a specific user's path which will not work for other developers.

Replace with a relative path:

-OUTPUT_DIRECTORY       = /home/aunai/Documents/code/phare/PHARE/doc/build
+OUTPUT_DIRECTORY       = @CMAKE_CURRENT_BINARY_DIR@
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
OUTPUT_DIRECTORY = /home/aunai/Documents/code/phare/PHARE/doc/build
OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@

Comment on lines +1 to +4

# Developer documentation

This is were all dark secrets are revealed.
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Enhance the developer documentation content.

The current content is too informal and lacks substance. Consider adding:

  • Purpose of the developer documentation
  • Overview of the codebase structure
  • Setup instructions
  • Contribution guidelines

Would you like me to help generate a more comprehensive template for the developer documentation?

🧰 Tools
🪛 LanguageTool

[uncategorized] ~4-~4: “were” seems less likely than “where”.
Context: # Developer documentation This is were all dark secrets are revealed.

(AI_HYDRA_LEO_CPT_WERE_WHERE)


# Developer documentation

This is were all dark secrets are revealed.
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix grammatical error.

There's a typo in the sentence.

-This is were all dark secrets are revealed.
+This is where all dark secrets are revealed.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
This is were all dark secrets are revealed.
This is where all dark secrets are revealed.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~4-~4: “were” seems less likely than “where”.
Context: # Developer documentation This is were all dark secrets are revealed.

(AI_HYDRA_LEO_CPT_WERE_WHERE)

@nicolasaunai
Copy link
Member Author

limits sphinx version, see #955

@nicolasaunai nicolasaunai marked this pull request as draft February 20, 2025 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant