Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename grav_index to curve_index #68

Merged
merged 3 commits into from
Oct 7, 2023
Merged

Conversation

eberrigan
Copy link
Collaborator

@eberrigan eberrigan commented Oct 7, 2023

  • Gravitropism index is renamed to curvature index since this is more intuitive.
  • Minor fixes to documentation.
  • Version number updated to 0.0.5.

Summary by CodeRabbit

Refactor:

  • Renamed the function get_grav_index to get_curve_index across all modules, reflecting its purpose more accurately in calculating the curvature index of a root.
  • Updated related trait names from "grav_index" to "curve_index" in trait_pipelines.py and test files.

Test:

  • Adjusted assertions in test_trait_pipelines.py to check for negative values in the updated trait names.

Chore:

  • Bumped package version from "0.0.4" to "0.0.5".

These changes do not introduce new features or fix bugs but improve code readability and maintainability.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 7, 2023

Walkthrough

This update primarily focuses on renaming the concept of "gravitropism index" to "curvature index" across multiple files. The changes include function name alterations, variable name updates, and adjustments in import statements. The package version has also been updated.

Changes

File(s) Summary
sleap_roots/__init__.py Package version updated from "0.0.4" to "0.0.5".
sleap_roots/lengths.py, sleap_roots/trait_pipelines.py, tests/test_lengths.py, tests/test_trait_pipelines.py Renamed get_grav_index to get_curve_index. Updated related variable names and import statements.
sleap_roots/scanline.py Comment updated for clarity.

🐇💻

In the land of code, where logic is king,

A rabbit hopped by, making changes with a swing.

From grav to curve, the names did flip,

Ensuring the code, would not trip.

With each keystroke, the rabbit did cheer,

For the new version, was finally here! 🎉


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • Mention @coderabbitai in any review comment for bot assistance.
  • Note: Review comments are made on code diffs or files, not on the PR overview.

Pause Incremental Reviews

  • Insert @coderabbitai: ignore in the PR description to halt the bot's ongoing reviews. Remove the line to resume.
  • Additionally, enter @coderabbitai pause to halt the bot's ongoing reviews as any issue or review comment. To
    resume reviews, enter @coderabbitai resume as any issue or review comment.

@eberrigan eberrigan requested a review from talmo October 7, 2023 23:17
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.

Review Status

Actionable comments generated: 0

Commits Files that changed from the base of the PR and between fd41164 and 68a7044.
Files selected for processing (6)
  • sleap_roots/init.py (2 hunks)
  • sleap_roots/lengths.py (4 hunks)
  • sleap_roots/scanline.py (1 hunks)
  • sleap_roots/trait_pipelines.py (4 hunks)
  • tests/test_lengths.py (6 hunks)
  • tests/test_trait_pipelines.py (1 hunks)
Files skipped from review due to trivial changes (3)
  • sleap_roots/scanline.py
  • tests/test_lengths.py
  • tests/test_trait_pipelines.py
Additional comments (Suppressed): 9
sleap_roots/__init__.py (2)
  • 6-12: The import statement for sleap_roots.lengths has been added. Ensure that this module exists and is properly implemented in the codebase.

  • 20-20: The package version has been updated from "0.0.4" to "0.0.5". Make sure all dependencies and requirements are compatible with this new version.

sleap_roots/lengths.py (3)
  • 114-123: The function get_grav_index has been renamed to get_curve_index. The description of the function has also been updated to reflect this change. Ensure that all calls to this function throughout the codebase have been updated to match the new function name.

  • 148-151: The variable grav_index has been renamed to curve_index. This change is consistent with the renaming of the function and does not affect the logic of the code.

  • 158-161: The return statement has been updated to return curve_index instead of grav_index. This change is consistent with the renaming of the function and the variable, and does not affect the logic of the code.

sleap_roots/trait_pipelines.py (4)
  • 36-39: The function get_grav_index has been renamed to get_curve_index. Ensure that the new function get_curve_index maintains the same functionality as the old get_grav_index function, or that any changes are intentional and correctly implemented.

  • 814-821: The trait name "grav_index" has been changed to "curve_index". Make sure all references to this trait in the codebase have been updated accordingly. Also, ensure that the change does not affect any external systems or reports that might be using the old trait name.

  • 1192-1199: The trait name "main_grav_indices" has been changed to "main_curve_indices". As with the previous comment, verify that all references to this trait in the codebase have been updated and that the change does not impact any external systems or reports.

  • 1294-1301: The trait name "grav_index" has been changed to "curve_index" here as well. As before, ensure all references to this trait in the codebase have been updated and that the change does not impact any external systems or reports.

@codecov
Copy link

codecov bot commented Oct 7, 2023

Codecov Report

Merging #68 (68a7044) into main (fd41164) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #68      +/-   ##
==========================================
+ Coverage   78.45%   78.48%   +0.02%     
==========================================
  Files          13       13              
  Lines         803      804       +1     
==========================================
+ Hits          630      631       +1     
  Misses        173      173              
Files Coverage Δ
sleap_roots/__init__.py 100.00% <100.00%> (ø)
sleap_roots/lengths.py 91.11% <100.00%> (ø)
sleap_roots/scanline.py 88.23% <ø> (ø)
sleap_roots/trait_pipelines.py 92.90% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@talmo talmo merged commit 52938e1 into main Oct 7, 2023
5 checks passed
@talmo talmo deleted the elizabeth/rename_gravitropism_index branch October 7, 2023 23:56
eberrigan added a commit that referenced this pull request Mar 14, 2024
* Fix documentation

* Import `lengths` in init

* Change gravitropism to curvature
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants