Skip to content

Commit

Permalink
Add optional tag to concept display_name and use default for paramete…
Browse files Browse the repository at this point in the history
…r class
  • Loading branch information
nanglo123 committed Sep 9, 2024
1 parent 1739e1a commit ba03a8d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions mira/metamodel/template_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@ class Parameter(Concept):
"""A Parameter is a special type of Concept that carries a value."""

value: Optional[float] = Field(
default_factory=None, description="Value of the parameter."
default=None, description="Value of the parameter."
)

distribution: Optional[Distribution] = Field(
default_factory=None,
default=None,
description="A distribution of values for the parameter.",
)

Expand Down
2 changes: 1 addition & 1 deletion mira/metamodel/templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class Concept(BaseModel):
"""

name: str = Field(..., description="The name of the concept.")
display_name: str = \
display_name: Optional[str]= \
Field(None, description="An optional display name for the concept. "
"If not provided, the name can be used for "
"display purposes.")
Expand Down

0 comments on commit ba03a8d

Please sign in to comment.