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

Documentation update and versioning #627

Merged
merged 10 commits into from Mar 3, 2022
Merged

Conversation

ajstewart
Copy link
Contributor

@ajstewart ajstewart commented Feb 18, 2022

This brings the documentation up-to-date in using the latest mkdocs-material release. It also adds docs versioning so the docs can be viewed for each release, in addition to the dev version.

  • Updates all docs related packages.
  • Added the mike dependency for versioning.
  • mkdocstrings updated to use new python handler Griffe, this fixes Fix Django rest framework issues for mkdocstrings pages in vast_pipeline #486.
    • serializers.py and views.py are now shown in the code reference.
  • Updated Returns: docstrings to follow new handling of Tuple or Union return types.
  • Updated GitHub actions to:
    • Build and publish dev docs on each push to dev.
    • Build and publish new release docs upon the publication of a release.
  • Minor updates to mkdocs setup to be compatible with move from 7.x -> 8.x.
  • Minor docstring fixes.

Note:

  • The Griffe handler doesn't currently support selection, so all previous 'hidden' functions are now shown in the Code Reference section. These might be missing docstrings. Suggest opening issue to either fill these in or re-hide them once Griffe supports that option.

Before Merging

  • Manually clear current gh-pages branch using mike.
  • Manually checkout and upload v1.0.0 docs.
  • Fix versioning link errors.

Fixes #486.

Screen Shot 2022-02-18 at 19 14 59

Screen Shot 2022-02-18 at 19 15 17

@ajstewart ajstewart added documentation Improvements or additions to documentation enhancement New feature or request dependencies Pull requests that update a dependency file labels Feb 18, 2022
@ajstewart ajstewart self-assigned this Feb 18, 2022
@github-actions github-actions bot added this to In progress in Pipeline Backlog Feb 18, 2022
@ajstewart ajstewart marked this pull request as ready for review February 18, 2022 20:01
@ajstewart ajstewart marked this pull request as draft February 23, 2022 18:02
@ajstewart
Copy link
Contributor Author

After testing the deployment there are two errors that need tracking down:

  • Outdated banner does not construct the link correctly, as base_url contains the full path.
  • 8.2.1 should allow 'switch to current page' and fall back to the homepage if pages are missing. However currently these 404.

The v1.0.0 docs are using quite an old version of mkdocs-material so that might also complicate things.

I've converted to a draft while I investigate.

@marxide marxide mentioned this pull request Feb 23, 2022
- Updated full mkdocs-material dependencies.
- Added mike to use docs versioning.
- Fixed docstrings for new Return parsing.
- Publish dev on every dev commit.
- Publish new latests version on release (using release name as tag).
@ajstewart
Copy link
Contributor Author

ajstewart commented Mar 1, 2022

After testing the deployment there are two errors that need tracking down:

  • Outdated banner does not construct the link correctly, as base_url contains the full path.
  • 8.2.1 should allow 'switch to current page' and fall back to the homepage if pages are missing. However currently these 404.

The v1.0.0 docs are using quite an old version of mkdocs-material so that might also complicate things.

I've converted to a draft while I investigate.

@marxide if you want a puzzle...

Everything here appears to be working expect for the banner links and page diverting when changing versions. But it is only breaking when the initial page load is on the homepage. If you visit the docs from any other page directly, e.g.

localhost:8008/dev/developing/intro/

Then you can browse around the website the outdated banner has the correct link and any new pages that don't exist in the old docs redirect to the homepage as expected.

If you start directly on the homepage then all the links muck up. Which is really strange as the base_url parameter seems to work correctly in the announcement bar message for that link, but not in the outdated block which is right below it.

I tested a brand new simple mkdocs-material project, put all our overrides in and I could not replicate the error so I must be missing something somewhere.

p.s. I test it by deploying the same version twice with a different tag, i.e.:

mike deploy v1.0
mike deploy v2.0

@ajstewart ajstewart added the help wanted Extra attention is needed label Mar 1, 2022
@ajstewart
Copy link
Contributor Author

A new release of mkdocs-material should fix the above problems.

Will wait for a release based off the fix mentioned here: squidfunk/mkdocs-material#3653.

@ajstewart
Copy link
Contributor Author

ajstewart commented Mar 2, 2022

@marxide this is now ready with the release of mkdocs-material 8.2.4.

So it doesn't break everything as it's on an old version, I manually made it so the v1.0.0 release docs could be built on the latest docs versions (i.e. this branch). This will result in some of the code reference being a bit dodgy, but all the fixes from this one will be present in the next release. The v1.0.0 docs will never have to be touched again.

I have deployed this version as is along with the mentioned v1.0.0: https://www.vast-survey.org/vast-pipeline/ everything should be working!

The git actions will just have to be tested after this is merged and correct any mistakes then.

@ajstewart ajstewart marked this pull request as ready for review March 2, 2022 15:34
Pipeline Backlog automation moved this from In progress to Reviewer approved Mar 2, 2022
@ajstewart ajstewart merged commit 0600792 into dev Mar 3, 2022
Pipeline Backlog automation moved this from Reviewer approved to Done Mar 3, 2022
@ajstewart ajstewart deleted the docs-update-and-versioning branch March 3, 2022 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed
Projects
Development

Successfully merging this pull request may close these issues.

Fix Django rest framework issues for mkdocstrings pages in vast_pipeline
2 participants