keras-team / keras-io

Keras documentation, hosted live at keras.io
Apache License 2.0
2.69k stars 2.01k forks source link

Add new strings to process docstrings #1805

Closed sachinprasadhs closed 3 months ago

sachinprasadhs commented 3 months ago

Added Usage: Example usage: and Sample usage: to highlight in bold, which is having numerous entries in keras.io.

Example: https://keras.io/api/keras_cv/layers/augmentation/random_augmentation_pipeline/ https://keras.io/api/keras_nlp/models/gemma/gemma_backbone/

fchollet commented 3 months ago

I'd rather we standardize the docstrings on either Examples: or Example: or Usage:.

sachinprasadhs commented 3 months ago

I'd rather we standardize the docstrings on either Examples: or Example: or Usage:.

Makes sense, shall I make the changes in the code or use the same logic to write something like docstring = docstring.replace("Example usage:", "# Example\n")

fchollet commented 3 months ago

I would recommend converting all the titles containing "usage" to just "Example usage:"

sachinprasadhs commented 3 months ago

Closing this PR since it is no longer needed and all the usages and examples are converted to Example: or Examples:

https://github.com/keras-team/keras/pull/19344 https://github.com/keras-team/keras-cv/pull/2399 https://github.com/keras-team/keras-nlp/pull/1516