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

Update pose reader #253

Merged
merged 5 commits into from
Sep 14, 2023
Merged

Update pose reader #253

merged 5 commits into from
Sep 14, 2023

Conversation

jkbhagatio
Copy link
Member

@jkbhagatio jkbhagatio commented Sep 12, 2023

Updated for new Bonsai.Sleap operators which return 'anchor_parts' in addition to 'part_names' (this PR also accounts for potential redundancies between these).

I.e. fixes SainsburyWellcomeCentre/aeon_experiments#322

Summary by CodeRabbit

  • New Feature: Enhanced read method in the Pose class to handle string or Path object for the ceph_proc_dir parameter, improving flexibility.
  • Bug Fix: Updated get_bodyparts method to return a list of body parts from the model's config file, fixing previous issue where it returned None.
  • Refactor: Improved handling of potential redundancies between anchor_parts and part_names, enhancing code efficiency.
  • New Feature: Added get_config_file function to allow custom configuration file names, increasing customization options.
  • New Feature: Updated code to handle new Bonsai.Sleap operators that return 'anchor_parts' in addition to 'part_names', expanding functionality.

@jkbhagatio jkbhagatio added this to the Social0.1 milestone Sep 12, 2023
@jkbhagatio jkbhagatio self-assigned this Sep 12, 2023
@github-actions
Copy link

github-actions bot commented Sep 12, 2023

Image description CodeRabbit

Walkthrough

The code changes primarily focus on enhancing the functionality and efficiency of the Pose class in the aeon/schema/social.py file. The modifications include improvements to the read and get_bodyparts methods, handling potential redundancies, and accommodating new Bonsai.Sleap operators. The updates also allow for custom configuration file names and handle different config file formats. These changes aim to improve the overall performance, maintainability, and modularity of the code.

Changes

File Summary
aeon/schema/social.py The Pose class has been updated with improved read and get_bodyparts methods. The read method now handles repeat parts, reorganizes data columns, and accepts a string or Path object for the ceph_proc_dir parameter. Redundancies between anchor_parts and part_names are now handled efficiently. The get_bodyparts method returns a list of bodyparts from the model's config file instead of None. New Bonsai.Sleap operators that return 'anchor_parts' in addition to 'part_names' are now accommodated. Custom configuration file names are allowed through the get_config_file function. Different config file formats are now handled by the get_bodyparts() method.

Uplevel your code reviews with CodeRabbit Pro

CodeRabbit Pro

If you like this project, please support us by purchasing the Pro version. The Pro version has advanced context, superior noise reduction and several proprietary improvements compared to the open source version. Moreover, CodeRabbit Pro is free for open source projects.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Image description CodeRabbit

Commits Files that changed from the base of the PR and between eb306bd and 7458fcf commits.
Files selected (1)
  • aeon/schema/social.py (2)
Files ignored due to filter (1)
  • pyproject.toml
Review comments generated (4)
  • Review: 2
  • LGTM: 2

Tips

Chat with Image description CodeRabbit Bot (@coderabbitai)

  • Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
  • Invite the bot into a review comment chain by tagging @coderabbitai in a reply.

Code suggestions

  • The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
  • You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.

Pausing incremental reviews

  • Add @coderabbitai: ignore anywhere in the PR description to pause further reviews from the bot.

aeon/schema/social.py Outdated Show resolved Hide resolved
aeon/schema/social.py Outdated Show resolved Hide resolved
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Image description CodeRabbit

Commits Files that changed from the base of the PR and between 7458fcf and 23c8872 commits.
Files selected (1)
  • aeon/schema/social.py (2)
Review comments generated (4)
  • Review: 2
  • LGTM: 2

Tips

Chat with Image description CodeRabbit Bot (@coderabbitai)

  • Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
  • Invite the bot into a review comment chain by tagging @coderabbitai in a reply.

Code suggestions

  • The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
  • You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.

Pausing incremental reviews

  • Add @coderabbitai: ignore anywhere in the PR description to pause further reviews from the bot.

aeon/schema/social.py Outdated Show resolved Hide resolved
aeon/schema/social.py Outdated Show resolved Hide resolved
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Image description CodeRabbit

Commits Files that changed from the base of the PR and between 23c8872 and aaacd53 commits.
Files selected (1)
  • aeon/schema/social.py (2)
Review comments generated (4)
  • Review: 4
  • LGTM: 0

Tips

Chat with Image description CodeRabbit Bot (@coderabbitai)

  • Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
  • Invite the bot into a review comment chain by tagging @coderabbitai in a reply.

Code suggestions

  • The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
  • You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.

Pausing incremental reviews

  • Add @coderabbitai: ignore anywhere in the PR description to pause further reviews from the bot.

aeon/schema/social.py Show resolved Hide resolved
aeon/schema/social.py Show resolved Hide resolved
aeon/schema/social.py Show resolved Hide resolved
aeon/schema/social.py Show resolved Hide resolved
@jkbhagatio jkbhagatio merged commit 3b53953 into main Sep 14, 2023
5 of 7 checks passed
@jkbhagatio jkbhagatio deleted the update_pose_reader branch October 3, 2023 21:14
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.

Output shape of MessageWriter from FormatPose is unexpected
1 participant