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

Cookiecutter for extensions #75

Open
wunder957 opened this issue Sep 21, 2023 · 7 comments
Open

Cookiecutter for extensions #75

wunder957 opened this issue Sep 21, 2023 · 7 comments
Assignees
Labels
GFI:Easy Difficulty label: Easy for good first issue good first issue Good for newcomers
Milestone

Comments

@wunder957
Copy link
Contributor

wunder957 commented Sep 21, 2023

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)

  • A cookiecutter templates, users can choose which plugin to create
  • Provide a way to test it
  • (Nice to have)Testing it using Github Actions.

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

@wunder957 wunder957 added good first issue Good for newcomers GFI:Easy Difficulty label: Easy for good first issue labels Sep 21, 2023
@wunder957 wunder957 changed the title Cookiecutter for extension Cookiecutter for extensions Sep 21, 2023
@suhastj30
Copy link

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
Copy link
Contributor Author

wunder957 commented Sep 29, 2023

@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
Copy link
Contributor Author

wunder957 commented Sep 29, 2023

@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 wunder957 added this to the v0.2.0 milestone Sep 29, 2023
@wunder957
Copy link
Contributor Author

wunder957 commented Sep 29, 2023

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
Copy link
Contributor Author

@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
Copy link

suhastj30 commented Nov 8, 2023 via email

@wunder957
Copy link
Contributor Author

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

It's not urgent. Just take your time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GFI:Easy Difficulty label: Easy for good first issue good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants