Skip to content

Commit

Permalink
doc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
john-science committed Oct 21, 2024
1 parent 8586ad9 commit a4d47d2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
25 changes: 11 additions & 14 deletions armi/reactor/flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,15 +293,14 @@ def fromString(cls, typeSpec):
:id: I_ARMI_FLAG_TO_STR0
:implements: R_ARMI_FLAG_TO_STR
For a string passed as ``typeSpec``, first converts the whole string
to uppercase. Then tries to parse the string for any special phrases, as
defined in the module dictionary ``_CONVERSIONS``, and converts those
phrases to flags directly.
Then it splits the remaining string into separate words based on the presence
of spaces. Looping over each of the words, any numbers are stripped out
and the remaining string is matched up to any class attribute names.
If any matches are found these are returned as flags.
For a string passed as ``typeSpec``, first converts the whole string to uppercase. Then
tries to parse the string for any special phrases, as defined in the module dictionary
``_CONVERSIONS``, and converts those phrases to flags directly.
Then it splits the remaining string into words based on spaces. Looping over each of the
words, if any word exactly matches a flag name. Otherwise, any numbers are stripped out
and the remaining string is matched up to any class attribute names. If any matches are
found these are returned as flags.
"""
return _fromString(cls, typeSpec)

Expand All @@ -314,11 +313,9 @@ def toString(cls, typeSpec):
:id: I_ARMI_FLAG_TO_STR1
:implements: R_ARMI_FLAG_TO_STR
This converts the representation of a bunch of flags from ``typeSpec``,
which might look like ``Flags.A|B``,
into a string with spaces in between the flag names, which would look
like ``'A B'``. This is done via nesting string splitting and replacement
actions.
This converts the representation of a bunch of flags from ``typeSpec``, which might look
like ``Flags.A|B``, into a string with spaces in between the flag names, which would
look like ``'A B'``. This is done via nesting string splitting and replacement actions.
"""
return _toString(cls, typeSpec)

Expand Down
1 change: 1 addition & 0 deletions doc/release/0.4.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ New Features
#. Allow merging a component with zero area into another component. (`PR#1858 <https://github.com/terrapower/armi/pull/1858>`_)
#. Provide ``Parameter.hasCategory`` for quickly checking if a parameter is defined with a given category. (`PR#1899 <https://github.com/terrapower/armi/pull/1899>`_)
#. Provide ``ParameterCollection.where`` for efficient iteration over parameters who's definition matches a given condition. (`PR#1899 <https://github.com/terrapower/armi/pull/1899>`_)
#. Flags can now be defined with letters and numbers. (`PR#1966 <https://github.com/terrapower/armi/pull/1966>`_)
#. Plugins can provide the ``getAxialExpansionChanger`` hook to customize axial expansion. (`PR#1870 <https://github.com/terrapower/armi/pull/1870`_)
#. Plugins can provide the ``getAxialExpansionChanger`` hook to customize axial expansion. (`PR#1870 <https://github.com/terrapower/armi/pull/1870>`_)
#. New plugin hook ``beforeReactorConstruction`` added to enable plugins to process case settings before reactor init. (`PR#1945 <https://github.com/terrapower/armi/pull/1945>`_)
Expand Down

0 comments on commit a4d47d2

Please sign in to comment.