Hi everyone, is everything ok? I hope so.

Today, I will talk about my week working on Krita during this community bonding period that ends this Wednesday.

I will try to be more concise this week and I will explain what I've made in a short list.

1. Unit tests to Python scripting API

I made previously, the integration of python tests with cmake. Now, I implemented tests to all classes that don’t need a GUI to work, at least partially. I wrote tests to classes below:

  • Action
  • Filter
  • InfoObject
  • Extension

When you implement tests, you naturally find errors. I found some inconsistencies that I fix, but I need to understand others behaviors, like setConfiguration method in the Filter class.

Reviews(D5967 and D5982) created and commits pushed to my remote branch.

2. Improve Scripter plugin

As I told in my introduction for GSOC, I'm intending to use the Scripter to execute and edit scripts.

When I started to work in this plugin, we was using the exec function(python 3) in python to run all the code from the editor, but it's really more complex to implement and maintain the scripter using exec, mainly when using files where we can create classes and all.

Now the implementation creates a python module to refer to files, but the Scripter still using exec when the code is executed without saving files. You can see a peace of code below:

if document:
    spec = importlib.util.spec_from_file_location("users_script", document.filePath)
    users_module = importlib.util.module_from_spec(spec)
    code = compile(script, '<string>', 'exec')
    empty_scope = {}
    exec(script, {})

If you need more details about my reasons to take this decision please read this comment in the task thread.

3. Krita community

  • I’m following other tasks in the Krita to know what people have made.

  • Talking with my mentors to understand some important implementations.

  • Reading documentation to libkiss. Thanks, Wolthera :).

That’s it for now, until the next week. See ya!!