First of all, many thanks for showing your interest in contributing to memrise.el and getting all the way to this guide!
There are many ways to get involved and help this project to grow: ideas, documentation, issues, and of course, the code.
Brainstorming for ideas is a great way to contribute. How memrise.el can be more useful? More user-friendly? What features will make it much better? Please check "feature idea" tag and add your own!
memrise.el is quite a big package (compared to average Emacs Lisp projects) and it has a lot of text: in-code docstrings and comments, README, and this file. Making it more clear and understandable should be an all-time goal. Any help here is highly appreciated.
It is probably a good idea to keep issues organized and not getting out of control. Helping other users, answering questions, reproducing bugs and simply suggesting labels for the issues is a great help.
It might be a good addition to a reproduced bug, to get to the root of it with debugging.
Debugging regular functions, widgets, and overall logic is pretty much straigthforward using Edebug.
In many cases though, the problem comes from the outside, from the Memrise response. For these ocasions, you can use function memrise-debug-connection
, which turns on request.el debug output showing curl
commands, responses and so on. Another useful feature is saving JSON objects received from Memrise. You can turn on debug saving it into a separate *memrise-result*
buffer by setting memrise-save-received-data
:
(setq memrise-save-received-data t)
Here we are at the core of this guide. To start with the code it's probably easier to pick an issue (bug, enhancement, or epic if you are brave) and dive in. Create an issue if you have a question about the package's internals (maybe we can use some sort of IRC later on). Below you can find some useful information about the project and its' dependencies.
memrise.el uses cask for dependency management. After the installation of cask, install all dependencies and run tests:
$ cask install
$ cask exec ert-runner
Tests should pass on all supported versions of Emacs. If you have troubles with one particular version, you can work with it in your local environment using evm.
This section contains links to external libraries used extensively through memrise.el.
memrise.el builds on the great foundation of the Emacs Widget Library. All of the session tests are implemented in terms of widgets and hack largely on some of their internals (especially the buttons). Reading through the linked manual is a good place to start. The majority of the memrise.el code dealing with widgets is gathered in memrise-widget.el.
JSON objects served by Memrise API are far from trivial. Here are examples for review and learn sessions. It used to be tons of boilerplate code just to go through those structures, and when Memrise changed it, I was completely discouraged for about a year.
As the result, I even implemented a separate library called jeison to make it a bit easier to deal with in Emacs Lisp. Jeison does the most work to parse those JSON objects into memrise.el internal structures. All this is declared in memrise-session-objects.el with extra manual parsing in memrise-session-parser.el.
All the requests send to Memrise are managed by Request.el.
dash.el is pretty much the most famous external library for Emacs Lisp. memrise.el uses different bits of it all around the code.