Skip to content

Add description attribute to Model#3956

Open
EdenRochmanSharabi wants to merge 1 commit into
openmc-dev:developfrom
EdenRochmanSharabi:feature/model-description
Open

Add description attribute to Model#3956
EdenRochmanSharabi wants to merge 1 commit into
openmc-dev:developfrom
EdenRochmanSharabi:feature/model-description

Conversation

@EdenRochmanSharabi
Copy link
Copy Markdown
Contributor

Closes #3586.

Adds a description property to Model that allows users to attach
a free-text description to a model instance.

  • The description is written as a <description> element in model XML
    and read back via from_model_xml.
  • An empty description (the default) is omitted from the output.
  • Type-checked via check_type.

Tests cover round-trip serialization, empty-description omission, and
empty round-trip.

Allow users to attach a free-text description to a Model
instance. The description is written as a <description>
element in model XML and read back on import. An empty
description is omitted from the output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add model.description attribute and persist to model.xml output

1 participant