27 Commits

Author SHA1 Message Date
James Valleroy
71b15203be
mypy: Ignore missing type stubs for systemd.*
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2025-04-05 10:21:09 -04:00
James Valleroy
c7673e039d
tests: functional: Add enable-all-apps script
[sunil]

- Move the script to plinth/tests/functional directory as it is the right place
for it.

- Add HACKING.md entry to talk about the script.

- Update the pyproject.toml to ensure that functional tests config.ini is
installed along with functional tests python code.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2025-03-24 15:15:01 -07:00
Sunil Mohan Adapa
eeeec6710f
pyproject: Ignore missing types for numpy (needed by pytest)
- Otherwise, on Debian stable, running make check-type results in following
error:

/usr/lib/python3/dist-packages/_pytest/python_api.py:24: error: Cannot find
implementation or library stub for module named "numpy"  [import]

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2025-02-16 10:45:03 -05:00
Veiko Aasa
eca6a65080
miniflux: tests: functional: Use helper functions from functional libary
Also, ignore pexpect module in mypy checks.

Tests:
  - All miniflux tests pass.

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
[sunil: Update to reflect the new utility function name]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-12-27 16:43:39 -08:00
Sunil Mohan Adapa
fb43c7297c
*.md, pyproject.toml: Update default branch from 'master' to 'main'
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-08-23 12:05:51 -07:00
Sunil Mohan Adapa
a3b6506a4e
tests: Automatically create pytest marks for apps
Fixes: #2388.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-03-13 09:58:00 -04:00
Sunil Mohan Adapa
5399efde73
pyproject.toml: Exclude the build directory from mypy checks
- build/ directory is generated after the 'make build install' step and contains
files that are duplicates of the main source leading to a failure.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-02-21 20:54:44 -05:00
Sunil Mohan Adapa
812ed5d60d
*: Introduce make file based build, eliminate setup.py
- setuptools aims to a build library instead of being invoked by setup.py.
Launching setup tools using ./setup.py is deprecated. Launching it using
generic build tools that use pyproject.toml is recommended.

- With the new approach customizing the build is not possible to the earlier
extent. So, introduce is a simple and sufficient build system using 'make'.

Tests:

- Check the pyproject.toml using validate-pyproject tool.

- Run diffoscope on old and new packages and verify that no unexpected changes
were introduced by the build system change.

- None of the files part of .deb package have different file permissions
compared to before.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-02-12 19:17:09 -05:00
Sunil Mohan Adapa
e9adf0d78f
pyproject.toml: Move project meta data from setup.py
- setuptools and other tools can pickup the information from here.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-02-12 19:17:06 -05:00
Sunil Mohan Adapa
eba41aa295
pyproject: Add configuration for mypy to ignore some libraries
- This way, we know what we are overriding and can use type annotations for
libraries where they are available.

- Invocation of mypy tool on command line becomes straight forward.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-09-25 20:03:42 -04:00
James Valleroy
e719b1ed49
shadowsocksserver: Add separate app for Shadowsocks server
Closes: #729.

Tests:

- Install Shadowsocks Server. Install Shadowsocks Client, and set the
  server to localhost, and set the same password as the server. Use
  curl to connect to local SOCKS proxy on port 1080 and fetch a
  website.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil: Update some docstring comments for shadowsocks clients]
[sunil: Use the term Censorship instead of network filters]
[sunil: Prevent enabling both apps when setup is re-run]
[sunil: Update typehint for a privileged method to be minimal]
[sunil: Accept connections from external IPs too]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2023-05-23 13:58:39 -07:00
nbenedek
7e2ebcb743
privacy: Add new system app for popularity-contest
- Keep the description about app generic

- Remove enable/disable option

- Create a booleanfield to turn on/off popcon

- Don't re-enable popcon during an update

Tests:

- When enabling/disabling the option, the `"PARTICIPATE"` value in
`/etc/popularity-contest.conf` is changed to yes/no as expected. For reference
see `/var/lib/dpkg/info/popularity-contest.templates`

- When popcon option is enabled, running sudo sh -x
/etc/cron.daily/popularity-context shows that execution was successful and data
was submitted. Remove files /var/log/popularity-contest* and
/var/lib/popularity-contest/lastsub if necessary. Gpg is used and encrypted data
is what was submitted.

- When popcon option is disabled, running sudo sh -x
/etc/cron.daily/popularity-context shows that execution stopped because the
option is disabled.

