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

Create sphinx doc #26

Merged
merged 49 commits into from
Nov 30, 2021
Merged

Create sphinx doc #26

merged 49 commits into from
Nov 30, 2021

Conversation

jo-mueller
Copy link
Contributor

Description

  • I added (automatically generated) basic documentation of all modules, functions and example notebooks. I created a workflow that automatically rebuilds the doc pages upon PR requests. The documentation can always be created manually during development by running make html inside the docs file.

  • I furthermore moved the example notebooks to docs/_include/notebooks to make them available to the html build.

  • I made minor changes in practically every docstring to make them consistent with numpy format standards.

  • I added the link to the documentation page to the front-page Readme.

Type of change

  • Bug-fix
  • New feature
  • Breaking change
  • Documentation update

References

Addresses #25

Tests

  • I adapted existing tests, because
  • I added new tests to cover the code change
  • All tests pass with my change

Final checks

  • My change is the minimal possible work for the desired feature/fix
  • I updated the documentation where necessary to cover the change

@jo-mueller
Copy link
Contributor Author

Sidenote on the many commits: I tried to implement a github action that would automatically build the documentation as soon as a PR is submitted but this does not seem to work nicely. Deploying the html pages to biapol.github.io/biapol-utilities works well, though.

This means, that every future PR with a new function would have to be preceded by a call of make html in the docs file. Is this feasible?

@haesleinhuepf
Copy link
Member

This means, that every future PR with a new function would have to be preceded by a call of make html in the docs file. Is this feasible?

It should be possible with git at every commit. But for now I would maybe invoke this manually, and add a checkbox to the PR-template to remind us ;-)

Btw. this cannot be reviewed efficiently as 105 files have been changed. Thus, I suggest you merge and cross fingers that nothing breaks ;-)

@jo-mueller
Copy link
Contributor Author

Btw. this cannot be reviewed efficiently as 105 files have been changed. Thus, I suggest you merge and cross fingers that nothing breaks ;-)

Yes, this is indeed a problem, which will persist on future PRs, as updating the doc will create a lot of downstream file changes (html build, etc). Another solution (which is apparently often used) is to push the generated doc files to a separate branch that hosts the documentation.

@haesleinhuepf
Copy link
Member

@jo-mueller Please add a section "How to build documentation" to the readme. Afterwards, feel freel to merge. Check if everything still works then.

@github-pages github-pages bot temporarily deployed to github-pages November 30, 2021 14:06 Inactive
@github-pages github-pages bot temporarily deployed to github-pages November 30, 2021 14:10 Inactive
@github-pages github-pages bot temporarily deployed to github-pages November 30, 2021 14:11 Inactive
@github-pages github-pages bot temporarily deployed to github-pages November 30, 2021 14:13 Inactive
@github-pages github-pages bot temporarily deployed to github-pages November 30, 2021 14:22 Inactive
docs/build_environment.yml Outdated Show resolved Hide resolved
@jo-mueller
Copy link
Contributor Author

Sorry for the back and forth on this topic. I am trying to get a workflow running that automatically builds the doc and pushes it to a separate branch but can't really get it to work. 🙄

@github-pages github-pages bot temporarily deployed to github-pages November 30, 2021 15:04 Inactive
@jo-mueller
Copy link
Contributor Author

Sorry for the back and forth on this topic. I am trying to get a workflow running that automatically builds the doc and pushes it to a separate branch but can't really get it to work. 🙄

Maybe that's a topic for a new PR :)

@github-pages github-pages bot temporarily deployed to github-pages November 30, 2021 15:08 Inactive
@github-pages github-pages bot temporarily deployed to github-pages November 30, 2021 15:10 Inactive
@jo-mueller jo-mueller merged commit e3761f4 into main Nov 30, 2021
@jo-mueller jo-mueller deleted the create-sphinx-doc branch November 30, 2021 15:13
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.

Documentation
2 participants