Skip to content

Commit

Permalink
Adding release note
Browse files Browse the repository at this point in the history
  • Loading branch information
john-science committed Mar 8, 2024
1 parent 75cf445 commit bcddec9
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 69 deletions.
5 changes: 3 additions & 2 deletions armi/nucDirectory/elements.py
Expand Up @@ -98,6 +98,7 @@
.. exec::
from tabulate import tabulate
from armi.nucDirectory import elements
from dochelpers import createTable
attributes = ['z',
'name',
Expand All @@ -121,10 +122,10 @@ def getAttributes(element):
]
sortedElements = sorted(elements.byZ.values())
return create_table(tabulate(tabular_data=[getAttributes(elem) for elem in sortedElements],
return createTable(tabulate(tabular_data=[getAttributes(elem) for elem in sortedElements],
headers=attributes,
tablefmt='rst'),
caption='List of elements')
caption='List of elements')
"""

import os
Expand Down
9 changes: 5 additions & 4 deletions armi/nucDirectory/nuclideBases.py
Expand Up @@ -99,6 +99,7 @@ class which is used to organize and store metadata about each nuclide. The
import numpy
from tabulate import tabulate
from armi.nucDirectory import nuclideBases
from dochelpers import createTable
attributes = ['name',
'type',
Expand Down Expand Up @@ -126,10 +127,10 @@ def getAttributes(nuc):
]
sortedNucs = sorted(nuclideBases.instances)
return create_table(tabulate(tabular_data=[getAttributes(nuc) for nuc in sortedNucs],
headers=attributes,
tablefmt='rst'),
caption='List of nuclides')
return createTable(tabulate(tabular_data=[getAttributes(nuc) for nuc in sortedNucs],
headers=attributes,
tablefmt='rst'),
caption='List of nuclides')
"""

import os
Expand Down
66 changes: 3 additions & 63 deletions doc/.static/dochelpers.py
@@ -1,4 +1,4 @@
# Copyright 2019 TerraPower, LLC
# Copyright 2024 TerraPower, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -11,33 +11,10 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
Helpers for sphinx documentation.
"""Helpers for Sphinx documentation."""

Can be used by armi docs or docs of anything else that can import armi.
"""


def create_figure(path, caption=None, align=None, alt=None, width=None):
"""
This method is available within ``.. exec::``. It allows someone to create a figure with a
caption.
"""
rst = [".. figure:: {}".format(path)]
if align:
rst += [" :align: {}".format(align)]
if alt:
rst += [" :alt: {}".format(alt)]
if width:
rst += [" :width: {}".format(width)]
if caption:
rst += [""]
if caption:
rst += [" {}".format(caption)]
return rst


def create_table(rst_table, caption=None, align=None, widths=None, width=None):
def createTable(rst_table, caption=None, align=None, widths=None, width=None):
"""
This method is available within ``.. exec::``. It allows someone to create a table with a
caption.
Expand Down Expand Up @@ -165,40 +142,3 @@ def generateParamTable(klass, fwParams, app=None):
content.append(pluginContent + "\n")

return "\n".join(content)


def generatePluginSettingsTable(settings, pluginName):
"""
Return a string containing one or more restructured text list tables containing
settings descriptions for a plugin.
Parameters
----------
settings : list of Settings
This is a list of settings definitions, typically returned by a
``defineSettings`` plugin hook.
"""
headerContent = """
.. list-table:: Settings defined in the {}
:header-rows: 1
:widths: 20 10 50 20
* - Name
- Label
- Description
- Default Value
""".format(
pluginName
)

content = [f".. _{pluginName}-settings-table:"]
pluginContent = headerContent
for setting in settings:
default = None if setting.default == "" else setting.default
pluginContent += f""" * - ``{setting.name}``
- {setting.label}
- {setting.description}
- {default}
"""
content.append(pluginContent + "\n")
return "\n".join(content)
1 change: 1 addition & 0 deletions doc/release/0.3.rst
Expand Up @@ -16,6 +16,7 @@ API Changes
#. Removing unused argument from ``Block.coords()``. (`PR#1651 <https://github.com/terrapower/armi/pull/1651>`_)
#. Removing unused method ``HexGrid.allPositionsInThird()``. (`PR#1655 <https://github.com/terrapower/armi/pull/1655>`_)
#. Removed unused methods: ``Reactor.getAllNuclidesIn()``, ``plotTriangleFlux()``. (`PR#1656 <https://github.com/terrapower/armi/pull/1656>`_)
#. Removed ``armi.utils.dochelpers``; not relevant to nuclear modeling. (`PR#1662 <https://github.com/terrapower/armi/pull/1662>`_)
#. TBD

Bug Fixes
Expand Down

0 comments on commit bcddec9

Please sign in to comment.