Only the classes inside the backend module has been properly documented. The other classes inside the ui module and its submodules need to be documented.
This is a contribution that anyone can do with even minimal python knowledge. You need to read the code referencing various documentations of the used libraries and write documentation for the respective code block.
An example documentation block is
"""
.. image:: https://raw.githubusercontent.com/Oxlac/MR.DM/main/docs/images/login-screen.png
Welcome Screen/Login Screen Class. This screen contains methods that deal with adding new users and logging in existing users.
When an user launches the program for the first time,this scren will display no accounts.
"""
def get_user(self, userid: str) -> Tuple[str, str, str, str]:
"""
Gets the Instagram user from the database with the given userid.
:param userid: The userid of the user to get
:return: The user with the given userid
"""
c = self.conn.cursor()
c.execute("SELECT * FROM users WHERE userid=?", (userid,))
return c.fetchone()
How to write Docs
MR.DM uses Sphinx AutoApi to generate documentation for all internal classes and functions. You can read more here.
In order for AutoApi to generate proper documentation it needs to know the datatypes of any function parameters, return values and class members. This can be done by using the python type hints definition. More info here
- Find something that hasn't been documented
- First check if you can define any types for the python code you want to document
- Write a description of what the function, class or class member does.
- See if your changes mirror the style of the rest of the docs by building the docs
- You should see the main docs file inside the directory
docs/_build/html/docs.html
Only the classes inside the
backendmodule has been properly documented. The other classes inside theuimodule and its submodules need to be documented.This is a contribution that anyone can do with even minimal python knowledge. You need to read the code referencing various documentations of the used libraries and write documentation for the respective code block.
An example documentation block is
How to write Docs
MR.DM uses Sphinx AutoApi to generate documentation for all internal classes and functions. You can read more here.
In order for AutoApi to generate proper documentation it needs to know the datatypes of any function parameters, return values and class members. This can be done by using the python type hints definition. More info here
cd docs ./make htmldocs/_build/html/docs.html