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 based documentation #3

Merged
merged 14 commits into from
Dec 7, 2023
Merged

Conversation

j-i-l
Copy link
Collaborator

@j-i-l j-i-l commented Dec 3, 2023

closes #2

The package should get a web-based documentation.

The following tasks will be addressed in this pull request:

  • Basic structure for a sphinx documentation
  • Extracting documentations from docstrings
  • Setup of GH actions to deploy the documentation

@j-i-l j-i-l linked an issue Dec 3, 2023 that may be closed by this pull request
@j-i-l j-i-l self-assigned this Dec 3, 2023
@j-i-l j-i-l force-pushed the 2-building-a-documentation-with-sphinx branch 2 times, most recently from 9e92003 to e69b151 Compare December 3, 2023 20:40
@j-i-l j-i-l force-pushed the 2-building-a-documentation-with-sphinx branch from e69b151 to 8fb4691 Compare December 3, 2023 20:46
@j-i-l
Copy link
Collaborator Author

j-i-l commented Dec 3, 2023

@alexbovet you can checkout the basic styling and rough extract from the docstrings in the 'checks'.

Here is a link to the last one:
https://github.com/alexbovet/flow_stability/suites/18712945827/artifacts/1089308064
simply extract the content of the zip file and open the index.html in your browser.

Questions:

@alexbovet
Copy link
Owner

Hey, thanks! I quite like the Insegel theme. What is the advantage of readthedocs vs a github page?

@j-i-l
Copy link
Collaborator Author

j-i-l commented Dec 4, 2023

Readthedocs is a prominent and free hoster for software documentations, especially for python. Its advantage are the easily accessible features (mostly that's versioning and previews for pull requests). The drawback is yet another service to register, though you can authenticate with GitHub.
With GH pages you have everything in one place (i.e. on GitHub) but versioning and preview features are not (yet?) available for pages. They can, kind of, be implemented with job artifacts, but it's more of a hack.
I would go for readthedocs.

@alexbovet
Copy link
Owner

Ok for readthedocs then!

@j-i-l
Copy link
Collaborator Author

j-i-l commented Dec 4, 2023

It seems also to be a good combination:

From https://insegel.readthedocs.io/en/latest/:

The theme [Insegel] itself can be deployed anywhere, but has specific enhancements for hosting on ReadTheDocs.

@j-i-l
Copy link
Collaborator Author

j-i-l commented Dec 4, 2023

@j-i-l
Copy link
Collaborator Author

j-i-l commented Dec 4, 2023

@alexbovet On ReadTheDocs there is always someone that 'hosts' the documentation. I would recommend that you are the one hosting it. But I'm also fine with hosting it on my account.

If you want to host it, then:

  • sign in to readthedocs.org with your github account (or any other sign in method)
  • under https://readthedocs.org/dashboard/ click on Import a Project
  • import it (the .readthedocs.yml from the 2nd step is already added in this branch)
  • once it is added click on the project select Admin > Advanced Settings > check the Build pull requests for this project box and save.

Now we should start to see preview builds in the pull request already.

@alexbovet
Copy link
Owner

Should I import the main branch?

@j-i-l
Copy link
Collaborator Author

j-i-l commented Dec 5, 2023

Yes, I would keep it simple.

@alexbovet
Copy link
Owner

ok done

@j-i-l
Copy link
Collaborator Author

j-i-l commented Dec 5, 2023

Great!
@alexbovet if you click on Show al checks on the All checks have passed entry, and then on Details on the 8docs/redthedocs.org:... you will see a preview of the docs.

Now we can start to fix-up the docstrings and populate the documentation some more.

@j-i-l j-i-l requested a review from alexbovet December 5, 2023 20:21
@j-i-l j-i-l added the documentation Improvements or additions to documentation label Dec 5, 2023
@j-i-l j-i-l marked this pull request as ready for review December 5, 2023 22:43
@j-i-l
Copy link
Collaborator Author

j-i-l commented Dec 6, 2023

@alexbovet If this is fine with you, I'd merge this branch into main as it contains a first functioning version of the documentation.
Better formatting the docstrings, adding examples and further details to the documentation can then be done separately.
Alternatively, we can keep on populating the documentation in this branch and merge it only once we are happy with the state of the documentation. The drawback here is only that this branch will then contain edits of most (if not all) *.py files and thus will be less straight forward to merge, if other edits happened in-between.

@alexbovet alexbovet merged commit 9d187a1 into main Dec 7, 2023
1 check passed
@j-i-l j-i-l deleted the 2-building-a-documentation-with-sphinx branch December 7, 2023 09:34
@j-i-l j-i-l added this to the JOSS paper submission milestone Aug 14, 2024
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Building a documentation with sphinx
2 participants