From 42a15351af2e1de57ca76100dd718a1bbfd5401e Mon Sep 17 00:00:00 2001 From: eleanorjboyd <26030610+eleanorjboyd@users.noreply.github.com> Date: Wed, 23 Apr 2025 10:27:22 -0700 Subject: [PATCH 1/5] include project specifications in creation options --- src/api.ts | 12 ++++++++++-- src/internal.api.ts | 5 +++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/api.ts b/src/api.ts index 924d955a..8d5dd258 100644 --- a/src/api.ts +++ b/src/api.ts @@ -667,11 +667,19 @@ export interface PythonProjectCreatorOptions { name: string; /** - * Optional path that may be provided as a root for the project. + * Path provided as the root for the project. */ - uri?: Uri; + rootUri: Uri; + + projectTemplateSpecifications?: PythonProjectTemplateSpecifications; } +/** + * Specifications for the template set by the Python project creator. Project creators can create an object + * extending this type to provide additional information about what their template need. + */ +export interface PythonProjectTemplateSpecifications {} + /** * Interface representing a creator for Python projects. */ diff --git a/src/internal.api.ts b/src/internal.api.ts index 509d48ac..d691cd2e 100644 --- a/src/internal.api.ts +++ b/src/internal.api.ts @@ -26,6 +26,7 @@ import { EnvironmentGroupInfo, QuickCreateConfig, CreateEnvironmentOptions, + PythonProjectTemplateSpecifications, } from './api'; import { CreateEnvironmentNotSupported, RemoveEnvironmentNotSupported } from './common/errors/NotSupportedError'; import { sendTelemetryEvent } from './common/telemetry/sender'; @@ -371,3 +372,7 @@ export interface ProjectCreators extends Disposable { registerPythonProjectCreator(creator: PythonProjectCreator): Disposable; getProjectCreators(): PythonProjectCreator[]; } + +export interface PackageTemplateSpecifications extends PythonProjectTemplateSpecifications { + createVenv?: boolean; +} From 8764e1f6d5daeac3ad014d2abe17b945208ae07a Mon Sep 17 00:00:00 2001 From: eleanorjboyd <26030610+eleanorjboyd@users.noreply.github.com> Date: Wed, 23 Apr 2025 13:41:42 -0700 Subject: [PATCH 2/5] update to use T type --- src/api.ts | 12 +++++++----- src/internal.api.ts | 3 ++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/api.ts b/src/api.ts index 8d5dd258..2c66e350 100644 --- a/src/api.ts +++ b/src/api.ts @@ -660,7 +660,7 @@ export interface PythonProject { /** * Options for creating a Python project. */ -export interface PythonProjectCreatorOptions { +export interface PythonProjectCreatorOptions { /** * The name of the Python project. */ @@ -671,14 +671,16 @@ export interface PythonProjectCreatorOptions { */ rootUri: Uri; - projectTemplateSpecifications?: PythonProjectTemplateSpecifications; + /** + * The customization options for the Python project. + */ + customization?: T; } /** - * Specifications for the template set by the Python project creator. Project creators can create an object - * extending this type to provide additional information about what their template need. + * This is an interface allowing project creators to specify customization options required for the project creation. */ -export interface PythonProjectTemplateSpecifications {} +export interface PythonProjectCustomization {} /** * Interface representing a creator for Python projects. diff --git a/src/internal.api.ts b/src/internal.api.ts index d691cd2e..7c2a483a 100644 --- a/src/internal.api.ts +++ b/src/internal.api.ts @@ -27,6 +27,7 @@ import { QuickCreateConfig, CreateEnvironmentOptions, PythonProjectTemplateSpecifications, + PythonProjectCustomization, } from './api'; import { CreateEnvironmentNotSupported, RemoveEnvironmentNotSupported } from './common/errors/NotSupportedError'; import { sendTelemetryEvent } from './common/telemetry/sender'; @@ -373,6 +374,6 @@ export interface ProjectCreators extends Disposable { getProjectCreators(): PythonProjectCreator[]; } -export interface PackageTemplateSpecifications extends PythonProjectTemplateSpecifications { +export interface PackageTemplateSpecifications extends PythonProjectCustomization { createVenv?: boolean; } From d387bf0dcf88ef2626eb688706c072262b541edf Mon Sep 17 00:00:00 2001 From: eleanorjboyd <26030610+eleanorjboyd@users.noreply.github.com> Date: Wed, 23 Apr 2025 13:42:50 -0700 Subject: [PATCH 3/5] small error --- src/internal.api.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/internal.api.ts b/src/internal.api.ts index 7c2a483a..b642de17 100644 --- a/src/internal.api.ts +++ b/src/internal.api.ts @@ -26,7 +26,6 @@ import { EnvironmentGroupInfo, QuickCreateConfig, CreateEnvironmentOptions, - PythonProjectTemplateSpecifications, PythonProjectCustomization, } from './api'; import { CreateEnvironmentNotSupported, RemoveEnvironmentNotSupported } from './common/errors/NotSupportedError'; From 0905af4a242f35ad1031f9e9bec36a9d0a51fb39 Mon Sep 17 00:00:00 2001 From: eleanorjboyd <26030610+eleanorjboyd@users.noreply.github.com> Date: Wed, 23 Apr 2025 15:05:20 -0700 Subject: [PATCH 4/5] quickCreate project iteration --- src/api.ts | 16 ++++++++-------- src/internal.api.ts | 5 ----- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/src/api.ts b/src/api.ts index 2c66e350..b43ef0af 100644 --- a/src/api.ts +++ b/src/api.ts @@ -660,7 +660,7 @@ export interface PythonProject { /** * Options for creating a Python project. */ -export interface PythonProjectCreatorOptions { +export interface PythonProjectCreatorOptions { /** * The name of the Python project. */ @@ -672,16 +672,11 @@ export interface PythonProjectCreatorOptions Date: Wed, 23 Apr 2025 15:06:59 -0700 Subject: [PATCH 5/5] small edit --- src/api.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api.ts b/src/api.ts index b43ef0af..762b0dd9 100644 --- a/src/api.ts +++ b/src/api.ts @@ -709,7 +709,7 @@ export interface PythonProjectCreator { /** * A flag indicating whether the project creator supports quick create where no user input is required. */ - supportsQuickCreate?: boolean; + readonly supportsQuickCreate?: boolean; /** * Creates a new Python project or projects.