Developer notes

Notes about code

Use the decorator eduvpn.utils.run_in_background_thread to schedule long running action in the background to avoid blocking the main thread.

Never call GTK functions directly from a background thread, use eduvpn.utils.run_in_main_gtk_thread to decorate functions that must run on the main thread (eg. UI updates).

This library closely follows eduvpn-common. To see the API for that, see here

Most of the interaction with this library is in, the ui is in eduvpn.ui.ui and the cli in eduvpn.cli. In these files you can see lots of state transitions defined. The state transitions that are used are closely in line with the Finite State machine from the eduvpn-common library. A figure for this state machine can be found here.

Running the tests

To run the automated tests, use the following command from the root of the project.

$ pytest

How to make a release

Prepare the code

  • Determine version number (for example 4.1.3)
  • Compose a list of changes (check issue tracker)
  • Make sure the test suite runs with python3
  • Set version number in, and eduvpn.spec and ensure eduvpn-common has the targeted version set
  • add changes to
  • Commit
  • Press release button on github. List all changes here also
  • Check if GitHub Actions builds.
  • The release will trigger a build on readthedocs, but the active version still needs to be set manually here:

Upload to PyPi

do a manual wheel upload using twine:

$ rm dist/*
$ python bdist_wheel sdist
$ twine upload dist/*

There is also a make shortcut:

$ make twine-upload

You should also make sure that eduvpn-common is updated in PyPi! Update in the test PyPi first so that CI passes.

Building RPMs

We use builder.rpm, to build the RPM packages.

Build Debian packages

We use nbuilder.deb, to build the DEB packages.