Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/citrine/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "3.16.0"
__version__ = "3.17.0"
11 changes: 11 additions & 0 deletions src/citrine/informatics/design_candidate.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@
]


class DesignCandidateComment(Serializable["DesignCandidateComment"]):
message = properties.String('message')
""":str: the text of the comment"""
created_by = properties.UUID('created.user')
""":UUID: id of the user who created the comment"""
create_time = properties.Datetime('created.time')
""":datetime: date and time at which the comment was created"""


class DesignVariable(PolymorphicSerializable["DesignVariable"]):
"""Classes containing data corresponding to individual descriptors.

Expand Down Expand Up @@ -185,6 +194,8 @@ class DesignCandidate(Serializable["DesignCandidate"]):
""":Optional[UUID]: id of the user who pinned the candidate, if it's been pinned"""
pinned_time = properties.Optional(properties.Datetime, 'pinned.time')
""":Optional[datetime]: date and time at which the candidate was pinned, if it's been pinned"""
comments = properties.List(properties.Object(DesignCandidateComment), 'comments', default=[])
""":list[DesignCandidateComment]: the list of comments on the candidate, with metadata."""


class HierarchicalDesignCandidate(Serializable["HierarchicalDesignCandidate"]):
Expand Down
11 changes: 10 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,16 @@ def example_candidates(example_design_material):
"primary_score": 0,
"material": example_design_material,
"name": "Example candidate",
"hidden": True
"hidden": True,
"comments": [
{
"message": "a message",
"created": {
"user": str(uuid.uuid4()),
"time": '2025-02-20T10:46:26Z'
}
}
]
}]
}

Expand Down