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

Expand info on matching dataset cards Fixes #377 #421

Conversation

ShubhamShekhawat
Copy link

@ShubhamShekhawat ShubhamShekhawat commented Dec 27, 2024

  • Added isDataLad and isAggregate indicators to ResultCard component.
  • Passed required props from ResultContainer to ResultCard.
  • Displayed labels for whether the dataset is a DataLad dataset or aggregate.
  • Verified functionality against test cases.
    Fixes Expand info on matching dataset cards #377
    @alyssadai Mam please check and if something is wrong let me know.

Summary by Sourcery

New Features:

  • Added indicators for whether a dataset is a DataLad dataset or an aggregate dataset.

Copy link

sourcery-ai bot commented Dec 27, 2024

Reviewer's Guide by Sourcery

This pull request enhances the ResultCard component to display whether a dataset is a DataLad dataset or an aggregate dataset. This addresses issue #377.

Class diagram showing updated ResultCard component props

classDiagram
    class ResultCard {
        +String nodeName
        +String datasetName
        +String datasetUUID
        +String datasetDescription
        +Number datasetTotalSubjects
        +Number numMatchingSubjects
        +String[] imageModals
        +Object pipelines
        +Boolean checked
        +Function onCheckboxChange
        +Boolean isDataLad
        +Boolean isAggregate
    }
    note for ResultCard "Added isDataLad and isAggregate props"

    class ResultContainer {
        -String[] download
        -Boolean selectAll
        +updateDownload()
        +render()
    }
    ResultContainer --> ResultCard : passes props
Loading

File-Level Changes

Change Details Files
Added isDataLad and isAggregate indicators to display DataLad and aggregate dataset information.
  • Passed isDataLad and isAggregate props from ResultContainer to ResultCard.
  • Added conditional rendering of "DataLad dataset" and "Aggregate dataset" labels in ResultCard based on the respective prop values.
  • Included tooltips for available pipelines in ResultCard.
  • Verified the functionality against test cases to ensure correct behavior and data handling.
src/components/ResultCard.tsx
src/components/ResultContainer.tsx
Updated Result Container to pass DataLad and aggregate information
  • Passed item.is_data_lad to the isDataLad prop of ResultCard.
  • Passed item.is_aggregate to the isAggregate prop of ResultCard.
src/components/ResultContainer.tsx

Assessment against linked issues

Issue Objective Addressed Explanation
#377 Add indicator showing if dataset is a DataLad dataset
#377 Add indicator showing if dataset is an aggregate dataset

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@github-actions github-actions bot added the _community [BOT ONLY] PR label for community contributions. Used for tracking label Dec 27, 2024
Copy link

netlify bot commented Dec 27, 2024

Deploy Preview for neurobagel-query failed.

Name Link
🔨 Latest commit 39b8907
🔍 Latest deploy log https://app.netlify.com/sites/neurobagel-query/deploys/676e4de7415fe6000823d2cc

@surchs
Copy link
Contributor

surchs commented Jan 15, 2025

Hey @ShubhamShekhawat, thanks for the PR and your willingness to contribute to Neurobagel. I think there is a bit of a misunderstanding between the (admittedly very sparse) issue and your PR. So I suggest we first have a bit of a chat on the issue about your plan so we can help you get more context. See also https://neurobagel.org/contributing/CONTRIBUTING/ first!

In general, this is a tricky issue and there might be easier ones for you to get started on. Let us know if you'd like some pointers to those as well.

For now, feel free to keep this PR open if you still plan on addressing the issue after more discussion or to close it if you you'd rather work on something else.

@surchs
Copy link
Contributor

surchs commented Jan 24, 2025

Hey @ShubhamShekhawat, I'm going to close this PR for now. If you are interested in picking it back up, please ping us on the issue so we can discuss your implementation with you.

@surchs surchs closed this Jan 24, 2025
@alyssadai
Copy link
Contributor

alyssadai commented Jan 24, 2025

Hi @ShubhamShekhawat, to expand on @surchs' points above:

The focus of the linked issue, and the key thing that was missing from the current PR, is actual logic for determining whether the dataset is aggregated or not, or a DataLad dataset or not, based on the response the query tool receives from its corresponding API.

Since this may not have been immediately obvious in the original issue, I've updated the issue description with more details. Like Seb said, feel free to have a look and let us know if you'd like to have another stab at it.

Side note: we encourage you to check that our automated tests and checks are passing for your PR! In this case, the failing checks could highlight areas where additional tests may help to verify the behaviour of any new code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
_community [BOT ONLY] PR label for community contributions. Used for tracking
Projects
Status: Review - Done
Development

Successfully merging this pull request may close these issues.

Expand info on matching dataset cards
3 participants