Update documentation of the app.py

#593

Dear Maintainers,

I hope this message finds you well. I wanted to inform you that I have recently added documentation to the codebase.

If you have any feedback or suggestions regarding the documentation or any other aspect of the codebase, please don't hesitate to reach out. Your input is always valued and appreciated.

Thank you for your attention to this matter.

Best regards,
Louis Brulé Naudet

Open LLM Leaderboard org

Hi,

Thanks for taking a look and adding some doc, that's very nice! Some comments:

  • the default styling we use in docs in our libraries is the google style python docstrings.
  • some docs are not correct, because you should be documenting the high level possible calls, not the inner working.

Let's take the first doc as an example.

  • The function does not take arguments, so no arguments should appear in the doc
  • You don't need to explain when a function returns nothing
  • The example you provide is incorrect, since the function does not take arguments.
 def restart_space():
   """
    Restarts a Space instance specified by its repository ID.

    This function is used to restart a Space instance within the Hugging Face platform.
    It requires the repository ID and a valid API token for authentication.

    Parameters as env variables
    ---------------------------
    repo_id : str
        The ID of the repository associated with the Space instance to be restarted.

    token : str
        A valid API token with the necessary permissions to restart the Space.

    Returns
    -------
    None
        This function does not return any value. It simply restarts the specified Space instance.

    Example
    -------
    >>> restart_space(repo_id="example_repo_id", token="example_token")
    """

Edited, it then becomes:

 def restart_space():
   """
    Restarts the current Space instance.

    It uses the available env variables (current space id, space API token) to restart the space. It is called by a scheduler launched by the app every n minutes.
    """

When writing doc, it is super important to make sure there is no incorrect/misleading information, as well as no superfluous information which will make the doc harder to read.

Feel free to ping me once you've edited your PR accordingly!

Open LLM Leaderboard org

Hi! Closing since it has not changed for a month, but feel free to reopen if you restart on it :)

clefourrier changed pull request status to closed

Sign up or log in to comment