From 0529e24dd7c70b5c8069f0ba253221068ec7938e Mon Sep 17 00:00:00 2001 From: jasquat Date: Tue, 21 Jun 2022 13:51:42 -0400 Subject: [PATCH] precommit is passing w/ burnettk --- bin/import_tickets_for_command_line.py | 1 - bin/import_tickets_for_script_task.py | 1 - migrations/env.py | 2 -- src/spiffworkflow_backend/__init__.py | 9 +++--- src/spiffworkflow_backend/config/__init__.py | 8 +++-- .../load_database_models.py | 32 ++++++++++++------- .../models/data_store.py | 1 + src/spiffworkflow_backend/models/file.py | 4 +-- src/spiffworkflow_backend/models/group.py | 1 + .../models/permission_assignment.py | 2 +- .../models/permission_target.py | 1 + src/spiffworkflow_backend/models/principal.py | 1 + .../models/process_instance.py | 5 ++- .../models/process_instance_report.py | 1 + .../models/task_event.py | 2 +- src/spiffworkflow_backend/models/user.py | 6 ++-- .../models/user_group_assignment.py | 1 + .../routes/admin_blueprint/admin_blueprint.py | 2 +- .../routes/process_api_blueprint.py | 4 +-- src/spiffworkflow_backend/routes/user.py | 3 +- .../routes/user_blueprint.py | 4 +-- src/spiffworkflow_backend/scripts/script.py | 1 - .../services/file_system_service.py | 2 +- .../services/process_instance_processor.py | 5 ++- .../services/process_instance_service.py | 3 +- .../services/process_model_service.py | 3 +- .../services/spec_file_service.py | 2 +- .../services/user_service.py | 3 +- .../spiff_workflow_connector.py | 2 +- .../helpers/test_data.py | 2 +- .../integration/test_process_api.py | 4 +-- .../unit/test_permissions.py | 3 +- .../unit/test_process_group.py | 1 + 33 files changed, 67 insertions(+), 55 deletions(-) diff --git a/bin/import_tickets_for_command_line.py b/bin/import_tickets_for_command_line.py index bc71878d..19fa4116 100644 --- a/bin/import_tickets_for_command_line.py +++ b/bin/import_tickets_for_command_line.py @@ -1,7 +1,6 @@ """Grabs tickets from csv and makes process instances.""" import csv import os - from flask_bpmn.models.db import db from spiffworkflow_backend import create_app diff --git a/bin/import_tickets_for_script_task.py b/bin/import_tickets_for_script_task.py index 249c631e..7365c6bf 100644 --- a/bin/import_tickets_for_script_task.py +++ b/bin/import_tickets_for_script_task.py @@ -1,6 +1,5 @@ """Import tickets, for use in script task.""" import csv - from flask_bpmn.models.db import db from spiffworkflow_backend.models.process_instance import ProcessInstanceModel diff --git a/migrations/env.py b/migrations/env.py index 68feded2..630e381a 100644 --- a/migrations/env.py +++ b/migrations/env.py @@ -1,5 +1,3 @@ -from __future__ import with_statement - import logging from logging.config import fileConfig diff --git a/src/spiffworkflow_backend/__init__.py b/src/spiffworkflow_backend/__init__.py index 104acb07..417f02f3 100644 --- a/src/spiffworkflow_backend/__init__.py +++ b/src/spiffworkflow_backend/__init__.py @@ -1,21 +1,20 @@ """__init__.""" import os - -import connexion # type: ignore -import flask.app from flask_bpmn.api.api_error import api_error_blueprint from flask_bpmn.models.db import db from flask_bpmn.models.db import migrate + +import connexion # type: ignore +import flask.app from flask_cors import CORS # type: ignore +import spiffworkflow_backend.load_database_models # noqa: F401 from spiffworkflow_backend.config import setup_config from spiffworkflow_backend.routes.admin_blueprint.admin_blueprint import admin_blueprint from spiffworkflow_backend.routes.api_blueprint import api_blueprint from spiffworkflow_backend.routes.process_api_blueprint import process_api_blueprint from spiffworkflow_backend.routes.user_blueprint import user_blueprint -import spiffworkflow_backend.load_database_models # noqa: F401 - def create_app() -> flask.app.Flask: """Create_app.""" diff --git a/src/spiffworkflow_backend/config/__init__.py b/src/spiffworkflow_backend/config/__init__.py index f063c397..d3f20a88 100644 --- a/src/spiffworkflow_backend/config/__init__.py +++ b/src/spiffworkflow_backend/config/__init__.py @@ -1,24 +1,26 @@ """__init__.py.""" -import os import logging +import os from flask.app import Flask from werkzeug.utils import ImportStringError def setup_logger_for_sql_statements(app: Flask): - db_log_file_name = f'log/db_{app.env}.log' + """Setup_logger_for_sql_statements.""" + db_log_file_name = f"log/db_{app.env}.log" db_handler_log_level = logging.INFO db_logger_log_level = logging.DEBUG db_handler = logging.FileHandler(db_log_file_name) db_handler.setLevel(db_handler_log_level) - db_logger = logging.getLogger('sqlalchemy') + db_logger = logging.getLogger("sqlalchemy") db_logger.propagate = False db_logger.addHandler(db_handler) db_logger.setLevel(db_logger_log_level) def setup_database_uri(app: Flask): + """Setup_database_uri.""" if os.environ.get("DATABASE_URI") is None: if os.environ.get("SPIFF_DATABASE_TYPE") == "sqlite": app.config[ diff --git a/src/spiffworkflow_backend/load_database_models.py b/src/spiffworkflow_backend/load_database_models.py index e298106d..97f697ba 100644 --- a/src/spiffworkflow_backend/load_database_models.py +++ b/src/spiffworkflow_backend/load_database_models.py @@ -1,16 +1,26 @@ """Loads and sets up all database models for SQLAlchemy.""" - from flask_bpmn.models.db import add_listeners # type: ignore -from spiffworkflow_backend.models.data_store import DataStoreModel -from spiffworkflow_backend.models.file import FileModel -# from spiffworkflow_backend.models.permission_assignment import PermissionAssignmentModel -# from spiffworkflow_backend.models.permission_target import PermissionTargetModel -from spiffworkflow_backend.models.principal import PrincipalModel -from spiffworkflow_backend.models.process_instance import ProcessInstanceModel -from spiffworkflow_backend.models.process_instance_report import ProcessInstanceReportModel -from spiffworkflow_backend.models.task_event import TaskEventModel -from spiffworkflow_backend.models.user_group_assignment import UserGroupAssignmentModel -from spiffworkflow_backend.models.user import UserModel +""" blah """ + +from spiffworkflow_backend.models.data_store import DataStoreModel # noqa: F401 +from spiffworkflow_backend.models.file import FileModel # noqa: F401 +from spiffworkflow_backend.models.principal import PrincipalModel # noqa: F401 +from spiffworkflow_backend.models.process_instance import ( + ProcessInstanceModel, +) # noqa: F401 +from spiffworkflow_backend.models.process_instance_report import ( + ProcessInstanceReportModel, +) # noqa: F401 +from spiffworkflow_backend.models.task_event import TaskEventModel # noqa: F401 +from spiffworkflow_backend.models.user import UserModel # noqa: F401 +from spiffworkflow_backend.models.user_group_assignment import ( + UserGroupAssignmentModel, +) # noqa: F401 + +# autoflake8 will remove these lines without the noqa comment + +# from spiffworkflow_backend.models.permission_assignment import PermissionAssignmentModel # noqa: F401 +# from spiffworkflow_backend.models.permission_target import PermissionTargetModel # noqa: F401 add_listeners() diff --git a/src/spiffworkflow_backend/models/data_store.py b/src/spiffworkflow_backend/models/data_store.py index 2ae9ae79..f4e349de 100644 --- a/src/spiffworkflow_backend/models/data_store.py +++ b/src/spiffworkflow_backend/models/data_store.py @@ -1,6 +1,7 @@ """Data_store.""" from flask_bpmn.models.db import db from flask_bpmn.models.db import SpiffworkflowBaseDBModel + from flask_marshmallow.sqla import SQLAlchemyAutoSchema # type: ignore diff --git a/src/spiffworkflow_backend/models/file.py b/src/spiffworkflow_backend/models/file.py index ab8087e4..955f88f7 100644 --- a/src/spiffworkflow_backend/models/file.py +++ b/src/spiffworkflow_backend/models/file.py @@ -2,10 +2,10 @@ import enum from dataclasses import dataclass from dataclasses import field -from typing import Optional - from flask_bpmn.models.db import db from flask_bpmn.models.db import SpiffworkflowBaseDBModel +from typing import Optional + from marshmallow import INCLUDE from marshmallow import Schema from sqlalchemy.orm import deferred diff --git a/src/spiffworkflow_backend/models/group.py b/src/spiffworkflow_backend/models/group.py index 5547f429..56a3d3e8 100644 --- a/src/spiffworkflow_backend/models/group.py +++ b/src/spiffworkflow_backend/models/group.py @@ -1,6 +1,7 @@ """Group.""" from flask_bpmn.models.db import db from flask_bpmn.models.group import FlaskBpmnGroupModel + from sqlalchemy.orm import relationship diff --git a/src/spiffworkflow_backend/models/permission_assignment.py b/src/spiffworkflow_backend/models/permission_assignment.py index da88fd3e..8362001f 100644 --- a/src/spiffworkflow_backend/models/permission_assignment.py +++ b/src/spiffworkflow_backend/models/permission_assignment.py @@ -1,8 +1,8 @@ """PermissionAssignment.""" import enum - from flask_bpmn.models.db import db from flask_bpmn.models.db import SpiffworkflowBaseDBModel + from sqlalchemy import Enum from sqlalchemy import ForeignKey diff --git a/src/spiffworkflow_backend/models/permission_target.py b/src/spiffworkflow_backend/models/permission_target.py index 54af35aa..ec5ccc5b 100644 --- a/src/spiffworkflow_backend/models/permission_target.py +++ b/src/spiffworkflow_backend/models/permission_target.py @@ -1,6 +1,7 @@ """PermissionTarget.""" from flask_bpmn.models.db import db from flask_bpmn.models.db import SpiffworkflowBaseDBModel + from sqlalchemy.schema import CheckConstraint # from sqlalchemy import ForeignKey # type: ignore diff --git a/src/spiffworkflow_backend/models/principal.py b/src/spiffworkflow_backend/models/principal.py index 3c392800..4a38e84c 100644 --- a/src/spiffworkflow_backend/models/principal.py +++ b/src/spiffworkflow_backend/models/principal.py @@ -1,6 +1,7 @@ """Principal.""" from flask_bpmn.models.db import db from flask_bpmn.models.db import SpiffworkflowBaseDBModel + from sqlalchemy import ForeignKey from sqlalchemy.schema import CheckConstraint diff --git a/src/spiffworkflow_backend/models/process_instance.py b/src/spiffworkflow_backend/models/process_instance.py index fd9a68a5..6cd5c397 100644 --- a/src/spiffworkflow_backend/models/process_instance.py +++ b/src/spiffworkflow_backend/models/process_instance.py @@ -1,15 +1,14 @@ """Process_instance.""" import enum - -import marshmallow from flask_bpmn.models.db import db from flask_bpmn.models.db import SpiffworkflowBaseDBModel + +import marshmallow from marshmallow import INCLUDE from marshmallow import Schema from marshmallow_enum import EnumField # type: ignore from SpiffWorkflow.navigation import NavItem # type: ignore from sqlalchemy import ForeignKey -from sqlalchemy import func from sqlalchemy.orm import deferred from sqlalchemy.orm import relationship diff --git a/src/spiffworkflow_backend/models/process_instance_report.py b/src/spiffworkflow_backend/models/process_instance_report.py index 89229f44..78db7304 100644 --- a/src/spiffworkflow_backend/models/process_instance_report.py +++ b/src/spiffworkflow_backend/models/process_instance_report.py @@ -1,6 +1,7 @@ """Process_instance.""" from flask_bpmn.models.db import db from flask_bpmn.models.db import SpiffworkflowBaseDBModel + from sqlalchemy import ForeignKey from sqlalchemy.orm import deferred from sqlalchemy.orm import relationship diff --git a/src/spiffworkflow_backend/models/task_event.py b/src/spiffworkflow_backend/models/task_event.py index d99e407c..f8fee994 100644 --- a/src/spiffworkflow_backend/models/task_event.py +++ b/src/spiffworkflow_backend/models/task_event.py @@ -2,9 +2,9 @@ from __future__ import annotations import enum - from flask_bpmn.models.db import db from flask_bpmn.models.db import SpiffworkflowBaseDBModel + from marshmallow import fields from marshmallow import INCLUDE from marshmallow import Schema diff --git a/src/spiffworkflow_backend/models/user.py b/src/spiffworkflow_backend/models/user.py index 369c40e2..f7698637 100644 --- a/src/spiffworkflow_backend/models/user.py +++ b/src/spiffworkflow_backend/models/user.py @@ -1,12 +1,12 @@ """User.""" +from flask_bpmn.api.api_error import ApiError +from flask_bpmn.models.db import db +from flask_bpmn.models.db import SpiffworkflowBaseDBModel from typing import Optional import jwt import marshmallow from flask import current_app -from flask_bpmn.api.api_error import ApiError -from flask_bpmn.models.db import db -from flask_bpmn.models.db import SpiffworkflowBaseDBModel from marshmallow import Schema from sqlalchemy.orm import relationship diff --git a/src/spiffworkflow_backend/models/user_group_assignment.py b/src/spiffworkflow_backend/models/user_group_assignment.py index bb8db765..21f7b3ac 100644 --- a/src/spiffworkflow_backend/models/user_group_assignment.py +++ b/src/spiffworkflow_backend/models/user_group_assignment.py @@ -1,6 +1,7 @@ """UserGroupAssignment.""" from flask_bpmn.models.db import db from flask_bpmn.models.db import SpiffworkflowBaseDBModel + from sqlalchemy import ForeignKey from sqlalchemy.orm import relationship diff --git a/src/spiffworkflow_backend/routes/admin_blueprint/admin_blueprint.py b/src/spiffworkflow_backend/routes/admin_blueprint/admin_blueprint.py index e85f1e87..555d3f01 100644 --- a/src/spiffworkflow_backend/routes/admin_blueprint/admin_blueprint.py +++ b/src/spiffworkflow_backend/routes/admin_blueprint/admin_blueprint.py @@ -1,4 +1,5 @@ """APIs for dealing with process groups, process models, and process instances.""" +from flask_bpmn.models.db import db from typing import Any from flask import Blueprint @@ -8,7 +9,6 @@ from flask import redirect from flask import render_template from flask import request from flask import url_for -from flask_bpmn.models.db import db from spiffworkflow_backend.models.user import UserModel from spiffworkflow_backend.services.process_instance_processor import ( diff --git a/src/spiffworkflow_backend/routes/process_api_blueprint.py b/src/spiffworkflow_backend/routes/process_api_blueprint.py index 3035d657..b01ad43f 100644 --- a/src/spiffworkflow_backend/routes/process_api_blueprint.py +++ b/src/spiffworkflow_backend/routes/process_api_blueprint.py @@ -1,12 +1,12 @@ """APIs for dealing with process groups, process models, and process instances.""" import json +from flask_bpmn.api.api_error import ApiError +from flask_bpmn.models.db import db import connexion # type: ignore from flask import Blueprint from flask import g from flask import Response -from flask_bpmn.api.api_error import ApiError -from flask_bpmn.models.db import db from spiffworkflow_backend.models.file import FileSchema from spiffworkflow_backend.models.file import FileType diff --git a/src/spiffworkflow_backend/routes/user.py b/src/spiffworkflow_backend/routes/user.py index c7eea67e..f66469e7 100644 --- a/src/spiffworkflow_backend/routes/user.py +++ b/src/spiffworkflow_backend/routes/user.py @@ -1,7 +1,8 @@ """User.""" +from flask_bpmn.api.api_error import ApiError + from flask import current_app from flask import g -from flask_bpmn.api.api_error import ApiError from spiffworkflow_backend.models.user import UserModel diff --git a/src/spiffworkflow_backend/routes/user_blueprint.py b/src/spiffworkflow_backend/routes/user_blueprint.py index 2555c5c7..27e160e5 100644 --- a/src/spiffworkflow_backend/routes/user_blueprint.py +++ b/src/spiffworkflow_backend/routes/user_blueprint.py @@ -1,5 +1,7 @@ """Main.""" import json +from flask_bpmn.api.api_error import ApiError +from flask_bpmn.models.db import db from typing import Any from typing import Final @@ -7,8 +9,6 @@ import flask.wrappers from flask import Blueprint from flask import request from flask import Response -from flask_bpmn.api.api_error import ApiError -from flask_bpmn.models.db import db from sqlalchemy.exc import IntegrityError from spiffworkflow_backend.models.group import GroupModel diff --git a/src/spiffworkflow_backend/scripts/script.py b/src/spiffworkflow_backend/scripts/script.py index 113516bc..1d26b2ac 100644 --- a/src/spiffworkflow_backend/scripts/script.py +++ b/src/spiffworkflow_backend/scripts/script.py @@ -2,7 +2,6 @@ import importlib import os import pkgutil - from flask_bpmn.api.api_error import ApiError diff --git a/src/spiffworkflow_backend/services/file_system_service.py b/src/spiffworkflow_backend/services/file_system_service.py index 86ac3fb1..ca377a71 100644 --- a/src/spiffworkflow_backend/services/file_system_service.py +++ b/src/spiffworkflow_backend/services/file_system_service.py @@ -1,11 +1,11 @@ """File_system_service.""" import os from datetime import datetime +from flask_bpmn.api.api_error import ApiError from typing import List import pytz from flask import current_app -from flask_bpmn.api.api_error import ApiError from spiffworkflow_backend.models.file import CONTENT_TYPES from spiffworkflow_backend.models.file import File diff --git a/src/spiffworkflow_backend/services/process_instance_processor.py b/src/spiffworkflow_backend/services/process_instance_processor.py index 7b47e15e..d52d7a1e 100644 --- a/src/spiffworkflow_backend/services/process_instance_processor.py +++ b/src/spiffworkflow_backend/services/process_instance_processor.py @@ -1,12 +1,11 @@ """Process_instance_processor.""" import json import time -from datetime import datetime +from flask_bpmn.api.api_error import ApiError +from flask_bpmn.models.db import db from typing import List from flask import current_app -from flask_bpmn.api.api_error import ApiError -from flask_bpmn.models.db import db from lxml import etree # type: ignore from SpiffWorkflow import Task as SpiffTask # type: ignore from SpiffWorkflow import TaskState diff --git a/src/spiffworkflow_backend/services/process_instance_service.py b/src/spiffworkflow_backend/services/process_instance_service.py index eff81b85..dd34086b 100644 --- a/src/spiffworkflow_backend/services/process_instance_service.py +++ b/src/spiffworkflow_backend/services/process_instance_service.py @@ -1,10 +1,9 @@ """Process_instance_service.""" import time -from datetime import datetime +from flask_bpmn.models.db import db from typing import List from flask import current_app -from flask_bpmn.models.db import db from SpiffWorkflow import NavItem # type: ignore from SpiffWorkflow.bpmn.specs.ManualTask import ManualTask # type: ignore from SpiffWorkflow.bpmn.specs.UserTask import UserTask # type: ignore diff --git a/src/spiffworkflow_backend/services/process_model_service.py b/src/spiffworkflow_backend/services/process_model_service.py index aa971e87..83f2a048 100644 --- a/src/spiffworkflow_backend/services/process_model_service.py +++ b/src/spiffworkflow_backend/services/process_model_service.py @@ -2,9 +2,8 @@ import json import os import shutil -from typing import List - from flask_bpmn.api.api_error import ApiError +from typing import List from spiffworkflow_backend.models.process_group import ProcessGroup from spiffworkflow_backend.models.process_group import ProcessGroupSchema diff --git a/src/spiffworkflow_backend/services/spec_file_service.py b/src/spiffworkflow_backend/services/spec_file_service.py index f96fb11c..5da17289 100644 --- a/src/spiffworkflow_backend/services/spec_file_service.py +++ b/src/spiffworkflow_backend/services/spec_file_service.py @@ -2,10 +2,10 @@ import os import shutil from datetime import datetime +from flask_bpmn.api.api_error import ApiError from typing import List from typing import Union -from flask_bpmn.api.api_error import ApiError from lxml import etree # type: ignore from lxml.etree import Element as EtreeElement # type: ignore from SpiffWorkflow.bpmn.parser.ValidationException import ValidationException # type: ignore diff --git a/src/spiffworkflow_backend/services/user_service.py b/src/spiffworkflow_backend/services/user_service.py index 5c903943..d8105c0e 100644 --- a/src/spiffworkflow_backend/services/user_service.py +++ b/src/spiffworkflow_backend/services/user_service.py @@ -1,8 +1,9 @@ """User_service.""" -from flask import g from flask_bpmn.api.api_error import ApiError from flask_bpmn.models.db import db +from flask import g + from spiffworkflow_backend.models.user import AdminSessionModel from spiffworkflow_backend.models.user import UserModel diff --git a/src/spiffworkflow_backend/spiff_workflow_connector.py b/src/spiffworkflow_backend/spiff_workflow_connector.py index c267f6fa..c896bf81 100755 --- a/src/spiffworkflow_backend/spiff_workflow_connector.py +++ b/src/spiffworkflow_backend/spiff_workflow_connector.py @@ -1,11 +1,11 @@ """Spiff Workflow Connector.""" +from flask_bpmn.models.db import db from typing import Any from typing import Dict from typing import List from typing import Optional from typing import Union -from flask_bpmn.models.db import db from SpiffWorkflow.bpmn.serializer.workflow import BpmnWorkflowSerializer # type: ignore from SpiffWorkflow.bpmn.specs.events.event_types import CatchingEvent # type: ignore from SpiffWorkflow.bpmn.specs.events.event_types import ThrowingEvent diff --git a/tests/spiffworkflow_backend/helpers/test_data.py b/tests/spiffworkflow_backend/helpers/test_data.py index 7cf8b48c..3360d27c 100644 --- a/tests/spiffworkflow_backend/helpers/test_data.py +++ b/tests/spiffworkflow_backend/helpers/test_data.py @@ -1,10 +1,10 @@ """User.""" +from flask_bpmn.models.db import db from typing import Any from typing import Dict from typing import Optional from flask.app import Flask -from flask_bpmn.models.db import db from tests.spiffworkflow_backend.helpers.example_data import ExampleDataLoader from spiffworkflow_backend.models.process_group import ProcessGroup diff --git a/tests/spiffworkflow_backend/integration/test_process_api.py b/tests/spiffworkflow_backend/integration/test_process_api.py index c9ae1726..08e1b8a1 100644 --- a/tests/spiffworkflow_backend/integration/test_process_api.py +++ b/tests/spiffworkflow_backend/integration/test_process_api.py @@ -3,6 +3,7 @@ import io import json import os import shutil +from flask_bpmn.models.db import db from typing import Dict from typing import Iterator from typing import Optional @@ -11,7 +12,6 @@ from typing import Union import pytest from flask.app import Flask from flask.testing import FlaskClient -from flask_bpmn.models.db import db from tests.spiffworkflow_backend.helpers.test_data import find_or_create_user from tests.spiffworkflow_backend.helpers.test_data import load_test_spec from tests.spiffworkflow_backend.helpers.test_data import logged_in_headers @@ -556,7 +556,7 @@ def test_process_instance_create( response = create_process_instance( app, client, test_process_group_id, test_process_model_id, headers ) - assert response.json['updated_at_in_seconds'] is not None + assert response.json["updated_at_in_seconds"] is not None assert response.json["status"] == "complete" assert response.json["process_model_identifier"] == test_process_model_id assert response.json["data"]["current_user"]["username"] == "test_user1" diff --git a/tests/spiffworkflow_backend/unit/test_permissions.py b/tests/spiffworkflow_backend/unit/test_permissions.py index 6ea6ebd6..32a878ea 100644 --- a/tests/spiffworkflow_backend/unit/test_permissions.py +++ b/tests/spiffworkflow_backend/unit/test_permissions.py @@ -1,6 +1,7 @@ """Test Permissions.""" -from flask.app import Flask from flask_bpmn.models.db import db + +from flask.app import Flask from tests.spiffworkflow_backend.helpers.test_data import find_or_create_user from spiffworkflow_backend.models.principal import PrincipalModel diff --git a/tests/spiffworkflow_backend/unit/test_process_group.py b/tests/spiffworkflow_backend/unit/test_process_group.py index b0c375ec..7e5b7a09 100644 --- a/tests/spiffworkflow_backend/unit/test_process_group.py +++ b/tests/spiffworkflow_backend/unit/test_process_group.py @@ -6,6 +6,7 @@ from spiffworkflow_backend.services.process_model_service import ProcessModelSer def test_there_is_at_least_one_group_after_we_create_one(app: Flask) -> None: + """Test_there_is_at_least_one_group_after_we_create_one.""" process_model_service = ProcessModelService() process_group = ProcessGroup(id="hey", display_name="sure") process_model_service.add_process_group(process_group)