New blenderaddons repo aimed at developers

 

I decided to create a new repository for my Blender add-ons. It is called blenderaddons-ng and aims to replace my old repo with a complete, Vscode based solution.

Goals

The primary goal for this new repo is not just to host any add-ons I write, but also provide an example of a complete development environment based on Vscode.

To facilitate this, I added the following features:

  • A DevContainer to isolate the development environment
  • A complete configuration to enable testing with pytest
  • Options to enable line profiling
  • GitHub actions for CI

A more complete write-up can be found on the GitHub page for the repo, but in short:

DevContainer

Based on Ubuntu and containing all necessary dependencies to develop and test Blender add-ons. It does not contain Blender but provides the bpy module standalone, so we can perform automated tests.


Pytest

We use pytest for automated testing as well as for on-demand testing in Vscode. The coverage and benchmark plugins are provided as well.

Line profiler

For those situations where we would like to take an in-depth look at the performance the line-profiler package is installed as well, and we provide example code so you can see how this can be used in such a way that you don´t have to alter code before distributing an add-on.

GitHub Actions

Upon each commit (and merged pull request) on GitHub all automated test are run an the result and coverage are updated in badges.


No comments:

Post a Comment