Skip to content

Commit 87b98b2

Browse files
committed
Add setProjectInfoField
1 parent d154698 commit 87b98b2

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/perisso/tapir_commands.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,22 @@ def getProjectInfoFields(self) -> dict:
123123
name_ = inspect.currentframe().f_code.co_name
124124
return self._run(name_)
125125

126+
def setProjectInfoField(
127+
self, projectInfoId: str | ProjectInfo, projectInfoValue: str
128+
) -> dict:
129+
"""Sets the value of a project info field.
130+
131+
Args:
132+
projectInfoId (`str | ProjectInfo`): The ID of the project info field, either as a string
133+
or a `ProjectInfo`-class member (enum).
134+
projectInfoValue (`str`): The new value of the project info field.
135+
"""
136+
name_ = inspect.currentframe().f_code.co_name
137+
if isinstance(projectInfoId, ProjectInfo):
138+
projectInfoId = projectInfoId.value
139+
params = {"projectInfoId": projectInfoId, "projectInfoValue": projectInfoValue}
140+
return self._run(name_, params)
141+
126142
def getStories(self) -> dict:
127143
"""Retrieves information about the story sructure of the currently loaded project."""
128144
name_ = inspect.currentframe().f_code.co_name

0 commit comments

Comments
 (0)