Refactor into a package

Originally the idea I had for this repository was that contest participants could fork this repo, and then implement their own recsystem by modifying the code for the baseline.

However, I see a couple of problems with this:

  • If significant changes are made to the original baseline implementation (e.g. to respond to API changes) it might be difficult for people to merge their modified versions with upstream changes.

  • A lot of basic functionality in the baseline, such as websocket handling, and the default implementations of some of the API methods, might not need to be changed by participants at all. A lot of it is boilerplate.

  • Since this repo is hosted on gitlri.lri.fr they would have to have an account on this GitLab instance to fork the project, and that might be too onerous, as it would make it more difficult for them to host their code wherever they want (they can still clone the repository locally and then push it to a different source code host--i.e. a "manual fork"--but that could be difficult for some to manage as well).

Instead we should put all the base recsystem implementation into a package (e.g. renewal_recsys) published on PyPI. Contest participants can make it a dependency of their project. renewal_recsys would provide a base class that they can subclass to provide their own implementations of some (or all) of the API calls as required for their project.

We can also provide a Cookiecutter template for them to easily start a project with the renewal_recsys package as its basis.

Of course, this is all optional: Once the API is documented, contest participants can implement their recsystem in any language they want, with or without using any code we provided. However, this might make it easier to quickly get started on implementing a recsystem by providing an already mostly working basis to start from. That was, of course, the original goal in how I started writing the baseline, but this might formalize things a bit.