Demo Synapse module for FOSDEM 2022
  • Python 88.9%
  • Shell 11.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2022-01-19 16:49:39 +00:00
fosdem22_demo Demo 2022-01-19 15:30:20 +00:00
scripts-dev Demo 2022-01-19 15:30:20 +00:00
tests Demo 2022-01-19 15:30:20 +00:00
.gitignore Demo 2022-01-19 15:30:20 +00:00
.gitlab-ci.yml Demo 2022-01-19 15:30:20 +00:00
mypy.ini Demo 2022-01-19 15:30:20 +00:00
pyproject.toml Demo 2022-01-19 15:30:20 +00:00
README.md Demo 2022-01-19 15:30:20 +00:00
setup.cfg Demo 2022-01-19 15:30:20 +00:00
tox.ini Demo 2022-01-19 15:30:20 +00:00

Demo Synapse module for FOSDEM 2022

This module is the one developped as part of the talk on Synapse modules during FOSDEM 2022.

Installation

From the virtual environment that you use for Synapse, install this module with:

pip install path/to/fosdem22-demo-module

(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: fosdem22_demo.FosdemDemo
    config:
      # TODO: Complete this section with an example for your module

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):

  1. Set a shell variable to the version you are releasing (this just makes subsequent steps easier):

    version=X.Y.Z
    
  2. Update setup.cfg so that the version is correct.

  3. Stage the changed files and commit.

    git add -u
    git commit -m v$version -n
    
  4. Push your changes.

    git push
    
  5. When ready, create a signed tag for the release:

    git tag -s v$version
    

    Base the tag message on the changelog.

  6. Push the tag.

    git push origin tag v$version
    
  7. If applicable: Create a release, based on the tag you just pushed, on GitHub or GitLab.

  8. If applicable: Create a source distribution and upload it to PyPI:

    python -m build
    twine upload dist/fosdem22_demo-$version*