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

Setup the sphinx and generated the sdk API docs #2392

Closed
wants to merge 0 commits into from

Conversation

shivas1516
Copy link

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

Checklist:

  • [] Docs included if any changes are user facing

@shivas1516
Copy link
Author

@andreyvelich @shivaylamba
In this PR, I have configured Sphinx and modified some of the docstrings in the sdk/python/v1beta1/kubeflow/katib/api/katib_client.py file to ensure consistency and compatibility with Sphinx for generating documentation. Please let me know if any further changes are needed.

Copy link

@shivaylamba shivaylamba left a comment

Choose a reason for hiding this comment

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

Can you resolve the merge conflicts in the PR @shivas1516

Also do you plan to create a separate PR for integration with Github actions pipelines for automated documentation updates?


project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..'))

docs_dir = os.path.join(project_root, 'docs', 'sdkdocs')

Choose a reason for hiding this comment

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

Currently we are usinhardcoded paths, does it makes sense to use environment variables instead for better configuration? @andreyvelich let me know your thoughts

Copy link

@nsingl00 nsingl00 Aug 2, 2024

Choose a reason for hiding this comment

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

+1. Having environment variable would be Better for easy configuration management. It will also help validating the changes locally by providing test path through environment variable

@nsingl00
Copy link

nsingl00 commented Aug 2, 2024

@shivas1516 Is there a way to preview the content generated by sphinx? Can you add the preview screenshot in description if you can see it locally?

@andreyvelich
Copy link
Member

Hi @shivas1516, do you have any updates with doc generation ? Did you find any solution on how we can show users structure for the SDK models: https://github.com/kubeflow/training-operator/tree/master/sdk/python/docs

So users will know the structure of underlying objects (e.g. KubeflowOrgV1PyTorchJob)

Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:

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

@google-oss-prow google-oss-prow bot added size/XS and removed size/XL labels Aug 8, 2024
@shivas1516
Copy link
Author

shivas1516 commented Aug 8, 2024

@shivas1516 Is there a way to preview the content generated by sphinx? Can you add the preview screenshot in description if you can see it locally?

@nsingl00 Instead of providing just a screenshot of the Sphinx-generated document preview, I am including a screen recording of the Katib SDK API reference document as it appears on my local machine. The link below shows the actual preview of how it looks when integrated into our Kubeflow website.

Preview link: https://drive.google.com/file/d/1nbyIab5xNGlze31Tz0b7iKpMvdWQ6mRf/view?usp=drivesdk

Please let me know if any suggestions to improve the results

@andreyvelich
Copy link
Member

@shivas1516 Do you want to to open a new PR with your change ?

@shivas1516
Copy link
Author

@shivas1516 Do you want to to open a new PR with your change ?

I thought that, what do you think, @andreyvelich? Your thoughts would be appreciated.

Thanks!

@andreyvelich
Copy link
Member

@shivas1516 Do you want to to open a new PR with your change ?

I thought that, what do you think, @andreyvelich? Your thoughts would be appreciated.

Thanks!

It's ok, but you can just push the changes in this PR.

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

Successfully merging this pull request may close these issues.

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