Signed-off-by: nbenedek <contact@nbenedek.me>
[sunil: Add a notification to tell users about privacy app]
[sunil: Correct the URL to /sys]
[sunil: Minor code styling changes and updates to description, icon]
[sunil: Ensure that popcon works with encryption]
[sunil: Write configuration to a separate file]
[sunil: Use Shellvars lens instead of Php lns]
[sunil: Add functional tests]
[sunil: Backup/restore the configuration file]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-10-10 17:35:26 -07:00
nbenedek
9efc56368c
rssbridge: New app to generate RSS feeds for websites
[sunil: Update description for simplicity, group info]
[sunil: Indentation fixes]
[sunil: End all URLs with a slash]
[sunil: Update frontpage shortcut to be a simple one]
[sunil: Enable single-sign-on for main interface only]
[sunil: In copyright file, merge with public-domain section]
[sunil: Simplify and vectorify the icon]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-07-17 09:04:48 -07:00
Sunil Mohan Adapa
bb35ddfeaa
pyproject.toml: Ignore some refactoring messages with pylint
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-07-04 19:46:39 -04:00
James Valleroy
b7a1d4bf8f
janus: Add new app for lightweight WebRTC server
- Add basic video room based on demo.

- Set port range to use for RTP.

- coturn: Add component for time-limited TURN configuration.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil: Don't error out when coturn is not installed/configured]
[sunil: Prepend data- to custom attribute in HTML]
[sunil: Convert SVG with embedded bitmap to vector graphics]
[sunil: Hide Javascript license information in footer]
[sunil: Minor changes to comments for styling]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-06-06 17:42:41 -07:00
Sunil Mohan Adapa
851644574d
email: Add basic functional tests
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-03-02 07:38:01 -05:00
Sunil Mohan Adapa
09ba3892e8
wireguard: tests: Add functional tests
Add HTML classes to help with functional testing.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-01-30 17:27:38 -05:00
James Valleroy
78b669d451
shaarli: Test adding a bookmark
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2022-01-22 23:59:37 -08:00
Sunil Mohan Adapa
98cfa321cb
wordpress: tests: functional: Add missing marks on tests
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-01-22 13:15:22 -05:00
Sunil Mohan Adapa
668da20a02
mldonkey: Drop app not available in Debian Bullseye and Bookworm
Closes: #2157.

Original author of the app J. Carlos Romero <juancarlos.romero@gmail.com> has
been contacted to see if there is interest in continuing to maintain the app.
There has been no response.

Since the app is not available even in the current stable (Bullseye), few users
are presumably using it on a supported FreedomBox distribution. Any users are
advised to maintain the manually instead of relying on FreedomBox for it.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-01-22 11:55:34 -05:00
James Valleroy
fc2d5c8fea
pyproject: Add domain marker
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-12-20 16:08:47 -08:00
Joseph Nuthalapati
b0305746c8
tahoe-lafs: Drop app as it is not being used
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil: Add to configuration file removal in Debian package and setup.py]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-12-20 15:12:11 -08:00
Joseph Nuthalapati
ce5274d9ee
monkeysphere: Drop app as it is not being used
Closes #2157.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil: Split diaspora and tahoe-lafs into separate commits]
[sunil: Remove monkeysphere from help/tests/test_views.py]
[sunil: Add to configuration file removal in Debian package and setup.py]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-12-20 15:09:50 -08:00
Fioddor Superconcentrado
cb539cf1e8
tests: Improve handling of tests skipped by default
- Create the 'heavy' mark for tests that take long to run.
- Skip the tests marked as 'heavy' by default.
- Enable functional and heavy tests by setting the environment variable
  EXTENDED_TESTING=1.
- Update HACKING.md accordingly.

Signed-off-by: Fioddor Superconcentrado <fioddor@gmail.com>
[sunil: Minor indentation]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2021-10-10 19:22:13 -07:00
Sunil Mohan Adapa
3c370d02ab
pyproject.toml: Merge contents of .converagerc
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-10-07 15:13:59 -04:00
Sunil Mohan Adapa
04af3473b7
pyproject.toml: Merge contents of pytest.ini
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-10-07 15:13:46 -04:00
Sunil Mohan Adapa
dcb69b447b
pyproject: Make isort consistent across execution environments
In some cases, isort is not treating "plinth" module as a "first party" module.
It is then treated as a "third party" module and groups with non-standard python
libraries that we use. This behavior seems to dependent on from where isort is
run.

To eliminate this uncertainty, explicitly mark "plinth" module without depending
on automatic detection of isort. The two preferred ways to provide the
configuration are using .isort.cfg and pyproject.toml. The former introduces yet
another file in the project directory while the latter, a new python PEP,
promises to unify several other such configuration files.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2021-09-20 16:50:27 -04:00