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

refactor: ♻️ individual schema for codemeta 3.0 & 2.0 + cwl patch #125

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

slugb0t
Copy link
Member

@slugb0t slugb0t commented Dec 17, 2024

Summary by Sourcery

Refactor the bot to support individual schemas for CodeMeta 3.0 and 2.0, enhance CWL file handling, and improve UI components. Update build scripts and CI workflows, and add a new dashboard page to the UI.

Enhancements:

  • Refactor the bot to handle individual schema for CodeMeta 3.0 and 2.0, improving modularity and maintainability.
  • Enhance the CWL file handling and validation process, including better logging and error handling.
  • Improve the UI components for better readability and maintainability, including adjustments to the dashboard and profile pages.

Build:

  • Update package.json to reflect new version 3.2.1 and adjust dependencies and scripts.

CI:

  • Modify CI workflows to suppress output from prisma:migrate:deploy command.

Documentation:

  • Add a new dashboard page to the UI, providing a centralized view for user accounts and organizations.

megasanjay and others added 7 commits December 13, 2024 16:36
* 🐛 fix: update sorting on updated time

* ⚰️ chore: remove yarn.lock

* 💄 style: uipdate profile ui
* ✨ feat: add a dashboard page

* 🐛 fix: remove old code

* 🐛 fix: add response checks

* refactor: ♻️ dashboard link in nav directs to /dashboard

* refactor: ♻️ update variables for GET /dashboard api

---------

Co-authored-by: slugb0t <wheresdorian@gmail.com>
Copy link

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!

Copy link

sourcery-ai bot commented Dec 17, 2024

Reviewer's Guide by Sourcery

This pull request implements several significant changes across the codebase, focusing on code formatting, schema updates, and UI improvements. The changes include standardizing code style using Prettier, adding individual schema files for CodeMeta versions, updating the dashboard UI, and improving error handling.

Class diagram for updated bot/index.js

classDiagram
    class Bot {
        +initializeDatabase()
        +verifyInstallationAnalytics()
        +checkForLicense()
        +checkForCitation()
        +checkForCodeMeta()
        +getCWLFiles()
        +createIssue()
        +renderIssues()
        +applyLastModifiedTemplate()
        +updateMetadataIdentifier()
        +publishZenodoDeposition()
        +updateGitHubRelease()
    }
    class Database {
        +findUnique()
        +update()
        +create()
        +delete()
    }
    class Context {
        +octokit
    }
    Bot --> Database
    Bot --> Context
    Context --> Octokit
    class Octokit {
        +repos
        +issues
        +git
    }
Loading

Class diagram for updated bot/cwl/index.js

classDiagram
    class CWL {
        +getCWLFiles()
        +validateCWLFile()
        +applyCWLTemplate()
    }
    class Logwatch {
        +info()
        +error()
        +warn()
        +start()
        +success()
    }
    class Database {
        +findUnique()
        +update()
        +upsert()
    }
    CWL --> Logwatch
    CWL --> Database
Loading

Class diagram for updated ui/pages/dashboard/[owner]/[repo]/index.vue

classDiagram
    class Dashboard {
        +rerunCodefairChecks()
        +handleSettingsSelect()
    }
    class CardDashboard {
        +title
        +subheader
        +icon
        +headerExtra
        +content
        +action
    }
    Dashboard --> CardDashboard
Loading

File-Level Changes

Change Details Files
Code formatting standardization using Prettier
  • Updated Prettier configuration to use consistent formatting rules
  • Applied consistent quote style (single quotes) across files
  • Standardized indentation and spacing in code files
bot/index.js
bot/cwl/index.js
bot/prettier.config.js
Dashboard UI improvements and new features
  • Added new dashboard index page for better organization overview
  • Improved empty state handling for repositories
  • Enhanced breadcrumb navigation
  • Updated profile page layout and token management UI
ui/pages/dashboard/index.vue
ui/pages/dashboard/[owner]/index.vue
ui/layouts/default.vue
ui/pages/profile.vue
API and routing enhancements
  • Added new dashboard API endpoint for organization data
  • Updated GitHub callback redirect logic
  • Improved error handling in API routes
ui/server/api/dashboard/index.get.ts
ui/server/routes/login/github/callback.get.ts
ui/server/api/dashboard/[owner]/index.get.ts
Schema and validation updates
  • Added separate schema files for CodeMeta versions 2.0 and 3.0
  • Updated CWL validation logic
  • Improved error handling in validation processes
validator/codemeta-schema.json
validator/codemeta-schema2.0.json
bot/cwl/index.js

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

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!

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.

2 participants