From 02f18152991d2d1992a71ff5feaa7f43e92d24ce Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Fri, 29 Jul 2022 10:08:33 -0500 Subject: [PATCH] Add missing versionadded directives --- openmc/data/kalbach_mann.py | 5 +++++ openmc/deplete/coupled_operator.py | 6 ++++++ openmc/deplete/independent_operator.py | 5 +++-- openmc/deplete/microxs.py | 8 +++++--- openmc/filter.py | 2 ++ openmc/material.py | 4 +++- openmc/region.py | 2 ++ openmc/stats/univariate.py | 2 ++ openmc/universe.py | 6 ++++++ openmc/weight_windows.py | 4 +++- 10 files changed, 37 insertions(+), 7 deletions(-) diff --git a/openmc/data/kalbach_mann.py b/openmc/data/kalbach_mann.py index a036da694..f98bb4186 100644 --- a/openmc/data/kalbach_mann.py +++ b/openmc/data/kalbach_mann.py @@ -178,6 +178,8 @@ def kalbach_slope(energy_projectile, energy_emitted, za_projectile, energies are not calculated with the AWR number, but approximated with the number of mass instead. + .. versionadded:: 0.13.1 + Parameters ---------- energy_projectile : float @@ -593,6 +595,9 @@ class KalbachMann(AngleEnergy): If the projectile is a neutron, the slope is calculated when it is not given explicitly. + .. versionchanged:: 0.13.1 + Arguments changed to accommodate slope calculation + Parameters ---------- file_obj : file-like object diff --git a/openmc/deplete/coupled_operator.py b/openmc/deplete/coupled_operator.py index eba90f60d..dd14f282f 100644 --- a/openmc/deplete/coupled_operator.py +++ b/openmc/deplete/coupled_operator.py @@ -56,6 +56,7 @@ def _find_cross_sections(model): ) return cross_sections + def _get_nuclides_with_data(cross_sections): """Loads cross_sections.xml file to find nuclides with neutron data @@ -81,6 +82,7 @@ def _get_nuclides_with_data(cross_sections): return nuclides + class CoupledOperator(OpenMCOperator): """Transport-coupled transport operator. @@ -93,6 +95,9 @@ class CoupledOperator(OpenMCOperator): The geometry and settings parameters have been replaced with a model parameter that takes a :class:`~openmc.model.Model` object + .. versionchanged:: 0.13.1 + Name changed from ``Operator`` to ``CoupledOperator`` + Parameters ---------- model : openmc.model.Model @@ -534,6 +539,7 @@ class CoupledOperator(OpenMCOperator): if self.cleanup_when_done: openmc.lib.finalize() + # Retain deprecated name for the time being def Operator(*args, **kwargs): # warn of name change diff --git a/openmc/deplete/independent_operator.py b/openmc/deplete/independent_operator.py index a2d89e441..20267f948 100644 --- a/openmc/deplete/independent_operator.py +++ b/openmc/deplete/independent_operator.py @@ -6,8 +6,6 @@ transport solver by using user-provided one-group cross sections. """ import copy -from collections import OrderedDict -from warnings import warn from itertools import product import numpy as np @@ -22,6 +20,7 @@ from .microxs import MicroXS from .results import Results from .helpers import ChainFissionHelper, ConstantFissionYieldHelper, SourceRateHelper + class IndependentOperator(OpenMCOperator): """Transport-independent transport operator that uses one-group cross sections to calculate reaction rates. @@ -32,6 +31,8 @@ class IndependentOperator(OpenMCOperator): passed to an integrator class, such as :class:`openmc.deplete.CECMIntegrator`. + .. versionadded:: 0.13.1 + Parameters ---------- materials : openmc.Materials diff --git a/openmc/deplete/microxs.py b/openmc/deplete/microxs.py index ccbfab538..72d87d3b7 100644 --- a/openmc/deplete/microxs.py +++ b/openmc/deplete/microxs.py @@ -25,8 +25,10 @@ _valid_rxns.append('fission') class MicroXS(DataFrame): - """Stores microscopic cross section data for use in - transport-independent depletion. + """Microscopic cross section data for use in transport-independent depletion. + + .. versionadded:: 0.13.1 + """ @classmethod @@ -59,7 +61,7 @@ class MicroXS(DataFrame): energy_bound : 2-tuple of float, optional Bounds for the energy group. run_kwargs : dict, optional - Keyword arguments for :meth:`openmc.model.Model.run()` + Keyword arguments passed to :meth:`openmc.model.Model.run` Returns ------- diff --git a/openmc/filter.py b/openmc/filter.py index d7ab3f27e..7874a775b 100644 --- a/openmc/filter.py +++ b/openmc/filter.py @@ -1340,6 +1340,8 @@ class EnergyFilter(RealFilter): def from_group_structure(cls, group_structure): """Construct an EnergyFilter instance from a standard group structure. + .. versionadded:: 0.13.1 + Parameters ---------- group_structure : str diff --git a/openmc/material.py b/openmc/material.py index 6c23d3319..167eaba84 100644 --- a/openmc/material.py +++ b/openmc/material.py @@ -463,6 +463,8 @@ class Material(IDManagerMixin): def remove_element(self, element): """Remove an element from the material + .. versionadded:: 0.13.1 + Parameters ---------- element : str @@ -918,7 +920,7 @@ class Material(IDManagerMixin): Returns ------- Union[dict, float] - If by_nuclide is True then a dictionary whose keys are nuclide + If by_nuclide is True then a dictionary whose keys are nuclide names and values are activity is returned. Otherwise the activity of the material is returned as a float. """ diff --git a/openmc/region.py b/openmc/region.py index 4e74a08ad..5d0e68020 100644 --- a/openmc/region.py +++ b/openmc/region.py @@ -269,6 +269,8 @@ class Region(ABC): inplace : bool Whether or not to return a region based on new surfaces or one based on the original surfaces that have been modified. + + .. versionadded:: 0.13.1 memo : dict or None Dictionary used for memoization. This parameter is used internally and should not be specified by the user. diff --git a/openmc/stats/univariate.py b/openmc/stats/univariate.py index 0c3052625..d6b8a7573 100644 --- a/openmc/stats/univariate.py +++ b/openmc/stats/univariate.py @@ -205,6 +205,8 @@ class Discrete(Univariate): def merge(cls, dists, probs): """Merge multiple discrete distributions into a single distribution + .. versionadded:: 0.13.1 + Parameters ---------- dists : iterable of openmc.stats.Discrete diff --git a/openmc/universe.py b/openmc/universe.py index 4aa1775fb..081fff4ff 100644 --- a/openmc/universe.py +++ b/openmc/universe.py @@ -644,6 +644,8 @@ class DAGMCUniverse(UniverseBase): bounding_box : 2-tuple of numpy.array Lower-left and upper-right coordinates of an axis-aligned bounding box of the universe. + + .. versionadded:: 0.13.1 """ def __init__(self, @@ -726,6 +728,9 @@ class DAGMCUniverse(UniverseBase): def bounding_region(self, bounded_type='box', boundary_type='vacuum', starting_id=10000): """Creates a either a spherical or box shaped bounding region around the DAGMC geometry. + + .. versionadded:: 0.13.1 + Parameters ---------- bounded_type : str @@ -740,6 +745,7 @@ class DAGMCUniverse(UniverseBase): Starting ID of the surface(s) used in the region. For bounded_type 'box', the next 5 IDs will also be used. Defaults to 10000 to reduce the chance of an overlap of surface IDs with the DAGMC geometry. + Returns ------- openmc.Region diff --git a/openmc/weight_windows.py b/openmc/weight_windows.py index c5b7a00b6..9183bb08b 100644 --- a/openmc/weight_windows.py +++ b/openmc/weight_windows.py @@ -409,7 +409,9 @@ class WeightWindows(IDManagerMixin): def wwinp_to_wws(path): - """Creates WeightWindows classes from a wwinp file + """Create WeightWindows instances from a wwinp file + + .. versionadded:: 0.13.1 Parameters ----------