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

Transition to Mkdocs for versioned api-docs #336

Merged
merged 16 commits into from
Jan 25, 2022

Conversation

AlexejPenner
Copy link
Contributor

Pre-requisites

Please ensure you have done the following:

  • I have read the CONTRIBUTING.md document.
  • If my change requires a change to the documentation, I have updated the documentation accordingly.
  • I have added tests to cover my changes.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Describe changes

Dynamically create docstrings when docs are served. Try it out locally by running docs/mkdocstrings_helper.py and then mkdocs serve from within the docs folder.

@github-actions github-actions bot added the internal To filter out internal PRs and issues label Jan 21, 2022
@AlexejPenner
Copy link
Contributor Author

CUrrently only a draft because I want to remove --push from the default .sh script and because i need to still verify that all dependencies are included in the pyproject.toml file.

Unfortunately the changes inside the yml are not tested for functionality, we will have to see what happens during release or just try doing a testrun.

Feel free to check out docs produced here: http://apidocs.zenml.io/0.5.7/

@htahir1
Copy link
Contributor

htahir1 commented Jan 21, 2022

Will take a look Alexej! Could you change the name of the PR to something more verbose? I think that would make it clearer in the release notes! :)

@AlexejPenner AlexejPenner changed the title Feature/eng 307 versioned api docs Transition to Mkdocs for versioned api-docs Jan 21, 2022
@AlexejPenner AlexejPenner force-pushed the feature/ENG-307-versioned-api-docs branch from 6dccf4c to cb8a033 Compare January 21, 2022 13:44
@AlexejPenner AlexejPenner marked this pull request as ready for review January 21, 2022 13:45
Copy link
Contributor

@htahir1 htahir1 left a comment

Choose a reason for hiding this comment

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

I jut noticed one mistake. Other than that, i think we should test the deployment in a test run somewhere soon and remove the push also as you suggest.

Btw I notice that https://apidocs.zenml.io/ redirects to https://apidocs.zenml.io/latest which is currently down. I have changed the 0.5.7 docs to go directly to https://apidocs.zenml.io/0.5.7/ for now but we should fix this asap

ignored_modules: List[str],
sources_path: Path,
) -> None:
# TODO [MED]: Find Solution for issue with click-decorated functions
Copy link
Contributor

Choose a reason for hiding this comment

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

Wrong TODO format -> Should be MEDIUM

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed this

@AlexejPenner
Copy link
Contributor Author

I jut noticed one mistake. Other than that, i think we should test the deployment in a test run somewhere soon and remove the push also as you suggest.

Btw I notice that https://apidocs.zenml.io/ redirects to https://apidocs.zenml.io/latest which is currently down. I have changed the 0.5.7 docs to go directly to https://apidocs.zenml.io/0.5.7/ for now but we should fix this asap

Currently testing this

@AlexejPenner
Copy link
Contributor Author

AlexejPenner commented Jan 24, 2022

I ran tests on two separate branches to verify different versions are pushed subsequently to the equivalent of gh-pages for the github actions.

First this action was executed: https://github.com/zenml-io/zenml/runs/4925657388?check_suite_focus=true

Then this one: https://github.com/zenml-io/zenml/runs/4925797327?check_suite_focus=true

Here you can see the expected two versions (branch names): https://github.com/zenml-io/zenml/tree/misc/test_docs

latest points at the second action that was run, so testing_gh_action_for_api_docs_publish - see here https://github.com/zenml-io/zenml/blob/misc/test_docs/versions.json

ignored_modules: List[str],
sources_path: Path,
) -> None:
# TODO [MEDIUM]: Find Solution for issue with click-decorated functions
Copy link
Contributor

Choose a reason for hiding this comment

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

One quick comment: The todo parsing is currently only run in the src and tests directory, so this will not get detected

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, good to know, I'll create a ticket manually for this

Copy link
Contributor

Choose a reason for hiding this comment

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

unless you just want to add the docs to the todo parser, if you think that's worthwhile I don't see why not, it only includes .py files anyway

Copy link
Contributor Author

Choose a reason for hiding this comment

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

something worth considering for the future

@AlexejPenner
Copy link
Contributor Author

Is this good to go?

Copy link
Contributor

@htahir1 htahir1 left a comment

Choose a reason for hiding this comment

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

It LGTM personally!

@AlexejPenner AlexejPenner merged commit cc4b621 into develop Jan 25, 2022
@AlexejPenner AlexejPenner deleted the feature/ENG-307-versioned-api-docs branch January 25, 2022 11:09
@AlexejPenner AlexejPenner added the documentation Improvements or additions to documentation label Jan 27, 2022
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 internal To filter out internal PRs and issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants