Sunil Mohan Adapa 2dd00a8f08
*: Fix all typing hint related errors
- Try to mark class variables in component classes.

- Leave typing hints generic, such as 'list' and 'dict' where content is usually
not filled, too complex, or context is unimportant.

- backups: Handle failure for tarfile extraction so that methods are not called
on potentially None valued variables.

- backups: Prevent potentially passing a keyword argument twice.

- dynamicdns: Deal properly with outcome of urlparsing.

- ejabberd: Deal with failed regex match

- email: Fix a mypy compliant when iterating a filtered list.

- tor: Don't reuse variables for different typed values.

- tor: Don't reuse variables for different typed values.

- operation: Return None explicitly.

- operation: Ensure that keyword argument is not repeated.

Tests:

- Where only typing hints were modified and no syntax error came up, additional
testing was not done.

- `mypy --ignore-missing-imports .` run successfully.

- Generate developer documentation.

- Service runs without errors upon start up.

- backups: Listing and restoring specific apps from a backup works.

- backups: Mounting a remote backup repository works.

- NOT TESTED: dynamicdns: Migrating from old style configuration works.

- ejabberd: Verify that setting coturn configuration works.

- email: Test that showing configuration from postfix works.

- tor: Orport value is properly shown.

- transmission: Configuration values are properly set.

- users: Running unit tests as root works.

- operation: Operation status messages are show properly during app install.

- ./setup.py install runs

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-09-25 20:03:24 -04:00
..
2023-09-25 20:03:24 -04:00

.. SPDX-License-Identifier: CC-BY-SA-4.0

Editing the Developer Documentation
===================================

About
*****

The doc/dev directory in FreedomBox repository contains the FreedomBox Developer
Manual. Specifically the tutorial for writing new applications and API reference
for writing apps for FreedomBox. It is kept as part of the main FreedomBox
source code with the expectation that when the API changes the developer
documentation is also updated in the same patch set.

Setup on Debian
***************

Install the following Debian packages:

* python3-sphinx
* python3-sphinx-autobuild

If your preferred text editor doesn't have support for the reStructuredText
format, you can install a simple desktop application called ReText. It has live
preview support with split panes.

Viewing changes live in your browser
************************************

You do not need the virtual machine used for FreedomBox development running to
edit this documentation.

Run `make livehtml` from the current directory in the host machine. Visit
http://127.0.0.1:8000 to view the changes live in your browser as you edit the
.rst files in this directory. Your browser reloads the page automatically each
time you save an .rst file in the documentation.