Skip to main content

Posts

Showing posts from September, 2021

Taskflow update #7

 Continuing the node writing topic. So last time i showed how easy it is to define the interface of a node, now let's take a look at a whole node.  Продолжая тему написания нод. Прошлый раз я продемонстрировал простой АПИ для создания интерфейса ноды, теперь же давайте посмотрим на написание ноды целиком It will be a simple node that just creates a file with given name and and writes one of task's attributes there. Для примера сделаем ноду, которая банально записывает значение атрибута таска в файл, путь которого берется из параметра ноды first we just need to subclass the BaseNode class Начнём с наследования класса BaseNode class LogSomeAttribute(BaseNode): def __init__(self, name): super().__init__(name) Now we initialize interface, as we might remember from previous post  Инициализируем интерфейс, как в прошлом посте ui = self.get_ui() with ui.initializing_interface_lock(): ui.add_parameter('where to write', 'Log File Path'