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

Basic mkdocs documentation setup #75

Merged
merged 12 commits into from
May 28, 2022
Merged

Basic mkdocs documentation setup #75

merged 12 commits into from
May 28, 2022

Conversation

rlskoeser
Copy link
Contributor

this pr adds basic documentation setup

  • docs dependencies added as extra / optional install in setup.py
  • very basic mkdocs setup; pulled in the existing docs/*.md files, linked the main readme to be the index of the docs site, added a code reference file to generate docs from code docstrings using google format
  • added notes to contributing file about docstring format and instructions for building docs locally
  • github action to publish mkdocs —based on https://github.com/marketplace/actions/deploy-mkdocs ; not sure how to test this before merging! at minimum a maintainer will need to configure a GITHUB_TOKEN secret to allow the deploy

should be possible to create PR check to confirm documentation builds correctly, and maybe even check documentation coverage, but I'm less familiar with mkdocs than sphinx

@rlskoeser rlskoeser requested a review from a team May 27, 2022 16:59
@azaroth42
Copy link
Contributor

Looks great, agree not sure how to test other than to merge and see what happens.

.github/workflows/docs.yml Outdated Show resolved Hide resolved
@rlskoeser
Copy link
Contributor Author

ok, I've updated the workflow so it will build docs in strict mode on pull requests (which required me to do a little docstring cleanup — if you look at previous builds you can see it failed), and then should build & publish on push to main.

Copy link
Member

@digitaldogsbody digitaldogsbody left a comment

Choose a reason for hiding this comment

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

Great work - thanks!

@glenrobson glenrobson merged commit 6a9ffca into iiif-prezi:main May 28, 2022
@glenrobson
Copy link
Contributor

I'm afraid the build failed on master: https://github.com/iiif-prezi/iiif-prezi3/runs/6633389984?check_suite_focus=true

@digitaldogsbody
Copy link
Member

@rlskoeser
Copy link
Contributor Author

@glenrobson sorry I haven't gotten back to this, was thinking to open a pr with a suggested fix but haven't had time. It seems like the mkdocs workflow action doesn't use the same environment as the workflow where we're installing dependencies. I think the simplest thing would be to build the docs similar to the way we build them on PRs (or maybe that exact same action), and then use a different GH action to publish.

@rlskoeser rlskoeser deleted the setup-docs branch June 2, 2022 17:38
@digitaldogsbody
Copy link
Member

digitaldogsbody commented Jun 2, 2022

I think the GITHUB_TOKEN will be created and exposed automatically when the fixed workflow runs (after merge), but we will have to configure the Github Pages setup after the first run only (per the last paragraph of https://github.com/marketplace/actions/deploy-mkdocs#building-with-github_token)

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.

4 participants