Skip to content

Add user settings in issue template#16492

Merged
paulacamargo25 merged 5 commits into
microsoft:mainfrom
paulacamargo25:Add-user-settings
Jul 19, 2021
Merged

Add user settings in issue template#16492
paulacamargo25 merged 5 commits into
microsoft:mainfrom
paulacamargo25:Add-user-settings

Conversation

@paulacamargo25
Copy link
Copy Markdown

@paulacamargo25 paulacamargo25 commented Jun 16, 2021

Add user setting in issue template.

Closes #231.

@karthiknadig karthiknadig self-requested a review June 16, 2021 21:01
@paulacamargo25 paulacamargo25 added the no-changelog No news entry required label Jun 17, 2021
@paulacamargo25 paulacamargo25 marked this pull request as ready for review June 17, 2021 20:09
@github-actions github-actions Bot requested a review from karrtikr June 17, 2021 20:09
@karthiknadig
Copy link
Copy Markdown
Member

@paulacamargo25 Are you working on this? I assume you are handing the string setting cases?

@paulacamargo25
Copy link
Copy Markdown
Author

@paulacamargo25 Are you working on this? I assume you are handing the string setting cases?

Yes, now its done :D

Copy link
Copy Markdown

@karrtikr karrtikr left a comment

Choose a reason for hiding this comment

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

I am unclear on what false and "placeholder" means in the JSON file, seems like we're handling that in the same way.

cc @karthiknadig

"Flake8Args": true,
"flake8CategorySeverity": false,
"flake8Enabled": true,
"flake8Path": false,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Not clear on why we have marked this as false, but marked banditPath or like as "placeholder". They both seem similar to me.

"linting": {
"enabled": true,
"cwd": true,
"Flake8Args": true,
Copy link
Copy Markdown

@karrtikr karrtikr Jun 22, 2021

Choose a reason for hiding this comment

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

Suggested change
"Flake8Args": true,
"flake8Args": "placeholder",

Should be lowercased.

Comment thread src/client/common/application/commands/reportIssueCommand.ts
Comment thread src/client/common/application/commands/reportIssueCommand.ts
Copy link
Copy Markdown
Member

@brettcannon brettcannon left a comment

Choose a reason for hiding this comment

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

I realized we can't take any arguments to tools directly as they may contain file paths.

"initialize": false,
"pythonPath": false,
"onDidChange": false,
"defaultInterpreterPath": false,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
"defaultInterpreterPath": false,
"defaultInterpreterPath": "placeholder",

"downloadLanguageServer": true,
"jediPath": false,
"jediMemoryLimit": false,
"envFile": false,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
"envFile": false,
"envFile": "placeholder",

"envFile": false,
"venvPath": "placeholder",
"venvFolders": false,
"condaPath": false,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
"condaPath": false,
"condaPath": "placeholder",

"venvPath": "placeholder",
"venvFolders": false,
"condaPath": false,
"pipenvPath": false,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
"pipenvPath": false,
"pipenvPath": "placeholder",

"venvFolders": false,
"condaPath": false,
"pipenvPath": false,
"poetryPath": false,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
"poetryPath": false,
"poetryPath": "placeholder",

"testing": {
"cwd": true,
"debugPort": true,
"nosetestArgs": true,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
"nosetestArgs": true,
"nosetestArgs": "placeholder",

"nosetestsEnabled": true,
"nosetestPath": "placeholder",
"promptToConfigure": true,
"pytestArgs": true,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
"pytestArgs": true,
"pytestArgs": "placeholder",

"pytestArgs": true,
"pytestEnabled": true,
"pytestPath": "placeholder",
"unittestArgs": true,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
"unittestArgs": true,
"unittestArgs": "placeholder",

"autoTestDiscoverOnSaveEnabled": true
},
"terminal": true,
"tensorBoard": true,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The only setting related to this that I could find is "python.tensorBoard.logDirectory", which should be a placeholder.

"unittestEnabled": true,
"autoTestDiscoverOnSaveEnabled": true
},
"terminal": true,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There's a bunch of subcommands.

vscode-python/package.json

Lines 1746 to 1769 in 67590fb

"python.terminal.activateEnvironment": {
"type": "boolean",
"default": true,
"description": "Activate Python Environment in Terminal created using the Extension.",
"scope": "resource"
},
"python.terminal.executeInFileDir": {
"type": "boolean",
"default": false,
"description": "When executing a file in the terminal, whether to use execute in the file's directory, instead of the current open folder.",
"scope": "resource"
},
"python.terminal.launchArgs": {
"type": "array",
"default": [],
"description": "Python launch arguments to use when executing a file in the terminal.",
"scope": "resource"
},
"python.terminal.activateEnvInCurrentTerminal": {
"type": "boolean",
"default": false,
"description": "Activate Python Environment in the current Terminal on load of the Extension.",
"scope": "resource"
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I guess python.terminal.launchArgs could also take file paths and should be marked as a placeholder, when the list is expanded.

@brettcannon
Copy link
Copy Markdown
Member

Would it make sense to either have the allowlist only worry about non-enum strings and arrays from

"properties": {
so that it's easier to keep up-to-date? Or have a Python script that reads package.json and adds any missing fields with an appropriate marker (either "placeholder" to be safe or XXX to know what changed), and remove any settings that got removed from the "python" namespace?

@@ -0,0 +1,126 @@
{
"initialize": false,
"pythonPath": false,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
"pythonPath": false,
"pythonPath": "placeholder",

"jediMemoryLimit": false,
"envFile": false,
"venvPath": "placeholder",
"venvFolders": false,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
"venvFolders": false,
"venvFolders": "placeholder",

"workspaceRoot": false,
"linting": {
"enabled": true,
"cwd": true,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
"cwd": true,
"cwd": "placeholder",

Comment on lines +6 to +8
"defaultLS": {
"defaultLSType": true
},
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
"defaultLS": {
"defaultLSType": true
},
"defaultLS": true,

If all subsettings are marked as true, this should work as well.

"autoUpdateLanguageServer": false,
"languageServer": true,
"languageServerIsDefault": false,
"logging": false,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
"logging": false,
"logging": true,

"flake8Path": false,
"ignorePatterns": false,
"lintOnSave": true,
"maxNumberOfProblems": false,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
"maxNumberOfProblems": false,
"maxNumberOfProblems": true,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This has not been addressed yet.

@karrtikr
Copy link
Copy Markdown

Would it make sense to either have the allowlist only worry about non-enum strings and arrays from package.json so that it's easier to keep up-to-date?

I like this idea. All of the placeholder items are either non-enum strings or arrays. We could have an exception list instead, where we allow certain non-enum strings or arrays. For eg. python.experiments.optInto is an array but should not be a placeholder.

@brettcannon
Copy link
Copy Markdown
Member

All of the placeholder items are either non-enum strings or arrays. We could have an exception list instead, where we allow certain non-enum strings or arrays. For eg. python.experiments.optInto is an array but should not be a placeholder.

Yep, I think we are saying the same thing with different terminology 😄: read package.json, and if it's a non-enum string or array just use "placeholder" and only swap out if some allowlist/exceptions list specifies that the setting is safe to include as-is.

@brettcannon brettcannon self-requested a review June 25, 2021 17:02
@brettcannon brettcannon requested a review from karrtikr July 13, 2021 17:00
@brettcannon
Copy link
Copy Markdown
Member

Is this held up on a positive review from @karrtikr at this point?

Copy link
Copy Markdown

@karrtikr karrtikr left a comment

Choose a reason for hiding this comment

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

@brettcannon I didn't get the memo I was not re-requested for review.

LGTM otherwise.

I guess we're not going with Brett's suggestion earlier #16492 (comment)?

"flake8Path": false,
"ignorePatterns": false,
"lintOnSave": true,
"maxNumberOfProblems": false,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This has not been addressed yet.

@brettcannon
Copy link
Copy Markdown
Member

@karrtikr I don't think there's a need to automate this right now since we don't mutate our settings often enough (i.e. potentially a premature optimization).

@brettcannon brettcannon requested review from brettcannon and removed request for brettcannon July 16, 2021 18:23
@paulacamargo25 paulacamargo25 merged commit 28be0f4 into microsoft:main Jul 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog No news entry required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants