Add API reference documentation using mkdocstrings#355
Open
Add API reference documentation using mkdocstrings#355
Conversation
This commit enhances the MkDocs documentation by:
1. Adding `mkdocstrings[python]` to handle auto-generation of API documentation from Python docstrings.
2. Configuring `mkdocstrings` in `mkdocs.yml` under the `plugins` section and updating the navigation to include an "API Reference" section.
3. Creating `docs/api_reference.md` with directives to generate documentation for key modules and classes in `simple_parsing` including:
- `simple_parsing.parsing`
- `simple_parsing.helpers.serialization.serializable.Serializable`
- `simple_parsing.wrappers.dataclass_wrapper`
- `simple_parsing.wrappers.field_wrapper`
- `simple_parsing.ArgumentParser`
- `simple_parsing.helpers.hparams`
4. Removing extraneous files (`=1.0`, `=7.0`) that were accidentally created in the repository root.
The documentation now includes both the examples and a browsable API reference.
There was a problem hiding this comment.
Pull Request Overview
This PR enhances the project documentation by integrating mkdocstrings for auto-generating API reference docs and by adding various example scripts that demonstrate advanced configuration, aliasing, and ML use-cases with simple-parsing. Key changes include:
- Adding mkdocstrings support via the new docs/api_reference.md file.
- Introducing new example files for container types, configuration files, alias handling, and ML scripts.
- Removing extraneous root files that were mistakenly created.
Reviewed Changes
Copilot reviewed 68 out of 68 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/api_reference.md | New file that auto-generates the API reference using mkdocstrings. |
| docs/examples/container_types/*.py | Examples demonstrating parsing of container-type arguments with simple_parsing. |
| docs/examples/config_files/* | New YAML and Python examples showcasing configuration file usage and composition. |
| docs/examples/aliases/*.py and docs/examples/aliases/README.md | Samples and detailed documentation for using argument aliases with the parser. |
| docs/examples/ML/*.py and docs/examples/ML/README.md | Before/after examples for ML scripts transitioning from argparse to simple_parsing. |
Signed-off-by: Fabrice Normandin <fabrice.normandin@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #355 +/- ##
=======================================
Coverage 86.29% 86.29%
=======================================
Files 34 34
Lines 4554 4554
=======================================
Hits 3930 3930
Misses 624 624 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit enhances the MkDocs documentation by:
mkdocstrings[python]to handle auto-generation of API documentation from Python docstrings.mkdocstringsinmkdocs.ymlunder thepluginssection and updating the navigation to include an "API Reference" section.docs/api_reference.mdwith directives to generate documentation for key modules and classes insimple_parsingincluding:simple_parsing.parsingsimple_parsing.helpers.serialization.serializable.Serializablesimple_parsing.wrappers.dataclass_wrappersimple_parsing.wrappers.field_wrappersimple_parsing.ArgumentParsersimple_parsing.helpers.hparams=1.0,=7.0) that were accidentally created in the repository root.The documentation now includes both the examples and a browsable API reference.