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

Sphinx setup for sdk docs generation #2415

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

shivas1516
Copy link

@shivas1516 shivas1516 commented Aug 30, 2024

What this PR does / why we need it:
This PR sets the Sphinx configuration for generating the Katib SDK API reference documentation. It also includes updates to gen_python.py to build the documentation in Markdown format.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #2373

Demo Link: https://katib-demo.readthedocs.io/en/latest/index.html

Note: Before merging this into the main branch, we must create a new Read the Docs project and import the katib repo to it.

Error:
Screenshot from 2024-08-30 22-59-26

seeking for suggestions to resolve this error

Checklist:

  • Docs included if any changes are user facing

Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign tenzen-y for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@shivas1516
Copy link
Author

/area gsoc


if __name__ == "__main__":
update_python_sdk(src=sys.argv[1], dest=sys.argv[2])

# SDK docs update
upgate_python_sdk_docs()

Choose a reason for hiding this comment

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

update

@@ -183,6 +184,29 @@ def update_python_sdk(src, dest, versions=("v1beta1")):
# Clear working dictionary
shutil.rmtree(src)

def upgate_python_sdk_docs():

Choose a reason for hiding this comment

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

update

Copy link
Author

Choose a reason for hiding this comment

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

@shivaylamba I’ve removed the update_python_sdk_docs() method. It appears that Read the Docs updates the documentation automatically using the .readthedocs.yaml configuration, so there's no need for a separate workflow.

## Author

prem0912
Please follow the [examples](https://github.com/shivas1516/katib/tree/master/sdk) to learn more about Katib SDK.

Choose a reason for hiding this comment

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

THis has to be replaced with the actual github repo

Copy link
Author

Choose a reason for hiding this comment

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

updated in the recent push


You can find the Katib Python SDK in the [`kubeflow-katib` package on PyPi](https://pypi.org/project/kubeflow-katib/).

For detailed information on the release process, please refer to the [release script](https://github.com/shivas1516/katib/blob/master/scripts/v1beta1/release.sh) in the Katib repository.

Choose a reason for hiding this comment

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

needs to be replaced with main repo

Copy link
Author

@shivas1516 shivas1516 Sep 6, 2024

Choose a reason for hiding this comment

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

updated in the recent push, let me know if there are additional changes sir

@shivaylamba
Copy link

Also ensure if you can pass the failing linting and go tests

@andreyvelich
Copy link
Member

@shivas1516 Please can you rise a PR for Training Operator as well since it doesn't have this problem with gRPC import package ?

@google-oss-prow google-oss-prow bot added size/XXL and removed size/XL labels Sep 6, 2024
@shivas1516
Copy link
Author

@shivas1516 Please can you rise a PR for Training Operator as well since it doesn't have this problem with gRPC import package ?

Sure, I configured the Sphinx and completed the docs for the client but most of the docstrings in each models are not friendly to the Sphinx and need to be manually altered it.

demo link: https://testtrainingoperator.readthedocs.io/en/latest/index.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[GSOC] Poject 7 Tracking Issue: Automating Documentation for katib Python SDK
3 participants