• S sverchok
  • Информация о проекте
    • Информация о проекте
    • Активность
    • Метки
    • Участники
  • Репозиторий
    • Репозиторий
    • Файлы
    • Коммиты
    • Ветки
    • Теги
    • Участники
    • Диаграмма
    • Сравнение
  • Задачи 148
    • Задачи 148
    • Список
    • Доски
    • Спринты
  • Запросы на слияние 21
    • Запросы на слияние 21
  • CI/CD
    • CI/CD
    • Конвейеры
    • Задания
    • Расписания
  • Развертывания
    • Развертывания
    • Окружения
    • Релизы
  • Пакеты и реестры
    • Пакеты и реестры
    • Реестр пакетов
    • Реестр контейнеров
  • Мониторинг
    • Мониторинг
    • Инциденты
  • Аналитика
    • Аналитика
    • Поток ценности
    • CI/CD
    • Репозиторий
  • Wiki
    • Wiki
  • Сниппеты
    • Сниппеты
  • Активность
  • Диаграмма
  • Создать новую задачу
  • Задания
  • Коммиты
  • Доски с задачами
Свернуть панель
  • nikitronn
  • sverchok
  • Запросы на слияние
  • !590

Refactoring proposal: factor some input/output boilerplate code out from nodes to core code

  • Ревью изменений

  • Скачать
  • Почтовые патчи
  • Простое отличие
Слиты nikitronn запросил слияние github/fork/portnov/refactor_nodes в master Мар 03, 2015
  • Обзор 3
  • Коммиты 4
  • Конвейеры 0
  • Изменения 4

Created by: portnov

I propose to simplify code of many nodes by removing duplicated boilerplate for standard inputs/outputs sockets processing routine.

Summary of changes:

  • Decorator for checking if mandatory inputs/outputs are connected — checking_links.
  • Classes for node input/output sockets metainformation.
  • Such metainformation enables us to write default implementation of sv_init().
  • Shortcut decorators for most "standard" (i beleive) routine of input/output data processing and matching of input lists — match_inputs and std_inputs_processing.
  • Shortcut decorator for nodes which work by converting input lists to BMesh and then BMesh to lists again.

I also changed one pretty simple node to use changed API, for proof-of-concept and testing purposes. As you can see this change allows us to remove about 30 lines of boilerplate code from each node which uses "standard" inputs processing. Metainformation about input and output sockets can be also used later by upgrade system. I tried to maintain backwards compatibility. All "old" nodes, which do not use new features, should work as they were.

Please review and test. Any suggestions are welcome.

Ответственный
Назначить
Проверяющие
Запросить ревью
Оценка трудозатрат
Исходная ветка: github/fork/portnov/refactor_nodes