-
Notifications
You must be signed in to change notification settings - Fork 30
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
Add experiment icons to editor/title when params file is open #1740
Conversation
Tests are failing because the test fixture is not static and uses a parsing file which now imports |
Nice idea @mattseddon! What happens if there are multiple params files? |
Icons will show whenever any of the files are the active text editor (we collect all of the params files from the exp show output). |
That's super cool @mattseddon ! :) |
978f174
to
8fe9a1f
Compare
8fe9a1f
to
077602a
Compare
54c0885
to
90d75bd
Compare
41f118e
to
abebb4d
Compare
@@ -537,4 +546,44 @@ export class Experiments extends BaseRepository<TableData> { | |||
|
|||
return experiment?.id | |||
} | |||
|
|||
private setActiveEditorContext() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function setActiveEditorContext
has 33 lines of code (exceeds 30 allowed). Consider refactoring.
{ | ||
"command": "dvc.runExperiment", | ||
"group": "navigation@0", | ||
"when": "dvc.params.fileActive && !dvc.runner.running && dvc.commands.available && !dvc.experiment.checkpoints" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[F] For some reason these do not take ORs with brackets. We may want to split in the future so I think this duplication is ok... and I also hate it.... and it's ok.
@@ -42,6 +44,7 @@ export const ExperimentsScale = { | |||
} as const | |||
|
|||
export class Experiments extends BaseRepository<TableData> { | |||
public readonly onDidChangeIsParamsFileFocused: Event<string | undefined> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[F] If there are multiple projects in the workspace and a params file for a particular project is in the active editor then we don't want to prompt the user for which project they want to run the command against.
} | ||
|
||
this.dispose.track( | ||
this.onDidChangeColumns(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[F] Covers startup and changes to files (adding/deleting).
abebb4d
to
92872b7
Compare
Code Climate has analyzed commit 92872b7 and detected 1 issue on this pull request. Here's the issue category breakdown:
The test coverage on the diff in this pull request is 100.0% (85% is the threshold). This pull request will bring the total coverage in the repository to 96.8% (0.0% change). View more on Code Climate. |
2/2
main
<- #1745 <- thisInspired by this comment from @dberenbaum. Namely, this part:
We will now show the run/resume/reset and run/ queue icons in the editor/title whenever a params file is open. E.g:
This opens up the possibility of adding open to the side from the experiments table webview column context menu. Which will get us closer some kind of easier (but not quite inline) parans editing. After the user clicks on the "open params file to side" in the column context menu they would have a view like this:
Code is just a prototype for now. I should be able to knock over a real version fairly quickly.Demo
Screen.Recording.2022-05-20.at.1.57.04.pm.mov