Skip to content

Conversation

@d-chambers
Copy link
Contributor

@d-chambers d-chambers commented Sep 9, 2025

Description

This PR fixes a bunch of typos.

Checklist

I have (if applicable):

  • referenced the GitHub issue this PR closes.
  • documented the new feature with docstrings or appropriate doc page.
  • included a test. See testing guidelines.
  • your name has been added to the contributors page (docs/contributors.md).
  • added the "ready_for_review" tag once the PR is ready to be reviewed.

Summary by CodeRabbit

  • Bug Fixes

    • % now performs elementwise modulo.
    • Equality comparisons for nested metadata now reliably return a boolean.
    • Improved wording in a deprecation warning.
    • Rolling now shifts data along the intended dimension axis.
  • Documentation

    • Numerous typo and wording corrections across docstrings, examples, tests, and docs.
  • Chores

    • Added ignore rules for Claude-related files.
    • Corrected public parameter name from "extention" to "extension".

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 9, 2025

Walkthrough

Adds Claude patterns to .gitignore; corrects Patch.mod to use elementwise modulo; makes BaseSpool.eq return False for unequal nested dicts; revises PatchAttrs deprecation wording; renames extentionextension in spool_to_directory; adjusts roll axis handling; plus widespread docstring/comment typo fixes and minor variable/name fixes.

Changes

Cohort / File(s) Summary of Changes
Ignore configuration
.gitignore
Added entries to ignore .claude and CLAUDE.md.
Core behavior fixes
dascore/core/attrs.py, dascore/core/patch.py, dascore/core/spool.py
PatchAttrs.__getattr__ deprecation message wording corrected ("depreciated" → "deprecated"); Patch.__mod__ now uses numpy.mod (elementwise modulo) instead of numpy.power; BaseSpool.__eq__ returns False when nested dicts differ instead of propagating None.
Public API signature change
dascore/examples.py
Renamed parameter extentionextension in spool_to_directory signature and updated usage.
Proc behavior adjustment
dascore/proc/basic.py
roll now uses the targeted dimension's axis for np.roll instead of hard-coded axis=0; minor docstring spelling fixes in fillna/pad.
Docstring/comment fixes (library & IO)
dascore/io/segy/utils.py, dascore/proc/coords.py, dascore/proc/units.py, dascore/transform/differentiate.py, dascore/transform/fourier.py, dascore/transform/integrate.py, dascore/utils/hdf5.py, dascore/core/coords.py, dascore/io/febus/utils.py, dascore/io/tdms/utils.py, dascore/viz/map_fiber.py, dascore/viz/waterfall.py, scripts/_render_api.py, docs/notes/doc_strategy.qmd, docs/tutorial/coords.qmd
Minor spelling and wording corrections in docstrings/comments; fixed local variable name chanel_stepchannel_step in SEGY writer; warning message formatted as f-string in SEGY utils. No API changes.
Docstring decorator argument fixes
dascore/proc/filter.py, dascore/proc/rolling.py
Fixed decorator argument typos (sample_exination/sample_explinationsample_explanation) used for docstring composition. No behavior changes.
Tests docstring fixes
tests/test_io/test_dasdae/test_dasdae.py, tests/test_utils/test_hdf_utils.py, tests/test_core/test_coordmanager.py, tests/test_proc/test_detrend.py, tests/test_utils/test_chunk.py, tests/test_utils/test_misc.py
Corrected typos in test docstrings/comments; no functional test changes.

Pre-merge checks (3 passed)

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title “typo fixes” concisely summarizes the primary intent of this changeset by indicating it corrects typographical errors across the codebase. It directly reflects the main purpose of the pull request without introducing unrelated or misleading information.
Description Check ✅ Passed The description includes the required “## Description” section clearly explaining the PR’s purpose and the “## Checklist” with all template items. It follows the repository’s provided template structure and contains no extraneous or missing template headings.
Docstring Coverage ✅ Passed Docstring coverage is 93.33% which is sufficient. The required threshold is 80.00%.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8462489 and 65cc4ea.

📒 Files selected for processing (2)
  • dascore/core/attrs.py (1 hunks)
  • dascore/proc/basic.py (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • dascore/proc/basic.py
  • dascore/core/attrs.py
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (18)
  • GitHub Check: test_code (windows-latest, 3.12)
  • GitHub Check: test_code (windows-latest, 3.11)
  • GitHub Check: test_code (ubuntu-latest, 3.11)
  • GitHub Check: test_code (ubuntu-latest, 3.10)
  • GitHub Check: test_code (windows-latest, 3.13)
  • GitHub Check: test_code (ubuntu-latest, 3.13)
  • GitHub Check: test_code (macos-latest, 3.12)
  • GitHub Check: test_code (ubuntu-latest, 3.12)
  • GitHub Check: test_code (macos-latest, 3.11)
  • GitHub Check: test_code (windows-latest, 3.10)
  • GitHub Check: test_code (macos-latest, 3.10)
  • GitHub Check: test_build_docs
  • GitHub Check: test_code_min_deps (macos-latest, 3.12)
  • GitHub Check: test_code_min_deps (windows-latest, 3.12)
  • GitHub Check: test_code_min_deps (ubuntu-latest, 3.12)
  • GitHub Check: test_code_min_deps (macos-latest, 3.13)
  • GitHub Check: test_code_min_deps (windows-latest, 3.13)
  • GitHub Check: test_code_min_deps (ubuntu-latest, 3.13)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch typo_fixes

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link

codecov bot commented Sep 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.88%. Comparing base (45021e6) to head (65cc4ea).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #530   +/-   ##
=======================================
  Coverage   99.88%   99.88%           
=======================================
  Files         122      122           
  Lines       10035    10035           
=======================================
  Hits        10023    10023           
  Misses         12       12           
Flag Coverage Δ
unittests 99.88% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
dascore/io/segy/utils.py (1)

165-169: Format string bug: {non_time} placeholder is not interpolated.

msg is composed of plain string literals; {non_time} will appear verbatim. Use an f-string to include the actual dimension name.

-    msg = (
-        "Currently the segy writer only handles 'channel' as the non-time "
-        "dimension this results in a loss of the '{non_time}' dimension."
-    )
+    msg = (
+        f"Currently the segy writer only handles 'channel' as the non-time "
+        f"dimension; this results in a loss of the '{non_time}' dimension."
+    )
dascore/proc/basic.py (1)

713-716: Bug: roll always operates on axis 0, ignoring selected dimension.

np.roll should use the resolved axis for the chosen dim. As-is, rolling a non-leading dimension produces incorrect results.

-    roll_arr = np.roll(arr, value, axis=0)
+    roll_arr = np.roll(arr, value, axis=axis)
🧹 Nitpick comments (20)
dascore/io/segy/utils.py (1)

241-241: Typo: variable name ‘chanel_step’.

Minor spelling nit; consider renaming to channel_step for clarity, and update its single usage in the header dict.

-    chanel_step = channel.step
+    channel_step = channel.step

And below:

-                    segyio.su.offset: chanel_step,
+                    segyio.su.offset: channel_step,
tests/test_utils/test_hdf_utils.py (2)

34-36: Nit: class name typo.

Consider renaming TestGetHDF5HandlderTestGetHDF5Handler.

-class TestGetHDF5Handlder:
+class TestGetHDF5Handler:

216-218: Nit: docstring typo.

“attibute” → “attribute”.

-        """A bad attibute should raise a KeyError."""
+        """A bad attribute should raise a KeyError."""
tests/test_io/test_dasdae/test_dasdae.py (2)

134-135: Nit: fix typos in docstring.

“emtpy” → “empty”; “deserialize” → “be deserialized”.

-        """Ensure an emtpy patch can be deserialize."""
+        """Ensure an empty patch can be deserialized."""

127-128: Nit: path fragment spelling.

Consistent naming helps grep: “dasedae_round_trip” → “dasdae_round_trip”.

-        path = tmp_path_factory.mktemp("dasedae_round_trip") / "rt.h5"
+        path = tmp_path_factory.mktemp("dasdae_round_trip") / "rt.h5"
dascore/transform/integrate.py (1)

102-104: Nit: parameter name consistency.

“define” should be “definite”.

-        If define is False, the shape of the patch is preserved and a
+        If definite is False, the shape of the patch is preserved and a
dascore/transform/differentiate.py (2)

110-118: Improve math text clarity (optional).

You can keep LaTeX, but clean up spelling/grammar below to reduce friction for readers.

-    The second order first derivative, for an evenly spaced coordinate,
+    The second-order first derivative, for an evenly spaced coordinate,
@@
-    Where $\hat{f}(x)$ is the estiamted derivative of $f$ at $x$, $dx$ is
+    Where $\hat{f}(x)$ is the estimated derivative of $f$ at $x$, $dx$ is

80-99: Sweep remaining typos in differentiate docstring.

Several misspellings remain (“centeral”, “diferences”, “accuarcy”, “possitive”, “integar”, “differention”). Suggested cleanup:

-    Calculate first derivative along dimension(s) using centeral diferences.
+    Calculate the first derivative along dimension(s) using central differences.
@@
-    along edges are calculated with the same order (accuarcy) as centeral
+    Along edges, derivatives are calculated with the same order (accuracy) as central
@@
-        The order of the differentiation operator. Must be a possitive, even
-        integar.
+        The order of the differentiation operator. Must be a positive, even
+        integer.
@@
-        The number of columns/rows to skip for differention.
+        The number of columns/rows to skip for differentiation.
dascore/transform/fourier.py (2)

132-137: Nit: minor typo fixes in params.

“dimenson” → “dimension”; “peforming” → “performing”.

-        True, which means the last (possibly only) dimenson should have an
+        True, which means the last (possibly only) dimension should have an
@@
-        If True, pad patch before peforming dft along desired dimensions to
+        If True, pad patch before performing dft along desired dimensions to

287-289: Nit: broken link formatting.

Use backticks consistently in the docstring reference.

-    (e.g., with [select]('dascore.proc.basic.select`) otherwise idft won't
+    (e.g., with [select](`dascore.proc.basic.select`) otherwise idft won't
dascore/proc/basic.py (1)

609-612: Nit: typo in pad docs.

“pading” → “padding”.

-        the frequency domain by pading to the next fast fft length after
+        the frequency domain by padding to the next fast fft length after
dascore/proc/units.py (1)

7-9: Rename alias u_covert_units → u_convert_units for clarity.

Minor readability nit; prevents confusing “covert” vs “convert.”

-from dascore.units import convert_units as u_covert_units
+from dascore.units import convert_units as u_convert_units
@@
-        data = u_covert_units(patch.data, data_units, current_units)
+        data = u_convert_units(patch.data, data_units, current_units)

Also applies to: 88-92

dascore/utils/hdf5.py (2)

177-183: Fix spelling: _column_decorders → _column_decoders (and its use).

Purely cosmetic but improves code searchability.

-    _column_decorders = FrozenDict(
+    _column_decoders = FrozenDict(
@@
-        for col, func in self._column_decorders.items():
+        for col, func in self._column_decoders.items():

Also applies to: 242-244


321-324: Remove redundant store.close() around context manager.

The with-statement already closes the store; the extra closes are unnecessary.

-        try:
-            with _HDF5Store(self.path, "r") as store:
-                out = store.get(self._meta_node)
-            store.close()
+        try:
+            with _HDF5Store(self.path, "r") as store:
+                out = store.get(self._meta_node)
             return out
         except (FileNotFoundError, ValueError, KeyError, OSError):
-            with suppress(UnboundLocalError):
-                store.close()
             self._ensure_meta_table_exists()
             return pd.read_hdf(self.path, self._meta_node)

Also applies to: 326-329

dascore/proc/coords.py (6)

249-257: Fix drop_coords docstring: it describes update, not drop.

Align text with behavior.

-    Update the coordinates of a patch.
+    Drop one or more non-dimensional coordinates from a patch.

305-317: Fix make_broadcastable_to docstring: wrong summary.

Reflects broadcasting intent.

-    Update the coordinates of a patch.
+    Make the patch broadcastable to the given shape by adding/expanding
+    non-coordinate dimensions or, if allowed, dropping/updating coords.

373-375: Typo: “uess” → “uses”.

-    * This function uess linear extrapolation between the nearest two points
+    * This function uses linear extrapolation between the nearest two points

475-476: Typo in example keyword.

“distace” → “distance”.

-    >>> new_distance_3 = patch.select(distace=distance[1::2])
+    >>> new_distance_3 = patch.select(distance=distance[1::2])

561-563: Typo: “diemsnions” → “dimensions”.

-        Can also include ... to indicate diemsnions that should be left
+        Can also include ... to indicate dimensions that should be left

721-726: Grammar: “All coordinate” → “All coordinates”.

-            "All coordinate must be associated with the same dimension to "
+            "All coordinates must be associated with the same dimension to "
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a82fe82 and c7397f9.

📒 Files selected for processing (14)
  • .gitignore (1 hunks)
  • dascore/core/attrs.py (1 hunks)
  • dascore/core/patch.py (2 hunks)
  • dascore/core/spool.py (1 hunks)
  • dascore/io/segy/utils.py (1 hunks)
  • dascore/proc/basic.py (1 hunks)
  • dascore/proc/coords.py (4 hunks)
  • dascore/proc/units.py (1 hunks)
  • dascore/transform/differentiate.py (2 hunks)
  • dascore/transform/fourier.py (1 hunks)
  • dascore/transform/integrate.py (1 hunks)
  • dascore/utils/hdf5.py (1 hunks)
  • tests/test_io/test_dasdae/test_dasdae.py (1 hunks)
  • tests/test_utils/test_hdf_utils.py (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
dascore/core/patch.py (1)
dascore/proc/basic.py (1)
  • apply_ufunc (365-485)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (17)
  • GitHub Check: test_code_min_deps (windows-latest, 3.12)
  • GitHub Check: test_code_min_deps (ubuntu-latest, 3.13)
  • GitHub Check: test_code_min_deps (macos-latest, 3.12)
  • GitHub Check: test_code_min_deps (macos-latest, 3.13)
  • GitHub Check: test_code_min_deps (ubuntu-latest, 3.12)
  • GitHub Check: test_code_min_deps (windows-latest, 3.13)
  • GitHub Check: test_code (windows-latest, 3.12)
  • GitHub Check: test_code (macos-latest, 3.13)
  • GitHub Check: test_code (windows-latest, 3.13)
  • GitHub Check: test_code (windows-latest, 3.10)
  • GitHub Check: test_code (windows-latest, 3.11)
  • GitHub Check: test_code (ubuntu-latest, 3.13)
  • GitHub Check: test_code (ubuntu-latest, 3.12)
  • GitHub Check: test_code (ubuntu-latest, 3.11)
  • GitHub Check: test_code (macos-latest, 3.10)
  • GitHub Check: test_code (ubuntu-latest, 3.10)
  • GitHub Check: test_code (macos-latest, 3.11)
🔇 Additional comments (15)
dascore/io/segy/utils.py (1)

35-37: Docstring typo fix looks good.

.gitignore (1)

95-97: Claude ignores added — LGTM.

These patterns are fine. If the .claude directory may contain nested content, the single entry already ignores all within. No action needed.

tests/test_utils/test_hdf_utils.py (1)

120-121: Docstring typo fix confirmed.

“written” spelling correction is correct.

tests/test_io/test_dasdae/test_dasdae.py (1)

117-120: Docstring typo fix confirmed.

dascore/transform/integrate.py (1)

100-101: Docstring wording fix — good.

dascore/transform/differentiate.py (1)

100-102: Example wording tweak is fine.

dascore/transform/fourier.py (1)

153-155: Docstring typo fix — good.

dascore/proc/basic.py (1)

561-565: Docstring example spelling fixes — good.

dascore/proc/units.py (1)

67-71: Docstring typo fix looks good.

"Perform" is correct; no behavioral change.

dascore/utils/hdf5.py (1)

392-401: Docstring typo fix confirmed.

“written” spelling is correct.

dascore/proc/coords.py (1)

220-241: Docstring correction looks good.

“Update the coordinates of a patch.” reads correctly now.

dascore/core/attrs.py (1)

167-169: Deprecation message typo fix looks good.

“deprecated” is correct; behavior unchanged.

dascore/core/spool.py (1)

95-97: Fix ensures boolean False on nested dict inequality.

Prevents None bubbling; equality now reliably returns bool.

dascore/core/patch.py (2)

52-53: Docstring formatting tweak looks good.

Properly references PatchAttrs.


127-129: % operator now uses numpy.mod as expected.

Correct semantic for elementwise modulo; consistent with other operators via apply_ufunc.

@coderabbitai coderabbitai bot added documentation Improvements or additions to documentation ready_for_review PR is ready for review labels Sep 9, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (4)
dascore/proc/rolling.py (1)

212-212: Docstring token mismatch prevents compose_docstring substitution

Decorator uses sample_explanation, but the docstring placeholder is {sample_explination}. The token won’t be replaced.

Apply this diff to align the placeholder:

-@compose_docstring(sample_explanation=samples_arg_description)
+@compose_docstring(sample_explanation=samples_arg_description)
@@
-        {sample_explination}
+        {sample_explanation}

Also applies to: 246-246

scripts/_render_api.py (3)

69-75: More tiny typo/grammar fixes aligned with PR intent.

Low-risk copy edits to comments/docstrings.

 def is_it_subclass(obj, cls):
-    """A more intelligent issubclass that doesn't through TypeErrors."""
+    """A safer issubclass wrapper that returns False instead of raising TypeError."""
@@
 def _deduplicate_list(seq):
-    """Return a list with duplicate removed, preserves order."""
+    """Return a list with duplicates removed; preserves order."""
@@
-        # parameters dont have spaces at the start
+        # parameters don't have spaces at the start
@@
 def to_quarto_code(code_lines):
-    """Class for parsing code (eg examples in docstrings) to quarto output."""
+    """Function for parsing code (e.g., examples in docstrings) to Quarto output."""
@@
-        Example blocks can be written in standard doc-test or quarto styles.
+        Example blocks can be written in standard doctest or Quarto styles.
@@
-    def _get_github_source(self, data):
-        """Get the github source url."""
+    def _get_github_source(self, data):
+        """Get the GitHub source URL."""
@@
-        # grab repo stuff from environment (on GH actions) or defaults
+        # Grab repo info from environment (on GitHub Actions) or defaults
@@
 def render_markdown(self, heading="##"):
-    """Convert numpy docstrings to markdown with some html styling."""
+    """Convert NumPy docstrings to Markdown with some HTML styling."""
@@
 def sha_256(path_or_str: Path | str) -> str:
-    """Get the Sha256 hash of a file or a string."""
+    """Get the SHA-256 hash of a file or a string."""
@@
-        # dont render non-target file if debugging
+        # don't render non-target file if debugging

Also applies to: 77-81, 246-250, 315-317, 271-273, 441-444, 447-451, 496-499, 51-53, 551-552


523-527: Fix path joins (duplicate api_path) and normalize URLs for cross-platform builds.

Avoid composing Paths with embedded “/” strings and ensure forward slashes in emitted URLs.

@@
-    for obj_id, data in data_dict.items():
-        sub_dir = api_path / "/".join(data["key"].split(".")[:-1])
-        path = api_path / sub_dir / f"{data['name']}.qmd"
-        out[data["key"]] = f"/{path.relative_to(DOC_PATH)}"
+    for obj_id, data in data_dict.items():
+        sub_dir = Path(*data["key"].split(".")[:-1])
+        path = api_path / sub_dir / f"{data['name']}.qmd"
+        out[data["key"]] = "/" + path.relative_to(DOC_PATH).as_posix()
@@
-        sub_dir = api_path / "/".join(data["key"].split(".")[:-1])
-        path = api_path / sub_dir / f"{data['name']}.qmd"
+        sub_dir = Path(*data["key"].split(".")[:-1])
+        path = api_path / sub_dir / f"{data['name']}.qmd"
@@
-    api_relative = str(api_path.relative_to(doc_path))
-    for path in DOC_PATH.rglob("*.qmd"):
-        path_relative = str(path.relative_to(parent_doc))
+    api_relative = api_path.relative_to(doc_path).as_posix()
+    for path in doc_path.rglob("*.qmd"):
+        path_relative = path.relative_to(parent_doc).as_posix()
@@
-        value = "/" + str(path.relative_to(doc_path))
+        value = "/" + path.relative_to(doc_path).as_posix()

Also applies to: 543-545, 590-598, 597-601


83-141: Correct typo: rename unpact_annotation to unpack_annotation and add alias

  • Update the function definition and all its calls in scripts/_render_api.py (lines 83, 105–106, 110–111, 114, 151–152, 188–189)
  • Append unpact_annotation = unpack_annotation at the end for backward compatibility
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c7397f9 and 17e0806.

📒 Files selected for processing (19)
  • dascore/core/coords.py (1 hunks)
  • dascore/examples.py (2 hunks)
  • dascore/io/febus/utils.py (1 hunks)
  • dascore/io/segy/utils.py (4 hunks)
  • dascore/io/tdms/utils.py (1 hunks)
  • dascore/proc/basic.py (2 hunks)
  • dascore/proc/correlate.py (1 hunks)
  • dascore/proc/filter.py (5 hunks)
  • dascore/proc/rolling.py (1 hunks)
  • dascore/transform/fourier.py (2 hunks)
  • dascore/viz/map_fiber.py (1 hunks)
  • dascore/viz/waterfall.py (1 hunks)
  • docs/notes/doc_strategy.qmd (1 hunks)
  • docs/tutorial/coords.qmd (2 hunks)
  • scripts/_render_api.py (1 hunks)
  • tests/test_core/test_coordmanager.py (1 hunks)
  • tests/test_proc/test_detrend.py (1 hunks)
  • tests/test_utils/test_chunk.py (1 hunks)
  • tests/test_utils/test_misc.py (1 hunks)
✅ Files skipped from review due to trivial changes (15)
  • dascore/examples.py
  • dascore/io/tdms/utils.py
  • tests/test_core/test_coordmanager.py
  • tests/test_proc/test_detrend.py
  • tests/test_utils/test_misc.py
  • dascore/core/coords.py
  • docs/notes/doc_strategy.qmd
  • tests/test_utils/test_chunk.py
  • dascore/viz/waterfall.py
  • dascore/io/febus/utils.py
  • dascore/viz/map_fiber.py
  • dascore/proc/correlate.py
  • docs/tutorial/coords.qmd
  • dascore/proc/filter.py
  • dascore/transform/fourier.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • dascore/io/segy/utils.py
🧰 Additional context used
🧬 Code graph analysis (2)
dascore/proc/rolling.py (1)
dascore/utils/docs.py (1)
  • compose_docstring (45-97)
dascore/proc/basic.py (1)
dascore/core/coords.py (2)
  • values (942-946)
  • values (1201-1216)
🔇 Additional comments (3)
dascore/proc/basic.py (2)

561-565: LGTM: typo fixes in examples

“occurrences” corrections read well; no functional impact.


713-713: LGTM: roll data along the correct dimension axis

Using axis=axis for the data roll matches the targeted dim derived above.

scripts/_render_api.py (1)

560-560: LGTM: typo fixed in comment.

The “written” correction is good and keeps the comment clear.

Comment on lines 717 to 719
roll_coord_arr = np.roll(coord.values, value, axis=axis)
new_coord = coord.update(values=roll_coord_arr)
patch = patch.update_coords(**{dim: new_coord})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Fix coord rolling: wrong axis and wrong kwarg to coord.update

  • coord.values is 1D; using axis=axis can raise or roll along a non-existent axis. Roll the 1D array (axis 0) or omit axis.
  • coord.update elsewhere takes data=... (see pad at Line 659), not values=.

Apply this diff:

-        roll_coord_arr = np.roll(coord.values, value, axis=axis)
-        new_coord = coord.update(values=roll_coord_arr)
+        roll_coord_arr = np.roll(coord.values, value)
+        new_coord = coord.update(data=roll_coord_arr)
         patch = patch.update_coords(**{dim: new_coord})

Run to confirm no other call sites use the unsupported values= kwarg and to spot any remaining axis misuse:


🏁 Script executed:

#!/bin/bash
# Find coord.update calls using `values=`
rg -nP '\.update\s*\(\s*values\s*=' -g '!**/dist/**' -S

# Cross-check compose_docstring placeholders for "explination" typos
rg -n 'sample_explination' -S

# Sanity: show other coord.update data-arg usage for reference
rg -nP '\.update\s*\(\s*data\s*=' -S

Length of output: 2915


🏁 Script executed:

#!/bin/bash
# Search for any coord.update calls using the unsupported `values=` kwarg
rg -nP '\.update\s*\(\s*values\s*=' -S

# Display context around the existing roll snippet to verify `axis` usage
sed -n '700,740p' dascore/proc/basic.py

Length of output: 1006


Fix coordinate rolling and update kwarg in dascore/proc/basic.py
Change lines 717–719 as follows:

-        roll_coord_arr = np.roll(coord.values, value, axis=axis)
-        new_coord = coord.update(values=roll_coord_arr)
+        roll_coord_arr = np.roll(coord.values, value)
+        new_coord = coord.update(data=roll_coord_arr)

No other .update(values=…) calls remain.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
roll_coord_arr = np.roll(coord.values, value, axis=axis)
new_coord = coord.update(values=roll_coord_arr)
patch = patch.update_coords(**{dim: new_coord})
roll_coord_arr = np.roll(coord.values, value)
new_coord = coord.update(data=roll_coord_arr)
patch = patch.update_coords(**{dim: new_coord})
🤖 Prompt for AI Agents
In dascore/proc/basic.py around lines 717-719, change the coordinate update to
use the correct update kwarg: replace coord.update(values=roll_coord_arr) with
coord.update(value=roll_coord_arr) and keep patch = patch.update_coords(**{dim:
new_coord}); ensure you only change the .update call to use "value" (not
"values") so no .update(values=...) calls remain in the file.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
dascore/core/attrs.py (1)

165-169: Nit: quote attribute names and tighten punctuation in the warning.
Improves readability in logs.

-            msg = f"{item} is deprecated, use {first}_{second} instead."
+            msg = f"'{item}' is deprecated; use '{first}_{second}' instead."
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 17e0806 and adcfe3d.

📒 Files selected for processing (4)
  • dascore/core/attrs.py (1 hunks)
  • dascore/proc/basic.py (2 hunks)
  • dascore/proc/filter.py (4 hunks)
  • dascore/transform/fourier.py (2 hunks)
✅ Files skipped from review due to trivial changes (1)
  • dascore/transform/fourier.py
🚧 Files skipped from review as they are similar to previous changes (2)
  • dascore/proc/basic.py
  • dascore/proc/filter.py
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: test_code_min_deps (ubuntu-latest, 3.12)
  • GitHub Check: test_code_min_deps (macos-latest, 3.13)
  • GitHub Check: test_code_min_deps (ubuntu-latest, 3.13)
  • GitHub Check: test_code_min_deps (windows-latest, 3.12)
  • GitHub Check: test_code_min_deps (windows-latest, 3.13)
  • GitHub Check: test_code_min_deps (macos-latest, 3.12)
  • GitHub Check: test_build_docs
🔇 Additional comments (1)
dascore/core/attrs.py (1)

167-167: LGTM: fixed “depreciated” → “deprecated”.
Accurate wording in the warning message.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
dascore/proc/basic.py (1)

301-303: Max-norm should use absolute values (per docstring).

Docstring says “maximum of the absolute value,” but code uses raw max.

-        norm_values = np.max(data, axis=axis)
+        norm_values = np.max(np.abs(data), axis=axis)
♻️ Duplicate comments (1)
dascore/proc/basic.py (1)

717-719: Bug: coord.update uses unsupported kwarg; use data= not values=.

Current call likely errors or is ignored; other sites (e.g., pad) use data=. Apply:

-        roll_coord_arr = np.roll(coord.values, value)
-        new_coord = coord.update(values=roll_coord_arr)
+        roll_coord_arr = np.roll(coord.values, value)
+        new_coord = coord.update(data=roll_coord_arr)

Run to ensure no remaining .update(values=...):

#!/bin/bash
rg -nP '\.update\s*\(\s*values\s*=' -S
🧹 Nitpick comments (1)
dascore/proc/basic.py (1)

608-611: Typo: “pading” → “padding”.

Minor docstring cleanup.

-        "correlate" - prepare the coordinate for correlation/convolution in
-        the frequency domain by pading to the next fast fft length after
+        "correlate" - prepare the coordinate for correlation/convolution in
+        the frequency domain by padding to the next fast fft length after
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between adcfe3d and 8462489.

📒 Files selected for processing (1)
  • dascore/proc/basic.py (2 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
dascore/proc/basic.py (1)
dascore/core/coords.py (2)
  • values (942-946)
  • values (1201-1216)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (15)
  • GitHub Check: test_code (windows-latest, 3.13)
  • GitHub Check: test_code (windows-latest, 3.12)
  • GitHub Check: test_code (macos-latest, 3.11)
  • GitHub Check: test_code (ubuntu-latest, 3.13)
  • GitHub Check: test_code (windows-latest, 3.10)
  • GitHub Check: test_code (macos-latest, 3.13)
  • GitHub Check: test_code (windows-latest, 3.11)
  • GitHub Check: test_code (macos-latest, 3.10)
  • GitHub Check: test_code_min_deps (macos-latest, 3.12)
  • GitHub Check: test_build_docs
  • GitHub Check: test_code_min_deps (ubuntu-latest, 3.13)
  • GitHub Check: test_code_min_deps (macos-latest, 3.13)
  • GitHub Check: test_code_min_deps (windows-latest, 3.13)
  • GitHub Check: test_code_min_deps (ubuntu-latest, 3.12)
  • GitHub Check: test_code_min_deps (windows-latest, 3.12)
🔇 Additional comments (2)
dascore/proc/basic.py (2)

561-564: Docstring typo fixes look good in fillna examples.

Both “occurrences” lines read correctly now.


713-713: Correct axis used for data roll.

Using axis derived from the requested dim fixes prior axis=0 assumption.

@github-actions
Copy link

github-actions bot commented Sep 9, 2025

✅ Documentation built:
👉 Download
Note: You must be logged in to github and a DASDAE member to access the link.

@d-chambers d-chambers merged commit 7139676 into master Sep 9, 2025
22 checks passed
@d-chambers d-chambers deleted the typo_fixes branch September 9, 2025 11:02
@coderabbitai coderabbitai bot mentioned this pull request Dec 24, 2025
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation ready_for_review PR is ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants