Repository: simpeg/simpeg
Pull request #1324 (2024-01-12 00:28:51)

Fix typo in error messages


<!-- 
Thanks for contributing a pull request to SimPEG!
Remember to use a personal fork of SimPEG to propose changes.

Check out the stages of a pull request at
https://docs.simpeg.xyz/content/getting_started/contributing/pull-requests.html

Note that we are a team of volunteers and we appreciate your
patience during the review process.

Again, thanks for contributing!

Feel free to remove lines from this template that do not apply to you pull request.
-->

#### Summary

Fix typo on "simultaneously" in various error messages.

#### PR Checklist
* [ ] If this is a work in progress PR, set as a Draft PR
* [ ] Linted my code according to the [style guides](https://docs.simpeg.xyz/content/getting_started/contributing/code-style.html).
* [ ] Added [tests](https://docs.simpeg.xyz/content/getting_started/practices.html#testing) to verify changes to the code.
* [ ] Added necessary documentation to any new functions/classes following the
      expect [style](https://docs.simpeg.xyz/content/getting_started/practices.html#documentation).
* [ ] Marked as ready for review (if this is was a draft PR), and converted 
      to a Pull Request
* [ ] Tagged ``@simpeg/simpeg-developers`` when ready for review.

#### Reference issue
<!--Example: write "Closes #NNNN" to automatically close that issue on merge.-->

#### What does this implement/fix?
<!--Please explain your changes.-->

#### Additional information
<!--Any additional information you think is important.-->


<!--
Once all tests pass and the code has been reviewed and approved, it will be merged into main
-->


codecov[bot]: ## [Codecov](https://app.codecov.io/gh/simpeg/simpeg/pull/1324?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=simpeg) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Comparison is base [(`e3cd6ed`)](https://app.codecov.io/gh/simpeg/simpeg/commit/e3cd6ed869d5e49ab817b45f1fec037ac638a68f?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=simpeg) 82.30% compared to head [(`f0f5bf4`)](https://app.codecov.io/gh/simpeg/simpeg/pull/1324?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=simpeg) 35.56%.


<details><summary>Additional details and impacted files</summary>


```diff
@@             Coverage Diff             @@
##             main    #1324       +/-   ##
===========================================
- Coverage   82.30%   35.56%   -46.75%     
===========================================
  Files         165      165               
  Lines       25241    25241               
===========================================
- Hits        20775     8977    -11798     
- Misses       4466    16264    +11798     
```



</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/simpeg/simpeg/pull/1324?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=simpeg).   
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=simpeg).


Patch:
diff --git a/SimPEG/regularization/base.py b/SimPEG/regularization/base.py
index 8e91c704d..5d092c121 100644
--- a/SimPEG/regularization/base.py
+++ b/SimPEG/regularization/base.py
@@ -71,7 +71,7 @@ class BaseRegularization(BaseObjectiveFunction):
         if (key := "indActive") in kwargs:
             if active_cells is not None:
                 raise ValueError(
-                    f"Cannot simultanously pass 'active_cells' and '{key}'. "
+                    f"Cannot simultaneously pass 'active_cells' and '{key}'. "
                     "Pass 'active_cells' only."
                 )
             warnings.warn(
@@ -86,7 +86,7 @@ class BaseRegularization(BaseObjectiveFunction):
         if (key := "cell_weights") in kwargs:
             if weights is not None:
                 raise ValueError(
-                    f"Cannot simultanously pass 'weights' and '{key}'. "
+                    f"Cannot simultaneously pass 'weights' and '{key}'. "
                     "Pass 'weights' only."
                 )
             warnings.warn(
@@ -1588,7 +1588,7 @@ class WeightedLeastSquares(ComboObjectiveFunction):
         if (key := "indActive") in kwargs:
             if active_cells is not None:
                 raise ValueError(
-                    f"Cannot simultanously pass 'active_cells' and '{key}'. "
+                    f"Cannot simultaneously pass 'active_cells' and '{key}'. "
                     "Pass 'active_cells' only."
                 )
             warnings.warn(


Test patch:
diff --git a/tests/base/test_regularization.py b/tests/base/test_regularization.py
index 1f785fe99..43bcc168a 100644
--- a/tests/base/test_regularization.py
+++ b/tests/base/test_regularization.py
@@ -757,7 +757,7 @@ class TestDeprecatedArguments:
     def test_active_cells(self, mesh, regularization_class):
         """Test indActive and active_cells arguments."""
         active_cells = np.ones(len(mesh), dtype=bool)
-        msg = "Cannot simultanously pass 'active_cells' and 'indActive'."
+        msg = "Cannot simultaneously pass 'active_cells' and 'indActive'."
         with pytest.raises(ValueError, match=msg):
             regularization_class(
                 mesh, active_cells=active_cells, indActive=active_cells
@@ -766,7 +766,7 @@ class TestDeprecatedArguments:
     def test_weights(self, mesh):
         """Test cell_weights and weights."""
         weights = np.ones(len(mesh))
-        msg = "Cannot simultanously pass 'weights' and 'cell_weights'."
+        msg = "Cannot simultaneously pass 'weights' and 'cell_weights'."
         with pytest.raises(ValueError, match=msg):
             BaseRegularization(mesh, weights=weights, cell_weights=weights)