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

Code documentation #21

Open
felixbur opened this issue Apr 21, 2023 · 7 comments
Open

Code documentation #21

felixbur opened this issue Apr 21, 2023 · 7 comments
Assignees

Comments

@felixbur
Copy link
Owner

The code is almost entierly undocumented.
https://realpython.com/documenting-python-code/

@felixbur felixbur self-assigned this Apr 21, 2023
@bagustris
Copy link
Collaborator

@felixbur,
I am interested in taking this opportunity.
The easiest one is to convert writings in your blog related to nkululeko into Sphinx, isn't it?

@felixbur
Copy link
Owner Author

ok, cool. Sometimes the blog postings are outdated, I would go through the code and add comments to the classes and main functions what they do, and what are the arguments and return values, so that the code could be used outside nkululeko

@bagustris
Copy link
Collaborator

bagustris commented May 31, 2023

@felixbur
I will start with Sphinx and Read The Docs. Here is the appearance (still no writing):
https://nkululeko.readthedocs.io/

If you have time during ICASSP 2023, is it possible to make a small hackathon for nkululeko, partially on Documentation part? I will come to that conference wholly and will attend the Show and Tell session of Nkululeko.

@felixbur
Copy link
Owner Author

felixbur commented May 31, 2023

oh, hi, cool, we can definetly meet!
Problem is, that the nkululeko slot they assigned me is right when i have to present my poster.
so i asked them to shift me to Show & tell demo: session 4
got no reaction yet, though...

@bagustris
Copy link
Collaborator

bagustris commented Jul 24, 2023

I just realized that you already activated GitHub pages for this repo. Actually, we can use that for the documentation but I think using readthedocs is better as you pointed out above in realpython link.
So I would like to propose the following:

  1. Use rtd for documentation ([Nkululeko])(https://nkululeko.readthedocs.io/) --> Work in progress.
  2. Use Github pages for News, More Tutorials/examples (limited tutorial, e.g., 5 examples, can bu put in Docs), and News (copy-paste from your blog?)

@felixbur
Copy link
Owner Author

felixbur commented Oct 5, 2023

I would suggest to use Google conventions for docstrings.

def from_db(y: float) -> float:
    """Value converted from decibel scale.

    Args:
        y: amplitude value in decibels

    Returns:
        amplitude value

    Examples:
        >>> from_db(0)
        1.0
        >>> from_db(-3)
        0.7079457843841379

    """
    return np.power(10, y / 20)

@bagustris
Copy link
Collaborator

Reference to that proposal: https://google.github.io/styleguide/pyguide.html

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

No branches or pull requests

2 participants