The functionality outlined below, and much more, is implemented in Hodge diamond cutter, which can be used in Sage. If you use it for your research, please cite it using DOI.

Today I was supposed to take the day off. So what did I do for the past hour? I set up GitHub Actions to automatically run the unit tests that are in the documentation. Yes, this is nerdy.

Why is this interesting? Well, for one it now displays this badge

on the repository page. This should say passing. If it doesn't, please tell me (although I probably already know, because I should get an email from GitHub if the test fails).

Whenever something happens with the code (a commit, or a pull request, or manually triggering the tests), this script will

  • start up an Ubuntu virtual machine
  • use the SageMath Docker container
  • install the Hodge diamond cutter
  • run the tests (of which there were 251 at the time of writing)

Here is the log file of the last test run today. The important part is

2023-07-07T14:24:02.8409203Z     [251 tests, 3.58 s]
2023-07-07T14:24:02.8409755Z ----------------------------------------------------------------------
2023-07-07T14:24:02.8410066Z All tests passed!
2023-07-07T14:24:02.8410405Z ----------------------------------------------------------------------
2023-07-07T14:24:02.8410691Z Total time for all tests: 3.7 seconds
2023-07-07T14:24:02.8412365Z     cpu time: 3.5 seconds
2023-07-07T14:24:02.8412605Z     cumulative wall time: 3.6 seconds

telling us that all went well.

I believe the workflow is really easy to use yourself (after I spent too long getting it to work, as simple as it is), and I hope someone else who develops things for SageMath is interested in using a similar test workflow.

Installation instructions

I also restructured the repository, so that installing it through pip is now easy. Just follow the instructions in the documentation.