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

docs: use sphinx for python + C++ documentation #294

Closed
wants to merge 6 commits into from

Conversation

vishwa2710
Copy link
Contributor

To play with this locally:

  • make dev
  • make build-documentation
  • cd docs/_build
  • python3 -m http.server 8000

Navigate to localhost:8000 on your machine (ensure that the port is being properly forwarded).

There are some known issues here:

  • linking of images/files in the README.md are not being done properly as the file is being inherited in a different folder.

We are using breathe (https://breathe.readthedocs.io/en/latest/directives.html#doxygengroup) to import the doxygen XML file into sphinx. I had to clean up the XML file to remove unnecessary information like files, dirs etc. (Thus the python script)

We are using Sphinx-Immaterial for the theme + documentation: https://sphinx-immaterial.readthedocs.io/en/latest/index.html

A reference repo I have been using: https://github.com/mhostetter/galois/blob/main/docs/index.rst?plain=1
Which produces this page: https://galois.readthedocs.io/en/v0.3.6/api/

Copy link

codecov bot commented Dec 5, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1be8bfd) 85.77% compared to head (116fea2) 85.78%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #294      +/-   ##
==========================================
+ Coverage   85.77%   85.78%   +0.01%     
==========================================
  Files          71       71              
  Lines        6304     6310       +6     
==========================================
+ Hits         5407     5413       +6     
  Misses        897      897              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kyle-cochran
Copy link
Contributor

Weird, the arguments for some functions are collapsed. Here, the State constructor shows ... for most inputs.
Screenshot 2023-12-05 at 3 28 49 PM

@vishwa2710
Copy link
Contributor Author

@kyle-cochran I believe if you click on the function it enumerates them.

Copy link
Contributor

@apaletta3 apaletta3 left a comment

Choose a reason for hiding this comment

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

Dude this is seriously awesome!!

Drawing your attention to a couple things that don't work in case your missed them

  • The dynamic title of the page seems to only work for the PythonAPI, not the CPP API
    image
    image

  • For the cpp API, Access seems to be a "group" above all the other classes.

  • The sidebar dropdown for both the cpp and python APIs both start fully expanded, I don't know if there's a setting to make them show up as collapsed as first, cause that would be easier to read.

.md-banner {
background-color: var(--md-typeset-mark-color);
color: var(--md-default-fg-color);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
}
}

end of file line

@vishwa2710 vishwa2710 closed this Feb 5, 2024
@vishwa2710 vishwa2710 deleted the users/vishwa/sphinx-docs branch February 5, 2024 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants