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

[vsc-extension] [C4GT] Stencil VSCode extension #7

Open
5 tasks
techsavvyash opened this issue Dec 2, 2023 · 27 comments
Open
5 tasks

[vsc-extension] [C4GT] Stencil VSCode extension #7

techsavvyash opened this issue Dec 2, 2023 · 27 comments
Labels
C4GT Community Tasks for the C4GT Community to solve for

Comments

@techsavvyash
Copy link
Member

techsavvyash commented Dec 2, 2023

Create VSCode Extension for Stencil - Data Verification Feature

Description

The goal is to develop the first version of a VSCode extension for Stencil, aiming to enhance the Developer Experience (DX). The primary feature for this initial release is to verify data intended for seeding in the database against the model generated by the Prisma client. This verification will be conducted using CSV or JSON files.

Goals

  1. VSCode Extension Setup: Establish the basic structure and setup for the VSCode extension tailored for Stencil.

  2. Data Verification Feature: Implement the feature that allows users to verify data from CSV/JSON files against the Prisma client-generated model.

Acceptance Criteria

  1. Extension Setup: Successfully set up the VSCode extension project with Stencil integration.

  2. Data Verification Functionality: Implement functionality within the extension that verifies data present in CSV/JSON files against the Prisma client-generated model.

  3. User Interface (UI): Develop a simple and user-friendly UI within VSCode to facilitate the data verification process.

  4. Testing: Ensure the data verification feature works as intended and is capable of identifying inconsistencies between the provided data and the Prisma model.

  5. Documentation: Provide clear documentation on how to use the VSCode extension, specifically focusing on the steps for data verification and any relevant considerations. Include your docs as a ReadME.md in your PR. The docs will be pushed to official stencil documentation after successful merging of your PR.

Checklist (To be filled by the developer)

  • Set up the basic structure and configuration for the Stencil VSCode extension.

  • Implement the data verification feature, allowing users to check data from CSV/JSON files against the Prisma client-generated model.

  • Design and implement a simple and user-friendly UI within VSCode for the data verification process.

  • Perform thorough testing to ensure the accuracy and effectiveness of the data verification feature.

  • Document the usage of the VSCode extension, emphasizing the steps for data verification and any important information for users.

Product Name

Stencil

Organisation Name

SamagraX

Tech Skills Needed

TypeScript

Mentors

@RyanWalker277

Complexity

Hard

Domain

Category

Miscellaneous

Sub Category

VsCode Extensions

@RyanWalker277 RyanWalker277 added the C4GT Community Tasks for the C4GT Community to solve for label Feb 9, 2024
@RyanWalker277 RyanWalker277 changed the title [vsc-extension] Stencil VSCode extension [vsc-extension] [C4GT] Stencil VSCode extension Feb 9, 2024
@Apurv428
Copy link

Hello @RyanWalker277, I'm keen on taking up this issue. I would like more information, particularly regarding step 2, which involves implementing the data verification feature. This feature aims to enable users to validate data from CSV/JSON files against the Prisma client-generated model. Can you provide more guidance to help me proceed with this task?

@RyanWalker277
Copy link
Contributor

Hey @Apurv428, so basically the VS-Code extension should be able to seed the data in the db. The user will provide a CSV including the data to be seeded. It should then verify if the CSV is according to our prisma model. If the validation succeeds, then it should seed the csv data into the database in the appropriate table.

@Apurv428
Copy link

Thanks for the explanation. So, according to my understanding
The user uploads a CSV, we validate its compatibility with our Prisma model, and if it aligns correctly, we insert it into the necessary database table.

Please correct me if I am wrong.

Do you have any recommendations on how to begin with this? Also, could you share the database format to get acquainted with it?

@RyanWalker277
Copy link
Contributor

Yes the understanding is correct. You can refer to this to begin:

https://www.freecodecamp.org/news/making-vscode-extension/

The database format is provided along with the code in the schema.prisma

@Apurv428
Copy link

Thank you for providing the reference. If I have any questions, I'll reach out to you.

@Apurv428
Copy link

Hi @RyanWalker277
Could you please provide more details on the first point of the acceptance criteria, specifically regarding the extension setup? Are you referring to a basic setup similar to configuring a VSCode extension, or does it involve additional steps or considerations?

@RyanWalker277
Copy link
Contributor

Hey @Apurv428, in the first iteration it should be a basic extension which provides the functionality to seed db from csv data. There would be more features and enhancements after this feature is initialised. Let me know when you are ready to create a pull request, I'll create a separate repository for the extension. You'll have to create a PR on that.

@Apurv428
Copy link

Okay, I have created a basic extension and am working on the upload functionality.
Thank you!

@Apurv428
Copy link

Hi @RyanWalker277 , how can I get the format of database? Is it same as the Role model?

@techsavvyash
Copy link
Member Author

Hey @Apurv428 ,
The database schema would be dynamic, we'll need to parse the schema.prisma file to figure that out. The Role schema is just for reference.

@Apurv428
Copy link

Apurv428 commented Feb 16, 2024

So, similar to Role model, there may be other models mentioned in that file? Can there be more than 1?

@techsavvyash
Copy link
Member Author

Yes

@Apurv428
Copy link

Apurv428 commented Feb 20, 2024

I've implemented the CSV validation part. Could you please create a repository for it so that I can make a pull request?"

And for the second part about database seeding:

Where should we retrieve the database details from? Are they obtained in the same way from Prisma? Could you share the env variable values related to the database? Additionally, will the table names correspond to the model names?

@techsavvyash
Copy link
Member Author

Hey @Apurv428,
That is super! Please create a new folder named vsc-extension in the root of the repository and raise a PR for the same.

@Apurv428
Copy link

Sure!

@Apurv428
Copy link

Hi,
Could y'll provide the following details about database seeding?

Where should we retrieve the database details from? Are they obtained in the same way from Prisma? Could you share the env variable values related to the database? Additionally, will the table names correspond to the model names?

@techsavvyash
Copy link
Member Author

Hey @Apurv428,
Database seeding is still something we are figuring out how to implement into stencil, we can add that as a part of this extension once it has been discussed and a seeding strategy has been agreed upon.

@Apurv428
Copy link

Okay, thank you!

@Yash-Sajwan24
Copy link

@techsavvyash I understand the problem, and I believe I have the necessary skills. Could I have the opportunity to work on this?

@Abhi-0001
Copy link

is it still available to work on ? Can I start work on it?
If yes, then what is the current status of extension?

@techsavvyash
Copy link
Member Author

@Abhi-0001 the first version of the vs code extension was very generously contributed by @Apurv428. The issue is still open to work on by adding more functionality enhancing the developer experience.

@Abhi-0001
Copy link

Thanks @techsavvyash, so Can you give me instructions about setting the code up in my machine (as this is my first time in vscode extension development, though I know typescript) and the requirements I would have to full fill for next version.

@techsavvyash
Copy link
Member Author

Refer #78

@thekavikumar
Copy link

@techsavvyash by adding some more features, will I be getting the points?

@techsavvyash
Copy link
Member Author

yes @thekavikumar

@VedantKhairnar
Copy link

@techsavvyash
Is the PR and the work around this issue completed? If yes, will you pls close the issue? Thanks.

@techsavvyash
Copy link
Member Author

@VedantKhairnar this is a long running ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C4GT Community Tasks for the C4GT Community to solve for
Projects
None yet
Development

No branches or pull requests

7 participants