Repository: CORE-GATECH-GROUP/serpent-tools (language: python)

Issue:
ENH Support Serpent 2.2.1
**Is your feature request related to a problem? Please describe.**
Serpent2.2.1 has been released, but it's not included in [options](https://github.com/CORE-GATECH-GROUP/serpent-tools/blob/b53d14e1ed9d6f8090218851f675144cb6696a30/serpentTools/settings.py#LL109C12-L109C12)


**Describe the solution you'd like**
I think repeating the same procedure as in #467 should be enough, i.e.
- [x] check if there are any changes in `_res.m` files in 2.2.1
- [x] `2.2.1` is added to [serpentVersion](https://github.com/CORE-GATECH-GROUP/serpent-tools/blob/b53d14e1ed9d6f8090218851f675144cb6696a30/serpentTools/settings.py#LL109C12-L109C12) 

**Describe alternatives you've considered**
I think it's good to have support for all versions currently in use.
I guess this should be pretty straightforward.

**Additional context**
(None)



Discussion / hints:

Fix patch:
diff --git a/docs/contributors.rst b/docs/contributors.rst
index dae1a3f0..f3647cc6 100644
--- a/docs/contributors.rst
+++ b/docs/contributors.rst
@@ -13,3 +13,4 @@ Here are all the wonderful people that helped make this project happen
 * `Paul Romano <https://github.com/paulromano>`_
 * `Anton Travleev <https://github.com/travleev>`_
 * `@nicolaborate <https://github.com/nicoloabrate>`_ 
+* `@rzehumat <https://github.com/rzehumat>`_ 
diff --git a/docs/develop/converter.rst b/docs/develop/converter.rst
index 4bf7018c..f96a0657 100644
--- a/docs/develop/converter.rst
+++ b/docs/develop/converter.rst
@@ -2,9 +2,9 @@
 
 .. _dev-convert:
 
-==================
-Converter Utilites
-==================
+===================
+Converter Utilities
+===================
 
 One goal for this project is to allow users to use ``serpentTools`` as a
 pipeline for taking :term:`SERPENT` data to other programs.
@@ -17,7 +17,7 @@ on each object. These are obscured from the public API as they don't serve
 a direct purpose besides a simple method by which to translate data
 from one place to the next.
 This collection is called inside the primary ``convert`` method,
-which is reponsible for gathering and writing the data into the new
+which is responsible for gathering and writing the data into the new
 form.
 
 Keeping with the |matlabConv| as an example, it looks for
diff --git a/docs/develop/index.rst b/docs/develop/index.rst
index 0df4b86a..4f191e56 100644
--- a/docs/develop/index.rst
+++ b/docs/develop/index.rst
@@ -11,7 +11,7 @@ without any loss of comprehension.
 .. note::
 
     Developers are encouraged to read and follow new guiding principles
-    in :ref:`data-model` leading up to verison ``0.10.0``
+    in :ref:`data-model` leading up to version ``0.10.0``
 
 .. toctree::
     :maxdepth: 2
diff --git a/docs/examples/DepletionMatrix.rst b/docs/examples/DepletionMatrix.rst
index a1845cf8..a7b6c0b4 100644
--- a/docs/examples/DepletionMatrix.rst
+++ b/docs/examples/DepletionMatrix.rst
@@ -26,7 +26,7 @@ This document will demonstrate the |DepmtxReader|, designed to store such data.
    For this reason, the |DepmtxReader| can store matrices in
    `Compressed Sparse Column <https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.csc_matrix.html>`_
    or full :term:`numpy` arrays. The reader will use the sparse format
-   if :term:`scipy` is installed unless explicitely told to use dense arrays.
+   if :term:`scipy` is installed unless explicitly told to use dense arrays.
 
 
 Basic Operation
diff --git a/docs/examples/Detector.rst b/docs/examples/Detector.rst
index d9b10aa8..18c3c5fe 100644
--- a/docs/examples/Detector.rst
+++ b/docs/examples/Detector.rst
@@ -65,7 +65,7 @@ below:
 +--------------+---------------+
 | ``spectrum`` | CSEWG 239     |
 |              | group         |
-|              | stucture for  |
+|              | structure for |
 |              | flux and      |
 |              | U-235 fission |
 |              | cross section |
diff --git a/docs/glossary.rst b/docs/glossary.rst
index bb5bcd74..18313346 100644
--- a/docs/glossary.rst
+++ b/docs/glossary.rst
@@ -7,7 +7,7 @@ Glossary
 .. glossary::
 
     Anaconda
-        Python distrubution that makes installing packages like
+        Python distribution that makes installing packages like
         :term:`numpy` easier for Windows. Includes over 700
         packages. For a smaller, more minimal approach, see
         :term:`Miniconda`. For more information, see
@@ -15,7 +15,7 @@ Glossary
 
     Anaconda Prompt
         Modified Windows prompt to be used with the :term:`Anaconda` python
-        distrubution. Reconfigures python paths to point to packages
+        distribution. Reconfigures python paths to point to packages
         installed via :term:`conda`
 
     conda
@@ -23,7 +23,7 @@ Glossary
 
           Conda is an open source package management system and environment
           management system that runs on Windows, macOS, and Lunix. Conda
-          quickly installs, runs, and updates packages and their dependncies
+          quickly installs, runs, and updates packages and their dependencies
 
     CI
         Continuous integration. Software we utilize to check that pull
diff --git a/docs/install.rst b/docs/install.rst
index 520c8405..ccfbced1 100644
--- a/docs/install.rst
+++ b/docs/install.rst
@@ -135,7 +135,7 @@ your package manager or from pip::
     # pip
     $ sudo pip install --upgrade numpy
 
-If you already have :term:`numpy`, then the :term:`pip` installtion
+If you already have :term:`numpy`, then the :term:`pip` installation
 process will take care of our other dependencies.
 
 Windows
diff --git a/examples/Branching.ipynb b/examples/Branching.ipynb
index 238afe31..313feb62 100644
--- a/examples/Branching.ipynb
+++ b/examples/Branching.ipynb
@@ -550,7 +550,7 @@
    "metadata": {},
    "source": [
     "## User Control\n",
-    "The `SERPENT` [`set coefpara`](http://serpent.vtt.fi/mediawiki/index.php/Input_syntax_manual#set_coefpara) card already restricts the data present in the coeffient file to user control, and the `BranchingReader` includes similar control.\n",
+    "The `SERPENT` [`set coefpara`](http://serpent.vtt.fi/mediawiki/index.php/Input_syntax_manual#set_coefpara) card already restricts the data present in the coefficient file to user control, and the `BranchingReader` includes similar control.\n",
     "Below are the various settings that the `BranchingReader` uses to read and process coefficient files."
    ]
   },
diff --git a/examples/Detector.ipynb b/examples/Detector.ipynb
index d215dda4..81868e54 100644
--- a/examples/Detector.ipynb
+++ b/examples/Detector.ipynb
@@ -80,7 +80,7 @@
     "|Name| Description|\n",
     "|----|------------|\n",
     "|`nodeFlx`| One-group flux tallied in each axial layer |\n",
-    "|`spectrum`|CSEWG 239 group stucture for flux and U-235 fission cross section|\n",
+    "|`spectrum`|CSEWG 239 group structure for flux and U-235 fission cross section|\n",
     "|`xymesh`|Two-group flux for a 20x20 xy grid|"
    ]
   },
@@ -373,7 +373,7 @@
     "### Slicing\n",
     "As the detectors produced by SERPENT can contain multiple bin types, obtaining data from the tally data can become complicated. This retrieval can be simplified using the `slice` method. This method takes an argument indicating what bins (keys in `indexes`) to fix at what position.\n",
     "\n",
-    "If we want to retrive the tally data for the capture reaction in the `spectrum` detector, you would instruct the `slice` method to use column 1 along the axis that corresponds to the reaction bin, as the fission reaction corresponded to reaction tally 2 in the original matrix. Since python and numpy arrays are zero indexed, the second reaction tally is stored in column 1."
+    "If we want to retrieve the tally data for the capture reaction in the `spectrum` detector, you would instruct the `slice` method to use column 1 along the axis that corresponds to the reaction bin, as the fission reaction corresponded to reaction tally 2 in the original matrix. Since python and numpy arrays are zero indexed, the second reaction tally is stored in column 1."
    ]
   },
   {
diff --git a/examples/ResultsReader.ipynb b/examples/ResultsReader.ipynb
index 50b5732b..1e8ef324 100644
--- a/examples/ResultsReader.ipynb
+++ b/examples/ResultsReader.ipynb
@@ -159,7 +159,7 @@
    "metadata": {},
    "source": [
     "Results are stored as a function of time/burnup/index and include integral parameters of the system.\n",
-    "Results, such as `k-eff`, total `flux`, and execution times are included in `.resdata`. Some results include values and uncertainities (e.g. criticality) and some just the values (e.g. CPU resources). "
+    "Results, such as `k-eff`, total `flux`, and execution times are included in `.resdata`. Some results include values and uncertainties (e.g. criticality) and some just the values (e.g. CPU resources). "
    ]
   },
   {
@@ -659,7 +659,7 @@
    "metadata": {},
    "source": [
     "However this requires knowledge of all four parameters which may be difficult. The `getUniv` method retrieves a specific universe that matches universe id and time of interest. \n",
-    "While all four identifers, (universe id, burnup, step, and time) can be provided, the latter three are usually redundant."
+    "While all four identifiers, (universe id, burnup, step, and time) can be provided, the latter three are usually redundant."
    ]
   },
   {
diff --git a/scripts/ci/install.sh b/scripts/ci/install.sh
index f96eeca1..7d33343e 100755
--- a/scripts/ci/install.sh
+++ b/scripts/ci/install.sh
@@ -10,7 +10,7 @@ set -o pipefail
 
 # Run only for CI builds
 if [[ $CI != true ]]; then
-    echo Instal script only meant to be run for CI testing
+    echo Install script only meant to be run for CI testing
     exit 1
 fi
 
diff --git a/serpentTools/detectors.py b/serpentTools/detectors.py
index e831e4d4..3059987f 100644
--- a/serpentTools/detectors.py
+++ b/serpentTools/detectors.py
@@ -1317,11 +1317,11 @@ def hexPlot(self,
 
         if not isinstance(borderpad, Real):
             raise TypeError(
-                "borderpad should be postive float, not {}".format(
+                "borderpad should be positive float, not {}".format(
                     type(borderpad)))
         elif borderpad < 0:
             raise ValueError(
-                "borderpad should be postive, not {}".format(borderpad))
+                "borderpad should be positive, not {}".format(borderpad))
 
         kwargs.setdefault("ec", "k")
         kwargs.setdefault("edgecolor", "k")
@@ -1414,7 +1414,7 @@ class CylindricalDetector(Detector):
         to a unique bin, such as energy or spatial bin. Note:
         this is a relative error as it would appear in the
         output file
-    indexes : collections.OrderedDict, optinal
+    indexes : collections.OrderedDict, optional
         Dictionary mapping the bin name to its corresponding
         axis in :attr:`tallies` and :attr:`errors`, e.g.
         ``{"energy": 0}``
diff --git a/serpentTools/engines.py b/serpentTools/engines.py
index a19dd767..e356eb35 100644
--- a/serpentTools/engines.py
+++ b/serpentTools/engines.py
@@ -177,7 +177,7 @@ def yieldMatches(self, pattern):
         ----------
         pattern: str or compiled regular expression
             Seek through the file and yield all match groups for lines that
-            contain this patten.
+            contain this pattern.
 
         Yields
         ------
diff --git a/serpentTools/objects/materials.py b/serpentTools/objects/materials.py
index 6e4eefab..e0d45cfd 100644
--- a/serpentTools/objects/materials.py
+++ b/serpentTools/objects/materials.py
@@ -189,7 +189,7 @@ def photonProdRate(self):
         return self.data.get("gsrc")
 
     def _getIsoID(self, isotopes):
-        """Return the row indices that correspond to specfic isotopes."""
+        """Return the row indices that correspond to specific isotopes."""
         if not isotopes:
             return numpy.array(list(range(len(self.names))), dtype=int)
         isoList = [isotopes] if isinstance(isotopes, (str, int)) else isotopes
diff --git a/serpentTools/objects/xsdata.py b/serpentTools/objects/xsdata.py
index ea1429ae..6f082c69 100644
--- a/serpentTools/objects/xsdata.py
+++ b/serpentTools/objects/xsdata.py
@@ -280,7 +280,7 @@ def tabulate(self, mts='all', colnames=None):
             pass
         else:
             msg = ("mts argument must be a string saying 'all',"
-                   "a list of integer MTs, or a single interger"
+                   "a list of integer MTs, or a single integer"
                    "instead, {} of type {} was passed."
                    .format(mts, type(mts)))
             raise TypeError(msg)
@@ -425,7 +425,7 @@ def _processPlotLabels(self, mts, labels):
         return labels
 
     def showMT(self, retstring=False):
-        """Create a pretty-print style string of the MT values avaialable
+        """Create a pretty-print style string of the MT values available
 
 
         Parameters
diff --git a/serpentTools/parsers/base.py b/serpentTools/parsers/base.py
index 2c7f7ac9..b126f250 100644
--- a/serpentTools/parsers/base.py
+++ b/serpentTools/parsers/base.py
@@ -119,8 +119,8 @@ class SparseReaderMixin(object):
     ``sparse`` passed to the constructor and if :term:`scipy` is
     installed.
 
-    Paramters
-    ---------
+    Parameters
+    ----------
     sparse: bool or ``None``
         Flag to store sparse matrices or full matrices.
         If ``None``, use full only if :term:`scipy` is not installed.
diff --git a/serpentTools/parsers/depletion.py b/serpentTools/parsers/depletion.py
index aa730d82..18ade582 100644
--- a/serpentTools/parsers/depletion.py
+++ b/serpentTools/parsers/depletion.py
@@ -495,7 +495,7 @@ def saveAsMatlab(self, fileP, reconvert=True, metadata=None,
         if metadata is not None:
             warn("metadata argument is deprecated. All metadata written",
                  FutureWarning)
-            # need this path to perserve selecting not to write
+            # need this path to preserve selecting not to write
             # metadata
         converter = MatlabConverter(self, fileP)
         return converter.convert(reconvert, append, format, longNames,
diff --git a/serpentTools/parsers/results.py b/serpentTools/parsers/results.py
index a4270f1b..046a1b5d 100644
--- a/serpentTools/parsers/results.py
+++ b/serpentTools/parsers/results.py
@@ -55,6 +55,7 @@
 MapStrVersions['2.1.31'] = MapStrVersions['2.1.29']
 MapStrVersions['2.1.32'] = MapStrVersions['2.1.29']
 MapStrVersions['2.2.0'] = MapStrVersions['2.1.32']
+MapStrVersions['2.2.1'] = MapStrVersions['2.1.32']
 
 METADATA_CONV = {
     int: {
@@ -450,7 +451,7 @@ def getUniv(self, univ, burnup=None, index=None, timeDays=None):
             Burnup [MWd/kgU] of the desired universe
         timeDays: float or int, optional
             Time [days] of the desired universe
-        index: int, optinal
+        index: int, optional
             Point of interest in the burnup/days index
 
         Returns
@@ -503,7 +504,9 @@ def _precheck(self):
 
         self._keysVersion = keys
 
-        self._burnupKeys = {k: convertVariableName(keys[k]) for k in {"days", "burnup"}}
+        self._burnupKeys = {
+            k: convertVariableName(keys[k]) for k in {"days", "burnup"}
+        }
 
         univSet = set()
         verWarning = True
@@ -521,7 +524,7 @@ def _precheck(self):
                                 "defined in settings"
                                 .format(varVals, self.filePath,
                                         serpentV))
-                        warning("  Attemping to read anyway. Please report "
+                        warning("  Attempting to read anyway. Please report "
                                 "strange behaviors/failures to developers.")
                 if self._keysVersion['univ'] in tline:
                     varType, varVals = self._getVarValues(tline)  # universe
diff --git a/serpentTools/parsers/sensitivity.py b/serpentTools/parsers/sensitivity.py
index 9de5ddf4..a0b6cd56 100644
--- a/serpentTools/parsers/sensitivity.py
+++ b/serpentTools/parsers/sensitivity.py
@@ -377,7 +377,7 @@ def plot(
         labelFmt : None or str
             Formattable string to be applied to the labels.
             The following entries will be formatted for each plot
-            permuation::
+            permutation::
 
                 {m} - name of the material
                 {z} - isotope zai
diff --git a/serpentTools/parsers/xsplot.py b/serpentTools/parsers/xsplot.py
index 3b5b30c8..24a83250 100644
--- a/serpentTools/parsers/xsplot.py
+++ b/serpentTools/parsers/xsplot.py
@@ -43,7 +43,7 @@ class XSPlotReader(BaseReader):
         L-inf norm among all macroscopic cross sections used in the problem.
     metadata: dict
         Alias for accessing :attr:`energies` and :attr:`majorant`.
-        Attribute-based access is prefered, as this property will
+        Attribute-based access is preferred, as this property will
         likely be removed in the future
 
     """
diff --git a/serpentTools/settings.py b/serpentTools/settings.py
index f8bd2fe0..6198652e 100644
--- a/serpentTools/settings.py
+++ b/serpentTools/settings.py
@@ -106,7 +106,7 @@
     },
     'serpentVersion': {
         'default': '2.1.31',
-        'options': ['2.1.29', '2.1.30', '2.1.31', '2.1.32', "2.2.0"],
+        'options': ['2.1.29', '2.1.30', '2.1.31', '2.1.32', "2.2.0", "2.2.1"],
         # When adding new version of Serpent, add / update
         # MapStrVersions with variables that indicate the start of specific
         # data blocks / time parameters like burnup
diff --git a/serpentTools/utils/compare.py b/serpentTools/utils/compare.py
index 5274f226..c9c8841a 100644
--- a/serpentTools/utils/compare.py
+++ b/serpentTools/utils/compare.py
@@ -118,7 +118,7 @@ def directCompare(obj0, obj1, lower, upper):
     """
     Return True if values are close enough to each other.
 
-    Wrapper around various comparision tests for strings, numeric, and
+    Wrapper around various comparison tests for strings, numeric, and
     arrays.
 
     Parameters
@@ -261,7 +261,7 @@ def logDirectCompare(obj0, obj1, lower, upper, quantity):
     * :func:`directCompare` - function that does the comparison
     * :func:`getOverlaps` - function for evaluating values with uncertainties
     * :func:`getLogOverlaps` - function that logs the result of stastistical
-      comparisions
+      comparisons
     """
     result = directCompare(obj0, obj1, lower, upper)
     if result < 0:  # failures
@@ -393,7 +393,7 @@ def getKeyMatchingShapes(map0, map1, quantity, keySet=None, desc0='first',
 @compareDocDecorator
 def getOverlaps(arr0, arr1, unc0, unc1, sigma, relative=True):
     r"""
-    Return the indicies of overlapping confidence intervals
+    Return the indices of overlapping confidence intervals
 
     Parameters
     ----------
diff --git a/serpentTools/utils/core.py b/serpentTools/utils/core.py
index c1b35ada..ca751b26 100644
--- a/serpentTools/utils/core.py
+++ b/serpentTools/utils/core.py
@@ -29,7 +29,7 @@ def str2vec(iterable, dtype=float, out=array):
         entry. This is returned directly, avoiding conversion
         with ``dtype``.
         Every item in this split list, or original
-        iterable, will be iterated over and converted accoring
+        iterable, will be iterated over and converted according
         to the other arguments.
     dtype: type
         Convert each value in ``iterable`` to this data type.
diff --git a/serpentTools/utils/plot.py b/serpentTools/utils/plot.py
index 17313afa..55e98eaf 100644
--- a/serpentTools/utils/plot.py
+++ b/serpentTools/utils/plot.py
@@ -1,5 +1,5 @@
 """
-Utilties for assisting with plots
+Utilities for assisting with plots
 """
 from matplotlib import pyplot
 from matplotlib.axes import Axes


Test patch:
diff --git a/tests/plots/test_homoguniv.py b/tests/plots/test_homoguniv.py
index f805cdfb..092ae663 100644
--- a/tests/plots/test_homoguniv.py
+++ b/tests/plots/test_homoguniv.py
@@ -27,7 +27,7 @@ def test_homoguniv_multi(univ):
         labelFmt="{u} @ {b} MWd/kgU // {d} days // step {i}: {k}",
         xlabel="Incident energy (MeV)",
         ylabel="Macroscopic cross section (cm$^{-1})$",
-        # Addtional arguments to pass along to the underlying plot
+        # Additional arguments to pass along to the underlying plot
         linestyle="--",
     )
 
diff --git a/tests/test_container.py b/tests/test_container.py
index b7492db0..f29ace05 100644
--- a/tests/test_container.py
+++ b/tests/test_container.py
@@ -174,7 +174,7 @@ class UnivTruthTester(TestCase):
     """Class that tests the various boolean evaluations for HomogUniv"""
 
     def setUp(self):
-        """Verify that an empty universe evalutes to False."""
+        """Verify that an empty universe evaluates to False."""
         self.assertFalse(self.getUniv())
 
     def test_loadedUnivTrue(self):
diff --git a/tests/test_depletion.py b/tests/test_depletion.py
index 5dc00615..4e2c5d7f 100644
--- a/tests/test_depletion.py
+++ b/tests/test_depletion.py
@@ -414,7 +414,7 @@ def constructExpectedVarName(self, material, variable):
 
 
 class DepMatlabExportConverter(DepMatlabExportHelper):
-    """Mixin class that converts variables back to orgiginal form"""
+    """Mixin class that converts variables back to original form"""
 
     RECONVERT = True
 
diff --git a/tests/test_plot.py b/tests/test_plot.py
index 33332686..f726629b 100644
--- a/tests/test_plot.py
+++ b/tests/test_plot.py
@@ -79,7 +79,7 @@ def setUp(self):
         self.data = arange(-4, 5)
 
     def _testType(self, norm):
-        """Ensure the return type is an instance/sublass of Normalize."""
+        """Ensure the return type is an instance/subclass of Normalize."""
         typeFlag = (isinstance(norm, Normalize)
                     or issubclass(norm.__class__, Normalize))
         self.assertTrue(typeFlag, msg=(
diff --git a/tests/test_seed.py b/tests/test_seed.py
index f95423b9..4b856e6c 100644
--- a/tests/test_seed.py
+++ b/tests/test_seed.py
@@ -145,7 +145,7 @@ class SeedlessFileWriter(SeedFileHelper):
 
 class SeededFileWriter(SeedFileHelper):
     """
-    Test the reproducability of the file writer by explictely passing a seed.
+    Test the reproducibility of the file writer by explicitly passing a seed.
     """
 
     @classmethod
diff --git a/tests/test_settings.py b/tests/test_settings.py
index 55163769..fbefb4e9 100644
--- a/tests/test_settings.py
+++ b/tests/test_settings.py
@@ -19,7 +19,7 @@ def setUpClass(cls):
         cls.testSettingMethod = cls.assertListEqual
 
     def test_getDefault(self):
-        """Verify the default settings loader properly retrives defaults."""
+        """Verify the default settings loader properly retrieves defaults."""
         self.testSettingMethod(self._getLoaderSetting(self.testSetting),
                                self.testSettingExpected)
 
@@ -106,7 +106,7 @@ def test_fullExtend(self):
 
 
 class ConfigLoaderTester(TestCaseWithLogCapture):
-    """Class to test loading multiple setttings at once, i.e. config files"""
+    """Class to test loading multiple settings at once, i.e. config files"""
 
     @classmethod
     def setUpClass(cls):
@@ -166,6 +166,7 @@ def test_loadNestedNonStrict(self):
         self.assertMsgInLogs("ERROR", "bad setting", partial=True)
 
 
-def test_supports_2_2():
+def test_supports_2_2_x():
     with settings.rc as rc:
-        rc["serpentVersion"] = "2.2.0"
+        for ver in ["2.2.0", "2.2.1"]:
+            rc["serpentVersion"] = ver
diff --git a/tests/test_utils.py b/tests/test_utils.py
index 56a28375..deb8f5fc 100644
--- a/tests/test_utils.py
+++ b/tests/test_utils.py
@@ -102,7 +102,7 @@ def test_splitVals(self):
         assert_array_equal(expectedU, actualU, err_msg="Uncertainties")
 
     def test_splitCopy(self):
-        """Verfiy that a copy, not a view, is returned when copy=True"""
+        """Verify that a copy, not a view, is returned when copy=True"""
         viewV, viewU = splitValsUncs(self.input)
         copyV, copyU = splitValsUncs(self.input, copy=True)
         for view, copy, msg in zip(