Skip to content

Conversation

@kemingy
Copy link
Member

@kemingy kemingy commented Mar 8, 2025

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Overview

This PR adds a new command "new" to create a build.envd file from pre-defined templates, addressing issue #1685. It also introduces a dedicated template directory and updates file utilities and bootstrap stages to support this feature.

  • Adds pkg/app/new.go with the new command implementation.
  • Introduces DefaultTemplateDir and TemplateFile in pkg/util/fileutil/file.go.
  • Updates bootstrap and app command registration to include the new command.

Reviewed Changes

File Description
pkg/app/new.go Implements new command that creates build.envd using pre-defined templates.
pkg/util/fileutil/file.go Adds DefaultTemplateDir and a TemplateFile function to manage template files.
pkg/app/bootstrap.go Adds a bootstrap stage for adding pre-defined templates.
pkg/app/app.go Registers the new command within the app commands.

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

pkg/util/fileutil/file.go:142

  • Duplicate definition of TemplateFile detected; if a TemplateFile function already exists in this file, remove the duplicate to avoid conflicts.
func TemplateFile(filename string) (string, error) {

Signed-off-by: Keming <[email protected]>
@kemingy kemingy added this pull request to the merge queue Mar 9, 2025
Merged via the queue into tensorchord:main with commit 207c30e Mar 9, 2025
12 checks passed
@kemingy kemingy deleted the envd_template branch March 9, 2025 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: create an pre-defined dev env in one command

2 participants