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

Removes cookiecutter dependency #2360

Merged
merged 4 commits into from
Apr 19, 2024

Conversation

thomasjpfan
Copy link
Member

@thomasjpfan thomasjpfan commented Apr 18, 2024

Tracking issue

Closes #1665
Related to flyteorg/flyte#4418

Why are the changes needed?

This PR removes the cookiecutter dependency from flytekit.

What changes were proposed in this pull request?

This PR replaces the cookiecutter code with a HTTP request, extracting the files from the template, and replacing {{cookiecutter.project_name}} in the contents and file names.

How was this patch tested?

I reran pyflyte init for every template and checked that the behavior is the same as before.

Signed-off-by: Thomas J. Fan <thomasjpfan@gmail.com>
Signed-off-by: Thomas J. Fan <thomasjpfan@gmail.com>
Signed-off-by: Thomas J. Fan <thomasjpfan@gmail.com>
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Apr 18, 2024
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Apr 18, 2024
@eapolinario
Copy link
Collaborator

This is great!

Can you also remove the mentions to cookiecutter from the description in https://github.com/flyteorg/flytekit-python-template?

@dosubot dosubot bot added the lgtm This PR has been approved by maintainer label Apr 18, 2024
@eapolinario eapolinario merged commit bc153b3 into flyteorg:master Apr 19, 2024
47 checks passed
fiedlerNr9 pushed a commit that referenced this pull request Jul 25, 2024
* Removes cookiecutter dependency

Signed-off-by: Thomas J. Fan <thomasjpfan@gmail.com>

* Updates requirements

Signed-off-by: Thomas J. Fan <thomasjpfan@gmail.com>

* Raise error with directory already exists

Signed-off-by: Thomas J. Fan <thomasjpfan@gmail.com>

* Lint and regenerate dev-requirements

Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>

---------

Signed-off-by: Thomas J. Fan <thomasjpfan@gmail.com>
Signed-off-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
Co-authored-by: Eduardo Apolinario <eapolinario@users.noreply.github.com>
Signed-off-by: Jan Fiedler <jan@union.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by maintainer size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants