-
Notifications
You must be signed in to change notification settings - Fork 9
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
Sphinx documentation in doc folder #13
Conversation
Hi, I wonder why there is no numpydoc in the extensions? And why you put so many rst files manually instead of autogeneration? Compare to how it is done in LaPy (also templates are missing)? |
Hello, I believe the sphinx-API doc in step-4 reads the .py files with docstring which I why I could see numpy docstring in the source code. Sphinx api doc command creates as many rst files as many python packages are there in the file. In brinprint we have utilis, commands, brainprint class, asymmetry, and onemore module. So sphinx api created all the corresponding rst files automatically, then its up to us which rst file we would like to add to our project. This is another method of autogeneration of rst files which I used instead of the one we used in LapY project. The reason why I used this method is that I was getting loads of warnings and errors while building html page with the LaPy method. I configured the rest as per LaPy method. |
Codecov Report
@@ Coverage Diff @@
## main #13 +/- ##
=======================================
Coverage 27.19% 27.19%
=======================================
Files 8 8
Lines 353 353
Branches 43 43
=======================================
Hits 96 96
Misses 255 255
Partials 2 2
Flags with carried forward coverage won't be shown. Click here to find out more. 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Sphinix documentation based on LaPy method bbbcc9d
What steps I followed to generate .rst files:
In order to solve import error, I have used isort tool which automatically sorted conf.py file.
Note: BrainPrint API reference are splited into modules and brainprint classes for distinction. This can be changed as per requirements. |
In commit 9170585 the absolute path(local) from sphinx gallery configuration has been removed so that the document can be built on any version control systems like Git. Please refer to line no. 234 of conf.py file. |
In commit f0122ea index.rst file has been modfied as per readme.me content. Convert README.md file which was in markdown format to index.rst file which is in restructured text. With direct parsing of readme.md file the sphinix is unable to recognize .md format and therefore it does not generate proper headings and cover entire long text in oneline. It also does not recognize clickable pypi image in the start. |
doc/references.bib
Outdated
@article{conformal_parameterization_2020, | ||
author = {Choi, Gary P. T. and Leung-Liu, Yusan and Gu, Xianfeng and Lui, Lok Ming}, | ||
doi = {10.1137/19M125337X}, | ||
journal = {SIAM Journal on Imaging Sciences}, | ||
number = {3}, | ||
pages = {1049-1083}, | ||
title = {Parallelizable Global Conformal Parameterization of Simply-Connected Surfaces via Partial Welding}, | ||
volume = {13}, | ||
year = {2020} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This reference should be dropped as it is only relevant for Lapy and not Brainprint
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reference has been dropped 20a1154
I wonder if we can find out a way to directly include the README.md rather than having a copy in rst . Currently we need to remember to edit both files if we change anything, which is not great. |
black fails on conf.py |
doc/conf.py
Outdated
anchor = "" | ||
|
||
# Replace <gh_url> with the actual GitHub repository URL | ||
gh_url = "https://github.com/Deep-MI/BrainPrint" # Replace with your repository URL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gh_url is set as a variable in line 24, why is that not enough?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed gh_url in line 24 is enough. Line 178 has been commented out. 46c2200
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, please remove that line and comments so that the function is identical again to the one in lapy.
True, I actually tried including README.md file directly into index.rst file but .rst file did not properly render and import .md file content and it was not properly formatted as per readme.md file. I will look more into other methods to include README.md file. |
conf.py file has been reformatted using black. 521ad6c |
Conf.py still fails in black. Maybe gh action uses a different version of black? |
Hello, Regarding the issue with conf.py failing in black, I am using the same version (23.7.0) of black as GitHub. Additionally, I've ensured that the conf.py adheres to the configuration defined in 'Brainprint/pyproject.toml' by running black --verbose conf.py. My local and GitHub Actions configurations are in sync." d34a723 |
**Sphinix documentation **
What steps I followed to generate .rst files
Note: The source files are not getting linked with corresponding github source code due to errors in step_2