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

[ENH] Enabled functionality to remove unmapped assessment tools and columns #833

Merged
merged 9 commits into from
Dec 13, 2024

Conversation

rmanaem
Copy link
Contributor

@rmanaem rmanaem commented Dec 12, 2024

Checklist

This section is for the PR reviewer

  • PR has an interpretable title with a prefix ([ENH], [FIX], [REF], [TST], [CI], [MNT], [INF], [MODEL], [DOC]) (see our Contributing Guidelines for more info)
  • PR links to GitHub issue with mention Closes #XXXX
  • Tests pass
  • Checks pass

For new features:

  • Tests have been added

For bug fixes:

  • There is at least one test that would fail under the original bug conditions.

Summary by Sourcery

Enable the removal of unmapped assessment tools and columns in the UI, enhance search functionality with a custom filter for v-select components, and refactor the Vuex store for better state management.

New Features:

  • Add functionality to remove unmapped assessment tools and columns from the UI.

Enhancements:

  • Implement a custom filter function for v-select components to improve search functionality.

Chores:

  • Refactor the Vuex store to use a function for default state initialization.

Copy link

sourcery-ai bot commented Dec 12, 2024

Reviewer's Guide by Sourcery

This PR implements functionality to remove unmapped assessment tools and columns, enhances the search filtering in dropdowns, and adds a restart annotation feature. The changes primarily focus on UI improvements and state management modifications.

Sequence diagram for removing an assessment tool

sequenceDiagram
    participant User
    participant UI
    participant Store

    User ->> UI: Click 'Remove' button for tool
    UI ->> Store: deselectTool(tool.identifier)
    Store -->> UI: Update tool selection state
    UI -->> User: Tool removed from selection
Loading

Sequence diagram for restarting annotation

sequenceDiagram
    participant User
    participant UI
    participant Store

    User ->> UI: Click 'Annotate Another Dataset' button
    UI ->> Store: resetState()
    Store -->> UI: State reset
    UI ->> Store: navigateToPage('home')
    Store -->> UI: Navigate to home page
    UI -->> User: Redirect to home page
Loading

Class diagram for updated Vuex store mutations

classDiagram
    class Store {
        +createAssessmentTool()
        +alterColumnToToolMapping()
        +alterColumnCategoryMapping()
        +deselectTool()
        +resetState()
    }

    class Tool {
        +identifier
        +selected
    }

    Store --> Tool : manages

    note for Store "New mutations added: deselectTool, resetState"
Loading

File-Level Changes

Change Details Files
Added functionality to remove assessment tools and mapped columns
  • Added a Remove button to the assessment tools table
  • Added a Remove button to the mapped columns table
  • Implemented tool removal logic in the store
  • Added column unmapping functionality
components/category-toolgroup.vue
store/index.js
Enhanced dropdown search functionality with custom filtering
  • Implemented character-based filtering logic for better search results
  • Applied custom filtering to assessment tool selection
  • Applied custom filtering to categorical value selection
components/category-toolgroup.vue
components/annot-categorical.vue
Added restart annotation functionality
  • Added a new button to restart annotations
  • Implemented state reset functionality
  • Created a default state getter function
pages/download.vue
store/index.js
Removed integer type from transform options
  • Removed int type from transform options
  • Updated related test files
store/index.js
cypress/unit/store-getter-getTransformOptions.cy.js
cypress/unit/store-getter-getContinousJsonOutput.cy.js

Assessment against linked issues

Issue Objective Addressed Explanation
#822 Provide functionality to clear/remove unmapped assessment tool columns

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

Copy link

netlify bot commented Dec 12, 2024

Deploy Preview for neurobagel-annotator ready!

Name Link
🔨 Latest commit ace2fa1
🔍 Latest deploy log https://app.netlify.com/sites/neurobagel-annotator/deploys/675b9911064f780008a123d3
😎 Deploy Preview https://deploy-preview-833--neurobagel-annotator.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @rmanaem - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider extracting the duplicated filterOptions function from category-toolgroup.vue and annot-categorical.vue into a shared utility function to avoid code duplication
Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

components/category-toolgroup.vue Outdated Show resolved Hide resolved
Copy link
Contributor

@surchs surchs left a comment

Choose a reason for hiding this comment

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

very cool stuff 🎉

🧑‍🍳

components/category-toolgroup.vue Show resolved Hide resolved
@rmanaem rmanaem merged commit 166e34c into main Dec 13, 2024
9 checks passed
@rmanaem rmanaem deleted the enh-822 branch December 13, 2024 02:20
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.

Prompt user to clear all unmapped assessment tool columns
2 participants