- Python 92.8%
- Shell 7.2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .github/workflows | ||
| scripts-dev | ||
| synapse_protector | ||
| tests | ||
| .gitignore | ||
| LICENSE | ||
| mypy.ini | ||
| pyproject.toml | ||
| README.md | ||
| setup.cfg | ||
| tox.ini | ||
Protector
Synapse module that protects users and rooms from accidental deletion.
Installation
From the virtual environment that you use for Synapse, install this module with:
pip install path/to/synapse-protector
(If you run into issues, you may need to upgrade pip first, e.g. by running
pip install --upgrade pip)
Then alter your homeserver configuration, adding to your modules configuration:
modules:
- module: synapse_protector.Protector
config:
users:
- "@foo:bar"
rooms:
- "!foo:bar"
Development
In a virtual environment with pip ≥ 21.1, run
pip install -e .[dev]
To run the unit tests, you can either use:
tox -e py
or
trial tests
To run the linters and mypy type checker, use ./scripts-dev/lint.sh.
Releasing
The exact steps for releasing will vary; but this is an approach taken by the Synapse developers (assuming a Unix-like shell):
-
Set a shell variable to the version you are releasing (this just makes subsequent steps easier):
version=X.Y.Z -
Update
setup.cfgso that theversionis correct. -
Stage the changed files and commit.
git add -u git commit -m v$version -n -
Push your changes.
git push -
When ready, create a signed tag for the release:
git tag -s v$versionBase the tag message on the changelog.
-
Push the tag.
git push origin tag v$version -
Create a release based on the tag you just pushed, on GitHub.