Hello,
Here are a recollection of thoughts I had while developing a calibre plugin. I hope it doesn't sound like an endless flow of complaints~, and apologize if it reads like so.
- As an end user, you don't quite realize how large the software is. You give more appreciation to Kovid's work over the years when you realize the volume and relative complexity of the ensemble
- I felt it lacked a bit of guidance, especially at the beginning. (Something that looks like good practice: Wordpress developer handbook) There are the 3 manual articles linked in the plugins sticky, and then you're on your own. At this point a good grepping tool is a must. Questions that popped up include:
- what's a spine item vs a manifest item?
- there are primitives and boss methods that seem to clash, e.g. rewind_savepoint vs self.boss.revert_requested; add_file vs. self.boss.do_add_file. Since the developer can import anything, which is the 'correct' one?
- lxml is a pain (especially: the docs & working with namespaces), but alternatives are probably worse
- print testing is a PITA, especially if you need to inspect a collection of an object. Wasn't aware of the ipython method, ugh that would have helped a ton.
- calibre's built-in reporting dialogs saved a lot of time
- would have loved to learn how to unit-test plugin components. Are you supposed to mock the whole framework (calibre)?
- I use the github hosting to provide zips for release, unfortunately for us, calibre only supports zip with __init__.py at the top level of the archive (also reported in another thread). Would it be possible to support zips with a single folder at top-level at some point in the future? without having to register at launchpad if possible.