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

Sphinx documentation for python #158

Merged
merged 12 commits into from
Oct 9, 2024
Merged

Conversation

ewanwm
Copy link
Collaborator

@ewanwm ewanwm commented Oct 9, 2024

Pull request description:

Add in ability to generate sphinx documentation for the pyMaCh3 module

Changes or fixes:

added all necessary configs and some instructions on how to build to the readme

Examples:

Behold
Sphinx example

Marvel at its beauty
sphinx function doc example

@github-actions github-actions bot added Documentation Improvements or additions to documentation Plotting plotting related python labels Oct 9, 2024
@KSkwarczynski
Copy link
Member

As somone who don't have much expiereince with spinx.
Is it possible to specify within doxyfile additional html which would point to s?

This way within
https://mach3-software.github.io/MaCh3/index.html
we will have docuemtation for pyMaCh3.

Or maybe something dumb and we need anohter repo pyMaCh3Web with spinx insutction etc.

I like auto generated spinx that Henry did
https://github.com/mach3-software/MaCh3-PythonUtils/blob/main/.github/workflows/sphinx-render.yml

@ewanwm ewanwm closed this Oct 9, 2024
@ewanwm ewanwm reopened this Oct 9, 2024
@ewanwm
Copy link
Collaborator Author

ewanwm commented Oct 9, 2024

Yeah I'm also not much of an expert but have looked into this a bit. There are a few different tools for integrating doxygen and sphinx documentation. I think Breathe is one thats quite widely used. So I think it definitely should be possible and also I was planning to have them auto-generated too. I was planning to do this in a later pr though as I'm not sure how much will need to change or how much work it will be.

# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'pyMaCh3'
copyright = '2024, Ewan Miller'
Copy link
Contributor

Choose a reason for hiding this comment

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

Hyper nitpicky but I think MaCh3 has a copyright licence 😆

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

lol my plan to steal MaCh3 has been foiled

README.md Outdated
Comment on lines 78 to 94

### Sphinx Documentation

The pyMACh3 module is documented using sphinx. Currently you need to build this documentation yourself if you want it (in future this will be automated). To do this, you will need to install Mach3 with its python extension as described above, then go to the [Doc/sphinx](Doc/sphinx) directory. Then you will need to install sphinx and the necessary extensions which can be done using

```
pip install -r requirements.txt
```

then you can simply do

```
make html
```

and the documentation will be built in the build/html directory which you can open with whatever browser you like.

Copy link
Member

Choose a reason for hiding this comment

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

can you move this readme somehwere else? for example to Doc/spinx?

If you are planning to make this autgoerated then maye not add this to main readme?

I worry this will confuse people.

@ewanwm ewanwm merged commit 2188dc2 into develop Oct 9, 2024
10 checks passed
@ewanwm ewanwm deleted the feature_sphinx_documentation branch October 9, 2024 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Improvements or additions to documentation Plotting plotting related python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants