[Feature] PEPPER in enviPath (#332)

Co-authored-by: Tim Lorsbach <tim@lorsba.ch>
Reviewed-on: enviPath/enviPy#332
This commit is contained in:
2026-03-06 22:11:22 +13:00
parent 6e00926371
commit c6ff97694d
43 changed files with 3793 additions and 371 deletions

View File

@ -22,6 +22,7 @@ from epdb.models import (
Node,
Pathway,
Permission,
PropertyPluginModel,
Reaction,
Rule,
Setting,
@ -1109,10 +1110,11 @@ class SettingManager(object):
description: str = None,
max_nodes: int = None,
max_depth: int = None,
rule_packages: List[Package] = None,
rule_packages: List[Package] | None = None,
model: EPModel = None,
model_threshold: float = None,
expansion_scheme: ExpansionSchemeChoice = ExpansionSchemeChoice.BFS,
property_models: List["PropertyPluginModel"] | None = None,
):
new_s = Setting()
@ -1133,6 +1135,11 @@ class SettingManager(object):
new_s.rule_packages.add(r)
new_s.save()
if property_models is not None:
for pm in property_models:
new_s.property_models.add(pm)
new_s.save()
usp = UserSettingPermission()
usp.user = user
usp.setting = new_s