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

Add documentation for the class fields #63

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Ghostkeeper
Copy link

This adds some basic documentation for the fields of each class provided by this library. The documentation has been reverse-engineered from experimentation and by reading the source code of the library.

I have been frustrated by the lack of documentation in this library, so I've dedicated the better part an afternoon to documenting this. I hope it will be useful to future users of the library.

Since there was no documentation for any fields at all, I've adapted the documentation style of the methods that were documented. The existing documentation was inconsistent in use of periods at the end so I've opted to just use periods there. Some fields appeared to be dysfunctional, so I've skipped documenting those.

Fixes #62

This adds some basic documentation for the fields of each class provided by this library. The documentation has been reverse-engineered from experimentation and by reading the source code of the library.
@irmen
Copy link
Owner

irmen commented Feb 9, 2023

Thanks for taking the time to write this out.

However, what you seem to not have realized, is that the README.md documentation is automatically generated from the python source code (via "make docs").
So the description of these fields have to be inside actual source code.

I will add a note in the readme that the api docs are auto-generated and should not be edited in the readme file itself.

@Ghostkeeper
Copy link
Author

Ghostkeeper commented Feb 14, 2023

I see it now in the setup script.

Then considering these fields are implemented with self.xyz = abc lines in the __init__, how would you propose that this documentation best gets implemented? As far as I know, such python attributes cannot have any __doc__ field. You couldn't really get this from introspection as it is done currently. Like, we'd have to implement some sort of Python source code parsing? AST stuff?

@irmen
Copy link
Owner

irmen commented Feb 14, 2023

Maybe just add to the docstring of the class itself. But I haven't thought this through very much and I don't really know how the resulting .md file will look like.

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

Successfully merging this pull request may close these issues.

API reference in documentation lacks info on how to access DecodedSoundFile's raw audio
2 participants