-
Notifications
You must be signed in to change notification settings - Fork 698
setup for contributed models #2217
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
Conversation
✅ Deploy Preview for mesheryio-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @vishalvivekm, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
Summary of Changes
As gemini-code-assist, I've reviewed this pull request from @vishalvivekm. The primary intent of this PR is to lay the groundwork for supporting 'contributed' or 'custom' models within the site's catalog. This involves configuring the site's static generator (likely Jekyll, based on the file structure) to recognize a new collection for these models and updating existing pages to include them in the displayed lists. Additionally, a template file is introduced to guide the definition of new custom models.
Highlights
- New Collection Configuration: Configuration files (
_config.yml
,_config_dev.yml
) have been updated to define a new collection namedcustom-models
. This collection is configured to output pages with a permalink structure under/catalog/models/
. - Include Custom Models in Catalog Views: The Liquid templating logic in
_includes/partials/catalog-feature.html
andcollections/_pages/models.html
has been modified to concatenate the newsite.custom-models
collection with the existingsite.models
, ensuring that custom models appear alongside standard models in the catalog views. - Custom Model Definition Template: A new markdown file (
collections/_custom-models/_custom-model-definition-template.md
) has been added. This file serves as a template, outlining the required front matter fields and structure for defining individual custom models. - Contributors Collection Output Disabled: As a side effect (or possibly related cleanup), the output for the
contributors
collection has been explicitly disabled in both_config.yml
and_config_dev.yml
.
Changelog
Click here to see the changelog
- _config.yml
- Disabled output for the
contributors
collection (around line 47). - Added configuration for the new
custom-models
collection, enabling output and setting its permalink (around line 70).
- Disabled output for the
- _config_dev.yml
- Disabled output for the
contributors
collection (around line 46). - Added configuration for the new
custom-models
collection, enabling output and setting its permalink (around line 69).
- Disabled output for the
- _includes/partials/catalog-feature.html
- Updated the
models
variable assignment to includesite.custom-models
using theconcat
filter (around line 211).
- Updated the
- collections/_custom-models/_custom-model-definition-template.md
- Added a new file providing a markdown template for defining custom models, including front matter for metadata like name, icons, description, components, etc.
- collections/_pages/models.html
- Updated the
models
variable assignment to includesite.custom-models
using theconcat
filter (around line 8).
- Updated the
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command>
or @gemini-code-assist <command>
. Below is a summary of the supported commands.
Feature | Command | Description |
---|---|---|
Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/
folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
Signed-off-by: Vivek Vishal <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a new Jekyll collection custom-models
to allow for contributed models, which is a good step towards extending the catalog. The setup for this new collection in _config.yml
, _config_dev.yml
, and its integration into catalog-feature.html
and models.html
appear correct.
However, there are a few areas that need attention:
- Context for Changes: The pull request description is minimal ("This PR fixes #") and doesn't link to a specific issue or provide context for all changes, especially the modification to the
contributors
collection. Please update the PR description with more details. - Contributor Workflow: The "Signed commits" checkbox in the PR description is unchecked. Please ensure all commits are signed off according to the project's contribution guidelines.
- Template Usability: The new
_custom-model-definition-template.md
contains several hardcoded values and APISIX-specific examples that could be generalized for better reusability and to prevent errors.
Detailed comments are provided below.
Summary of Findings
- Context and Impact of
contributors
Collection Change: Thecontributors
collection output and its permalink have been removed in_config.yml
and_config_dev.yml
. Clarification is needed on whether this is an intended change and if its impact on existing site functionality (like contributor pages) has been assessed. (Severity: high) - Hardcoded Counts in Model Template:
componentsCount
andrelationshipsCount
are hardcoded in_custom-model-definition-template.md
. If these values are used for display, they will likely be incorrect for new models unless meticulously manually updated, leading to potential data inaccuracies. These should ideally be dynamically calculated or clearly marked for manual update if dynamic calculation isn't feasible. (Severity: high) - APISIX-Specific Placeholders in Generic Model Template: The
_custom-model-definition-template.md
uses APISIX-specific examples for many fields (icons, URLs, component names, feature lists). This can be confusing and error-prone for users creating models for different integrations. Placeholders should be more generic or very clearly marked as examples requiring replacement. (Severity: medium) - Empty or Ambiguous Fields in Model Template: Fields like
name
,subtitle
are empty, andregistrant
is hardcoded. AddingTODO
comments or more generic placeholders would improve the template's usability. (Severity: medium) - Missing Newline at EOF in Template: The new file
collections/_custom-models/_custom-model-definition-template.md
is missing a final newline character. While often tolerated, some tools or linters might flag this. (Severity: low - not commented inline due to review settings).
Merge Readiness
This PR makes good progress on setting up functionality for contributed models. However, before it's ready for merging, I recommend the following:
- Provide Context: Please update the PR description to explain all changes, especially the removal of the
contributors
collection output, and link any relevant issue(s). - Address Template Issues: The
_custom-model-definition-template.md
should be revised to remove or generalize hardcoded counts and APISIX-specific placeholders to make it more robust and user-friendly. - Sign Commits: Ensure all commits are signed off as per the project's DCO requirements.
Due to the high-severity concerns regarding the contributors
collection change and the template's hardcoded values, I suggest these points be addressed. As a reviewer, I am not authorized to approve the pull request; please ensure further review and approval by maintainers after these changes are considered.
collections/_custom-models/_custom-model-definition-template.md
Outdated
Show resolved
Hide resolved
collections/_custom-models/_custom-model-definition-template.md
Outdated
Show resolved
Hide resolved
collections/_custom-models/_custom-model-definition-template.md
Outdated
Show resolved
Hide resolved
collections/_custom-models/_custom-model-definition-template.md
Outdated
Show resolved
Hide resolved
collections/_custom-models/_custom-model-definition-template.md
Outdated
Show resolved
Hide resolved
Signed-off-by: vishalvivekm <[email protected]>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Vivek Vishal <[email protected]>
collections/_custom-models/_custom-model-definition-template.md
Outdated
Show resolved
Hide resolved
collections/_custom-models/_custom-model-definition-template.md
Outdated
Show resolved
Hide resolved
Signed-off-by: Vivek Vishal <[email protected]>
collections/_custom-models/_custom-model-definition-template.md
Outdated
Show resolved
Hide resolved
Signed-off-by: Vivek Vishal <[email protected]>
Signed-off-by: Vivek Vishal <[email protected]>
Signed-off-by: Vivek Vishal <[email protected]>
Signed-off-by: Vivek Vishal <[email protected]>
_includes/custom-modal.html
Outdated
<a href="https://github.com/meshery/meshery.io/blob/master/collections/_custom-models/_custom-model-definition-template.md" target="_blank">template</a> | ||
for reference) to the <code>collections/_custom-models</code> directory. | ||
</li> | ||
<li>Add your model tar file to the <code>assets/modelfiles</code> directory.</li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<li>Add your model tar file to the <code>assets/modelfiles</code> directory.</li> | |
<li>Add your model tar file to the <code>assets/modelFiles</code> directory.</li> |
Signed-off-by: Vivek Vishal <[email protected]>
Signed-off-by: Vivek Vishal <[email protected]>
Signed-off-by: Vivek Vishal <[email protected]>
Signed-off-by: Vivek Vishal <[email protected]>
Description
This PR fixes #
Notes for Reviewers
Signed commits