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

[Doc PR Part 3] Add scripts to automatically generate API reference md files #1980

Merged
merged 2 commits into from
Dec 25, 2024

Conversation

chenmoneygithub
Copy link
Collaborator

We add two scripts:

  1. generate_api_docs.py: Generate an .md file for each public class/function.
  2. generate_api_summary.py: Generate the index in mkdocs.yml to refer to the doc page for each public class/function.

At doc deployment time, these 2 scripts should be executed to generate the latest documentation.

Some notes:

  1. Many DSPy classes/functions can be accessed by multiple path, e.g., dspy.ChainOfThought, dspy.predict.ChainOfThought, dspy.predict.chain_of_thought.ChainOfThought all point to the same thing. We only generate doc for the top level dspy.ChainOfThought, which is our recommended path
  2. We only generate API references for classes/functions that are exposed through __all__ attribute in __init__.py files. Or say we only generate API reference for classes/functions we would like to have users interact with.

@chenmoneygithub chenmoneygithub changed the title Add scripts to automatically generate API reference md files [Doc PR Part 3] Add scripts to automatically generate API reference md files Dec 23, 2024
@okhat okhat merged commit b666f49 into stanfordnlp:main Dec 25, 2024
6 checks passed
@chenmoneygithub chenmoneygithub deleted the doc-branch-4 branch December 27, 2024 22:02
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.

2 participants