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

WIP: testing datagraph with test data #235

Open
wants to merge 3 commits into
base: development
Choose a base branch
from

Conversation

JoshuaSiraj
Copy link
Collaborator

@JoshuaSiraj JoshuaSiraj commented Feb 21, 2025

Summary by CodeRabbit

  • New Features

    • Automatic data refresh is now enabled by default, ensuring end users benefit from the most up-to-date information without extra configuration.
  • Refactor

    • Streamlined the data selection process to retain only essential components, enhancing overall data accuracy and performance.
  • Documentation

    • Revised configuration details to clearly reflect these improvements for easier interpretation.

Copy link
Contributor

coderabbitai bot commented Feb 21, 2025

📝 Walkthrough

Walkthrough

This pull request updates the DataGraph class in the src/imgtools/modules/datagraph.py file. The default value for the update parameter in the __init__ method has been changed from False to True, and its corresponding documentation has been updated. In the _get_df method, the component filtering logic has been revised by replacing the use of a remove_index list with a keep_index list. Additionally, minor formatting adjustments were made in methods such as graph_query and _form_agg.

Changes

File Change Summary
src/imgtools/modules/datagraph.py • Updated update parameter default in __init__ from False to True and modified its documentation.
• Replaced remove_index with keep_index in _get_df for filtering components.
• Applied minor formatting fixes in graph_query and _form_agg methods.

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f7ad45c and f32a7e1.

📒 Files selected for processing (1)
  • src/imgtools/modules/datagraph.py (7 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/imgtools/modules/datagraph.py
⏰ Context from checks skipped due to timeout of 90000ms (13)
  • GitHub Check: Unit-Tests (windows-latest, py313)
  • GitHub Check: Unit-Tests (windows-latest, py312)
  • GitHub Check: Unit-Tests (windows-latest, py311)
  • GitHub Check: Unit-Tests (windows-latest, py310)
  • GitHub Check: Unit-Tests (macos-13, py313)
  • GitHub Check: Unit-Tests (macos-13, py312)
  • GitHub Check: Unit-Tests (macos-13, py311)
  • GitHub Check: Unit-Tests (macos-13, py310)
  • GitHub Check: Unit-Tests (macos-latest, py310)
  • GitHub Check: Unit-Tests (ubuntu-latest, py313)
  • GitHub Check: Unit-Tests (ubuntu-latest, py312)
  • GitHub Check: Unit-Tests (ubuntu-latest, py311)
  • GitHub Check: Unit-Tests (ubuntu-latest, py310)

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@JoshuaSiraj
Copy link
Collaborator Author

@jjjermiah

For a 'CT,SEG' query, it keeps a lot of empty unused columns:

Index(['patient_ID', 'study', 'study_description_x', 'series_CT',
       'series_description_x', 'subseries_CT', 'modality_x', 'instances_x',
       'instance_uid_x', 'reference_ct_x', 'reference_rs_x', 'reference_pl_x',
       'reference_frame_x', 'folder_CT', 'orientation_x', 'orientation_type_x',
       'MR_repetition_time_x', 'MR_echo_time_x', 'MR_scan_sequence_x',
       'MR_magnetic_field_strength_x', 'MR_imaged_nucleus_x', 'file_path_x',
       'series_SEG', 'subseries_SEG', 'modality_y', 'instances_y',
       'instance_uid_y', 'reference_ct_y', 'reference_rs_y', 'reference_pl_y',
       'reference_frame_y', 'folder_SEG', 'orientation_y',
       'orientation_type_y', 'MR_repetition_time_y', 'MR_echo_time_y',
       'MR_scan_sequence_y', 'MR_magnetic_field_strength_y',
       'MR_imaged_nucleus_y', 'file_path_y', 'edge_type'],
      dtype='object') 

Can I remove the ones not needed?

Copy link

codecov bot commented Feb 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.12%. Comparing base (d9a83d1) to head (f32a7e1).
Report is 1 commits behind head on development.

Additional details and impacted files
@@             Coverage Diff              @@
##           development     #235   +/-   ##
============================================
  Coverage        65.12%   65.12%           
============================================
  Files               55       55           
  Lines             3710     3710           
============================================
  Hits              2416     2416           
  Misses            1294     1294           

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

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.

1 participant