fairdataihub / codefair-app

Your coding assistant to make research software reusable without breaking a sweat!
https://codefair.io
MIT License
7 stars 2 forks source link

feat: add support for zenodo progress #80

Closed megasanjay closed 1 month ago

megasanjay commented 1 month ago

Summary by Sourcery

Add support for monitoring Zenodo publish progress, including a modal for status updates and a new API endpoint to check deposition status. Enhance the dashboard with alerts and information about Zenodo publication status and last published DOI.

New Features:

Enhancements:

fairdataihub-bot[bot] commented 1 month ago

Thank you for submitting this pull request! We appreciate your contribution to the project. Before we can merge it, we need to review the changes you've made to ensure they align with our code standards and meet the requirements of the project. We'll get back to you as soon as we can with feedback. Thanks again!

sourcery-ai[bot] commented 1 month ago

Reviewer's Guide by Sourcery

This pull request adds support for Zenodo progress tracking and improves the user interface for Zenodo-related functionality. The changes include new UI components for displaying Zenodo publish status, a progress modal, and backend modifications to handle Zenodo workflow status updates.

Sequence diagram for Zenodo publish progress tracking

sequenceDiagram
    actor User
    participant UI as User Interface
    participant Server
    participant Zenodo

    User->>UI: Initiate Zenodo Publish
    UI->>Server: startZenodoPublishProcess()
    Server->>Zenodo: Start publish process
    Zenodo-->>Server: Acknowledge publish start
    Server-->>UI: Notify publish started
    UI->>User: Show success message
    UI->>Server: checkForZenodoPublishProgress()
    loop Every 3 seconds
        Server->>Zenodo: Check publish status
        Zenodo-->>Server: Return status
        alt Status is not inProgress
            Server->>UI: Update status
            UI->>User: Hide progress modal
            UI->>User: Navigate to dashboard
        end
    end

User journey diagram for Zenodo publish process

journey
    title Zenodo Publish Process
    section Initiate Publish
      User: 5: Initiates Zenodo publish
    section Publish Progress
      System: 4: Displays progress modal
      System: 3: Checks publish status every 3 seconds
    section Completion
      System: 5: Hides progress modal when complete
      User: 4: Navigates to dashboard
    section Error Handling
      System: 2: Displays error if publish fails

Updated class diagram for ZenodoDeposition

classDiagram
    class ZenodoDeposition {
        +String lastPublishedZenodoDoi
        +String zenodoId
        +String zenodoStatus
    }
    class ZenodoStatusHandler {
        +void checkForZenodoPublishProgress()
        +void startZenodoPublishProcess(Boolean shouldPublish)
    }
    ZenodoDeposition <|-- ZenodoStatusHandler
    note for ZenodoDeposition "Handles Zenodo deposition data"
    note for ZenodoStatusHandler "Manages Zenodo publish process and status updates"

File-Level Changes

Change Details Files
Added Zenodo publish progress tracking
  • Implemented a function to check Zenodo publish progress periodically
  • Added a modal to display Zenodo publish progress
  • Updated the Zenodo deposition status in the database
  • Created a new API endpoint to fetch Zenodo publish status
ui/pages/dashboard/[owner]/[repo]/release/zenodo.vue
ui/server/api/[owner]/[repo]/release/zenodo/index.post.ts
ui/server/api/[owner]/[repo]/release/zenodo/status.get.ts
Enhanced UI for Zenodo-related information
  • Added tags to display Zenodo DOI and publish status on the dashboard
  • Updated the license status display to use a warning tag for invalid licenses
  • Included last published Zenodo DOI in the API response
ui/pages/dashboard/[owner]/[repo]/index.vue
ui/server/api/[owner]/[repo]/dashboard.get.ts
ui/server/api/[owner]/[repo]/release/zenodo/index.get.ts
Improved Zenodo form validation
  • Added validation for selected Zenodo deposition
  • Updated the Zenodo form validation logic
ui/pages/dashboard/[owner]/[repo]/release/zenodo.vue
Updated data models and API responses
  • Added new fields to the Zenodo deposition model
  • Updated API responses to include new Zenodo-related information
ui/server/api/[owner]/[repo]/dashboard.get.ts
ui/server/api/[owner]/[repo]/release/zenodo/index.get.ts
ui/server/api/[owner]/[repo]/release/zenodo/index.post.ts

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](https://app.sourcery.ai) 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 - [Contact our support team](mailto:support@sourcery.ai) for questions or feedback. - Visit our [documentation](https://docs.sourcery.ai) for detailed guides and information. - Keep in touch with the Sourcery team by following us on [X/Twitter](https://x.com/SourceryAI), [LinkedIn](https://www.linkedin.com/company/sourcery-ai/) or [GitHub](https://github.com/sourcery-ai).
what-the-diff[bot] commented 1 month ago

PR Summary

fairdataihub-bot[bot] commented 1 month ago

Thanks for closing this pull request! If you have any further questions, please feel free to open a new issue. We are always happy to help!

fairdataihub-bot[bot] commented 1 month ago

Thanks for making updates to your pull request. Our team will take a look and provide feedback as soon as possible. Please wait for any GitHub Actions to complete before editing your pull request. If you have any additional questions or concerns, feel free to let us know. Thank you for your contributions!