hitsz-ids / duetector

duetector🔍: Data Usage Extensible Detector for data usage observability.
https://dataucon.idslab.io/
Apache License 2.0
10 stars 8 forks source link

Cookiecutter for extensions #75

Open wunder957 opened 12 months ago

wunder957 commented 12 months ago

Cookiecutter is a Python package, easily installable with pip or other package managers, that enables you to create and use templates for microservices and software projects.

🚅Search before asking

I have searched for issues similar to this one.

🚅Description

Reference examples/extension to build cookiecutter templates.

🏕Solution(optional)

Add a README to examples/extension to tell people that there are cookiecutter templates available.

🍰Detail(optional)

(Cookiecutter-template) Please fork and draft PR on this project: https://github.com/hitsz-ids/duetector-cookiecutter.

🍰Example(optional)

https://github.com/Wh1isper/pypi-hatch-pytest-cookiecutter

suhastj30 commented 11 months ago

Heyy !! I'd like to take up this good first issue of the cookiecutter. I am familiar with google cloud platform and know a little bit about kubernetes clusters (mainly the GKE ) with which I have worked for a very short period of time. Could You please tell me what I need to solve in this issue ?

wunder957 commented 11 months ago

@suhastj30 Hello and thank you for your interest in helping our project.

Cookiecutter is a great project template tool that can help users quickly build a project. In our project, we use entry-points via Python packages as a way to inject plugins, and we currently support four types of plugins. Through the Cookiecutter template, can this allow users to quickly create a plugin project.

There are some sources you can refer to:

I suggest you can start the program by following these steps:

  1. Try to understand our examples: examples/extension
    • entry-point in pyproject.toml
    • 4 different types of extensions
    • Class inheritance relationships and instantiation functions(init_{...}, decorated by @hookimp)
  2. Understanding Cookiecutter templates, mainly jinja2 templates and how to configure Cookiecutter(cookiecutter.json)
  3. Starting from a particular plugin, first build the cookiecutter template for a particular plugin
  4. Conditional control (if) allows the user to select a certain plugin type for generation

With all of the above done, we can then look at how to test this cookiecutter template, as well as modify the relevant documentation.

My expectations:

  1. User create project by cookiecutter: cookiecutter https://github.com/hitsz-ids/duetector-cookiecutter
  2. User selects a particular plug-in type(e.g. Tracer)
  3. User enters additional information such as Pypi username, LICENSE, etc.(It's in most cookiecutter projects.)
  4. Successfully generating the empty plugin (or the plugin with helloworld), the user installs it( pip install -e . ) and can start development directly
wunder957 commented 11 months ago

@suhastj30 I have assigned this issue to you, please Fork our cookiecutter repository and submit the PR to this repository. (Don't worry about your contribution being buried in the main repository, you'll be mentioned in Contributors as well as in the related documentation and code Co-auth!)

Repo: https://github.com/hitsz-ids/duetector-cookiecutter

If you have any questions, fell free to leave a comment under this issue or just @ me.

Looking forward to your first PR! Thanks.

wunder957 commented 11 months ago

By the way, my vacation🏖 ends on October 6, so replies may not be too immediate until then. I'll try to respond as early as I can.

wunder957 commented 10 months ago

@suhastj30 Hi! Any progress? Are you still interested in continuing this work?

We recently created the slack channel and welcome to join our slack: https://join.slack.com/t/hitsz-ids/shared_invite/zt-2395mt6x2-dwf0j_423QkAgGvlNA5E1g

suhastj30 commented 10 months ago

Yes I am working on it. It took me quite some time to understand the examples, I will show you the progress soon. Mostly within next 30 hours. Please forgive me for not being so active. Thank You so much for the Slack channel. I will join it 💯

On Wed, 8 Nov 2023, 07:36 wunder957, @.***> wrote:

@suhastj30 https://github.com/suhastj30 Hi! Any progress? Are you still interested in continuing this work?

We recently created the slack channel and welcome to join our slack: https://join.slack.com/t/hitsz-ids/shared_invite/zt-2395mt6x2-dwf0j_423QkAgGvlNA5E1g

— Reply to this email directly, view it on GitHub https://github.com/hitsz-ids/duetector/issues/75#issuecomment-1800890073, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARFBCZCJ2KLUKLX76MVVDW3YDLSJDAVCNFSM6AAAAAA5BGAZI6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBQHA4TAMBXGM . You are receiving this because you were mentioned.Message ID: @.***>

wunder957 commented 10 months ago

@suhastj30 ❤Thanks for the reply, I hope I'm not disturbing you too much.

It's not urgent. Just take your time.