Skip to content

Add github action to see if the docs build without errors#13

Open
phackstock wants to merge 3 commits into
iiasa:mainfrom
phackstock:feature/add-build-docs-workflow
Open

Add github action to see if the docs build without errors#13
phackstock wants to merge 3 commits into
iiasa:mainfrom
phackstock:feature/add-build-docs-workflow

Conversation

@phackstock

@phackstock phackstock commented Jun 21, 2022

Copy link
Copy Markdown
Contributor

Closes #12.

Adding a GitHub action to verify that the docs can be built without any errors. Runs on every PR and on pushes on main.

  • Tests added
  • Documentation added
  • Example added (in the documentation, to an existing notebook, or in a new notebook)
  • Description in CHANGELOG.rst added (single line such as: (`#XX <https://github.com/iiasa/climate-assessment/pull/XX>`_) Added feature which does something)

@phackstock
phackstock requested review from jkikstra and znicholls June 21, 2022 14:41
znicholls
znicholls previously approved these changes Jun 21, 2022

@znicholls znicholls left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Do we want to (either here or make a new issue) add:

  • stricter check that there's no warning on build (e.g. sphinx-build -M html docs/source docs/build -qW)
  • check that all the modules that should be covered are indeed covered when building the docs (somehow with sphinx-build -M html docs/source docs/build -Eqn -b coverage and some other stuff I think this can be made to work well)

@phackstock

Copy link
Copy Markdown
Contributor Author

@znicholls I took a quick look at both your suggestions and they both look really good to me.
There's one slight issue which is that currently there is a README.rst file in the root of the doc/ folder. Since this is just meant as instructions on GitHub it is not included in the docs, therefore both checks, for any warnings and excluded files currently fail.
The easiest solution would be to create another folder inside the doc/ source such as doc/source.

@znicholls

Copy link
Copy Markdown
Collaborator

Nice pickup.

I've always used docs/source for my docs so would go with that but also happy to leave this as an issue for another day and merge here.

@jkikstra

Copy link
Copy Markdown
Collaborator

Hey, would indeed be nice I think to remove the warning, but keep the instructions on GitHub. If that can work, i don't really mind where that file would rest, so I'd vote for doing the easiest way there - can be done within this PR as doc/source I guess.

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.

Add doc workflow

3 participants