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

merge: add updates from staging #83

Closed megasanjay closed 1 month ago

megasanjay commented 1 month ago

Summary by Sourcery

Add version handling and progress tracking for Zenodo publishing in the dashboard. Enhance the Zenodo publishing workflow with improved UI feedback and database updates. Introduce a new API endpoint to check Zenodo publishing status and refactor bot logic for better commit handling.

New Features:

Enhancements:

Chores:

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 implements significant updates to the Zenodo release process, enhancing the user interface, improving error handling, and adding new features to the dashboard. The changes span across multiple files, including UI components, server-side API endpoints, and the bot's functionality.

Sequence diagram for Zenodo publish progress check

sequenceDiagram
  participant User
  participant System
  participant ZenodoAPI

  User->>System: Start Zenodo publish process
  activate System
  System->>ZenodoAPI: Check publish status
  activate ZenodoAPI
  ZenodoAPI-->>System: Return status
  deactivate ZenodoAPI
  System-->>User: Show publish progress modal
  deactivate System
  User->>System: View status on dashboard
  System-->>User: Display status (inProgress, error, published)

User journey diagram for Zenodo release process

journey
  title Zenodo Release Process
  section Start Release
    User: Clicks "My draft is ready for release" -> 5: User prepares draft for release
  section Publish Release
    User: Clicks "Start the Zenodo publish process" -> 5: User initiates publish process
    System: Shows "Zenodo publish in progress" modal -> 4: System provides feedback
    System: Updates status to "published" or "error" -> 4: System provides feedback
  section View Release
    User: Navigates to dashboard -> 4: User checks release status
    User: Clicks DOI link if published -> 5: User views Zenodo record

Updated class diagram for Zenodo metadata

classDiagram
  class ZenodoMetadata {
    +string accessRight
    +string version
  }
  class ZenodoDeposition {
    +string lastPublishedZenodoDoi
    +string zenodoId
    +string zenodoStatus
  }
  ZenodoDeposition --> ZenodoMetadata : contains
  note for ZenodoMetadata "Added version attribute to track release version"

File-Level Changes

Change Details Files
Enhanced Zenodo release process with improved UI and workflow
  • Added version input field to Zenodo metadata form
  • Implemented Zenodo publish progress modal
  • Added status checks and updates for Zenodo publishing process
  • Updated dashboard to display Zenodo publication status and DOI
ui/pages/dashboard/[owner]/[repo]/release/zenodo.vue
ui/pages/dashboard/[owner]/[repo]/index.vue
ui/server/api/[owner]/[repo]/release/zenodo/index.post.ts
ui/server/api/[owner]/[repo]/release/zenodo/index.get.ts
ui/server/api/[owner]/[repo]/release/zenodo/status.get.ts
Improved error handling and validation in the bot's functionality
  • Added checks for existing Zenodo metadata in the database
  • Implemented better error handling for license and metadata file operations
  • Updated CWL validation process with improved logging
bot/metadata/index.js
bot/archival/index.js
bot/license/index.js
bot/cwl/index.js
Updated database schema and migrations
  • Added new columns to Analytics table for tracking releases
  • Updated ZenodoDeposition model with new fields
bot/prisma/migrations/20241011223412_analytics/migration.sql
ui/prisma/migrations/20241011223412_analytics/migration.sql
Refactored and improved issue rendering and pull request handling
  • Updated issue template rendering to include PR links for license and metadata files
  • Improved handling of pull request closures for license and metadata files
bot/utils/renderer/index.js
bot/index.js
ui/server/api/codeMetadata/[identifier]/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).
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!

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!