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: ✨ ♻️ 🐛 Codefair v3.1.0 #97

Closed slugb0t closed 2 weeks ago

slugb0t commented 2 weeks ago

Summary by Sourcery

Introduce a new workflow to streamline GitHub release integration with Zenodo archiving, ensuring metadata is updated before releases. Add support for custom license titles and improve error handling and logging. Fix issues with metadata PR links and codemeta.json date updates. Enhance the UI with additional resources and improved layouts.

New Features:

Bug Fixes:

Enhancements:

Documentation:

Summary by Sourcery

Introduce a new workflow to streamline GitHub release integration with Zenodo archiving, ensuring metadata is updated before releases. Add support for custom license titles and improve error handling and logging. Fix issues with metadata PR links and codemeta.json date updates. Enhance the UI with additional resources and improved layouts.

New Features:

Bug Fixes:

Enhancements:

Documentation:

fairdataihub-bot[bot] commented 2 weeks 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 2 weeks ago

Reviewer's Guide by Sourcery

This pull request implements a new workflow for GitHub release integration with Zenodo archiving, adds support for custom license titles, and includes various improvements to error handling, logging, and UI elements. The changes focus on enhancing the user experience while ensuring proper metadata handling and archival compliance.

Sequence diagram for GitHub release integration with Zenodo archiving

sequenceDiagram
    actor User
    participant GitHub
    participant Zenodo
    participant Database
    participant Bot

    User->>GitHub: Create a release
    GitHub->>Bot: Trigger release event
    Bot->>Database: Fetch Zenodo token
    Database-->>Bot: Return Zenodo token
    Bot->>Zenodo: Create or fetch deposition
    Zenodo-->>Bot: Return deposition info
    Bot->>GitHub: Update release metadata
    Bot->>Zenodo: Upload assets
    Bot->>Zenodo: Publish deposition
    Zenodo-->>Bot: Confirm publication
    Bot->>GitHub: Update release status
    Bot->>User: Notify release completion

Updated class diagram for archival and license handling

classDiagram
    class Archival {
        +updateGitHubRelease(context, repositoryName, owner, releaseId)
        +publishZenodoDeposition(zenodoToken, depositionId)
        +getZenodoToken(user)
        +parseZenodoInfo(issueBody)
    }
    class License {
        +validateLicense(licenseRequest, existingLicense)
        +applyLicenseTemplate(context, owner, repository, subjects)
    }
    class Metadata {
        +getCodemetaContent(context, owner, repository)
        +getCitationContent(context, owner, repository)
        +validateMetadata(content, fileType)
        +updateMetadataIdentifier(context, owner, repository, identifier, version)
    }
    Archival --> Zenodo
    Archival --> GitHub
    License --> Database
    Metadata --> Database
    Metadata --> GitHub
    Metadata --> Zenodo
    Zenodo : API
    GitHub : API
    Database : Prisma

File-Level Changes

Change Details Files
Implemented a new workflow for Zenodo archival integration
  • Added new functions for handling Zenodo deposition publishing and token management
  • Improved error handling for Zenodo API interactions
  • Restructured the Zenodo metadata update process
  • Added validation checks for Zenodo publishing requirements
bot/archival/index.js
Added support for custom license titles and improved license handling
  • Added custom license title field and validation
  • Implemented custom license detection and validation logic
  • Updated UI to handle custom license scenarios
  • Added warnings for custom license limitations with Zenodo
ui/pages/dashboard/[owner]/[repo]/edit/license.vue
bot/license/index.js
ui/server/api/[owner]/[repo]/license/index.post.ts
ui/server/api/[owner]/[repo]/license/custom_title.put.ts
Enhanced error handling and logging system
  • Implemented consistent error handling patterns across the application
  • Added more detailed error messages and logging
  • Improved error propagation and context preservation
  • Added validation checks for API responses
bot/utils/tools/index.js
bot/metadata/index.js
ui/error.vue
Improved UI and navigation structure
  • Restructured dashboard routes for better organization
  • Added additional resource links and improved layouts
  • Updated button placements and styling
  • Enhanced navigation handling for authentication flows
ui/pages/dashboard/[owner]/[repo]/index.vue
ui/pages/dashboard/[owner]/[repo]/release/zenodo.vue
ui/pages/codefair.vue
ui/middleware/protected.ts
Fixed metadata handling issues
  • Fixed PR link replacement in metadata section
  • Stopped updating first release date in codemeta.json
  • Improved metadata validation and update process
  • Added checks for custom license metadata handling
bot/metadata/index.js
ui/server/api/[owner]/[repo]/code-metadata/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 2 weeks 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 2 weeks 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!