Skip to content

Commit

Permalink
Revert addition of PyStein "feature flag" setting. (#3386)
Browse files Browse the repository at this point in the history
  • Loading branch information
philliphoff authored Oct 25, 2022
1 parent 4ac119c commit 1ae3bce
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 26 deletions.
6 changes: 0 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1032,12 +1032,6 @@
"scope": "resource",
"type": "string",
"description": "%azureFunctions.funcCliPath%"
},
"azureFunctions.showPysteinModel": {
"scope": "resource",
"type": "boolean",
"default": false,
"description": "%azureFunctions.showPysteinModel%"
}
}
}
Expand Down
3 changes: 1 addition & 2 deletions package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,5 @@
"azureFunctions.validateFuncCoreTools": "Validate the Azure Functions Core Tools is installed before debugging.",
"azureFunctions.viewCommitInGitHub": "View Commit in GitHub",
"azureFunctions.viewDeploymentLogs": "View Deployment Logs",
"azureFunctions.viewProperties": "View Properties",
"azureFunctions.showPysteinModel": "Enable Python (New Model Preview)"
"azureFunctions.viewProperties": "View Properties"
}
9 changes: 1 addition & 8 deletions src/commands/createNewProject/NewProjectLanguageStep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@

import { AzureWizardExecuteStep, AzureWizardPromptStep, IAzureQuickPickItem, IWizardOptions, UserCancelledError } from '@microsoft/vscode-azext-utils';
import { QuickPickOptions } from 'vscode';
import { previewPythonModel, ProjectLanguage, pysteinModelSetting, pythonNewModelPreview } from '../../constants';
import { previewPythonModel, ProjectLanguage, pythonNewModelPreview } from '../../constants';
import { localize } from '../../localize';
import { nonNullProp } from '../../utils/nonNull';
import { openUrl } from '../../utils/openUrl';
import { isPythonV2Plus } from '../../utils/pythonUtils';
import { getWorkspaceSetting } from '../../vsCodeConfig/settings';
import { FunctionListStep } from '../createFunction/FunctionListStep';
import { addInitVSCodeSteps } from '../initProjectForVSCode/InitVSCodeLanguageStep';
import { DotnetRuntimeStep } from './dotnetSteps/DotnetRuntimeStep';
Expand Down Expand Up @@ -58,12 +57,6 @@ export class NewProjectLanguageStep extends AzureWizardPromptStep<IProjectWizard
});
}

if (!getWorkspaceSetting(pysteinModelSetting)) {
languagePicks = languagePicks.filter(p => {
return p.label !== pythonNewModelPreview;
})
}

const options: QuickPickOptions = { placeHolder: localize('selectLanguage', 'Select a language') };
const result = (await context.ui.showQuickPick(languagePicks, options)).data;
if (result === undefined) {
Expand Down
11 changes: 2 additions & 9 deletions src/commands/initProjectForVSCode/InitVSCodeLanguageStep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@

import { AzureWizardExecuteStep, AzureWizardPromptStep, IAzureQuickPickItem, IWizardOptions } from '@microsoft/vscode-azext-utils';
import { QuickPickOptions } from 'vscode';
import { previewPythonModel, ProjectLanguage, pysteinModelSetting, pythonNewModelPreview } from '../../constants';
import { previewPythonModel, ProjectLanguage, pythonNewModelPreview } from '../../constants';
import { localize } from '../../localize';
import { getWorkspaceSetting } from '../../vsCodeConfig/settings';
import { IProjectWizardContext } from '../createNewProject/IProjectWizardContext';
import { DotnetInitVSCodeStep } from './InitVSCodeStep/DotnetInitVSCodeStep';
import { DotnetScriptInitVSCodeStep } from './InitVSCodeStep/DotnetScriptInitVSCodeStep';
Expand All @@ -23,7 +22,7 @@ export class InitVSCodeLanguageStep extends AzureWizardPromptStep<IProjectWizard

public async prompt(context: IProjectWizardContext): Promise<void> {
// Display all languages, even if we don't have full support for them
let languagePicks: IAzureQuickPickItem<{ language: ProjectLanguage, model?: number }>[] = [
const languagePicks: IAzureQuickPickItem<{ language: ProjectLanguage, model?: number }>[] = [
{ label: ProjectLanguage.CSharp, data: { language: ProjectLanguage.CSharp } },
{ label: ProjectLanguage.CSharpScript, data: { language: ProjectLanguage.CSharpScript } },
{ label: ProjectLanguage.FSharp, data: { language: ProjectLanguage.FSharp } },
Expand All @@ -37,12 +36,6 @@ export class InitVSCodeLanguageStep extends AzureWizardPromptStep<IProjectWizard
{ label: ProjectLanguage.Custom, data: { language: ProjectLanguage.Custom } }
];

if (!getWorkspaceSetting(pysteinModelSetting)) {
languagePicks = languagePicks.filter(p => {
return p.label !== pythonNewModelPreview;
})
}

const options: QuickPickOptions = { placeHolder: localize('selectLanguage', "Select your project's language") };
const option = await context.ui.showQuickPick(languagePicks, options);
context.language = option.data.language;
Expand Down
1 change: 0 additions & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export const hiddenStacksSetting: string = 'showHiddenStacks';
export const projectTemplateKeySetting: string = 'projectTemplateKey';
export const remoteBuildSetting: string = 'scmDoBuildDuringDeployment';
export const javaBuildTool: string = 'javaBuildTool';
export const pysteinModelSetting: string = "showPysteinModel";

export enum ProjectLanguage {
CSharp = 'C#',
Expand Down

0 comments on commit 1ae3bce

Please sign in to comment.